private void Id_Click(object sender, EventArgs e) { try { FragmentTransaction transaction1 = this.FragmentManager.BeginTransaction(); MainOrderStatusActivity content2 = new MainOrderStatusActivity(); transaction1.Replace(Resource.Id.framelayout, content2).AddToBackStack(null); transaction1.Commit(); } catch (Exception ex) { Toast.MakeText(Activity, ex.Message, ToastLength.Long).Show(); } }
public override View GetView(int position, View convertView, ViewGroup parent) { View view = convertView; if (view == null) { view = LayoutInflater.From(context).Inflate(Resource.Layout.order_book_parameters, null); } view.FindViewById <TextView>(Resource.Id.txtFrom).Text = orders[position].Inception; view.FindViewById <TextView>(Resource.Id.txtWhere).Text = orders[position].Destination; view.FindViewById <TextView>(Resource.Id.txtPrice).Text = orders[position].Price; var txt_date = view.FindViewById <TextView>(Resource.Id.txtDate); view.FindViewById <TextView>(Resource.Id.txtOrderName).Text = "Заказ: " + orders[position].OrderName; var btn = view.FindViewById <Button>(Resource.Id.btn_alarms); string date = orders[position].Date; string[] words = date.Split(' '); txt_date.Text = ""; foreach (var word in words) { txt_date.Text += word + "\n"; } btn.Click += delegate { try { MainOrderStatusActivity content = new MainOrderStatusActivity(); StaticOrder.Order_id = orders[position].OrderName; manager.Replace(Resource.Id.framelayout, content).AddToBackStack(null); manager.Commit(); } catch (Exception ex) { Toast.MakeText(context, ex.Message, ToastLength.Long); } }; return(view); }