protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.show_product); product = JsonConvert.DeserializeObject <Product>(Intent.GetStringExtra("product")); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); var txtName = FindViewById <TextView>(Resource.Id.textViewName); var txtCategory = FindViewById <TextView>(Resource.Id.textViewCategory); var txtDescription = FindViewById <TextView>(Resource.Id.textViewDescription); var cover = FindViewById <ImageView>(Resource.Id.imageViewCover); showProductPresenter = new ShowProductPresenter(this); showProductPresenter.RenderProduct(product, txtName, txtCategory, txtDescription, cover); toolbar.Title = "S/." + product.price.ToString(); SetSupportActionBar(toolbar); if (SupportActionBar != null) { SupportActionBar.SetDisplayHomeAsUpEnabled(true); } // Create your application here }
private void UcShowProduct_Load(object sender, System.EventArgs e) { presenter = new ShowProductPresenter(this, new ProductRepository()); }