c# - Save products in basket , when close activity -


i have basket activity when add products list of products.

code of adding attributes

add.click += delegate {         var intent = new intent (this, typeof(cartactivity));         intent.putextra ("title", (string)(firstitem ["post_title"]));         intent.putextra ("price", (string)(firstitem ["price"] + " грн"));         intent.putextra ("weight", (string)(firstitem ["weight"] + "г"));         startactivity (intent);     }; 

code of receiving attributes

productname.text = intent.getstringextra("title");     price.text = intent.getstringextra("price");     weight.text = intent.getstringextra("weight"); 

i tried onpause

namespace murakamikiev { [activity(label = "murakami",  icon = "@drawable/logo", theme = "@android:style/theme.black.notitlebar", screenorientation = screenorientation.portrait)] public class cartactivity : activity {     protected override void onpause()     {         base.onpause(); 

but when run activity have black screen

did call setcontentview() in oncreate()?

like this

namespace murakamikiev {     [activity(label = "murakami",  icon = "@drawable/logo", theme = "@android:style/theme.black.notitlebar", screenorientation = screenorientation.portrait)]     public class cartactivity : activity     {         protected override void oncreate(bundle bundle)         {             base.oncreate(bundle);             setcontentview(resource.layout.yourlayout);         }     } } 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -