public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
 {
     View view = inflater.Inflate (Resource.Layout.MyAttendees, container, false);
     btnCreateAttendee = view.FindViewById<Button> (Resource.Id.btnCreateAttendee);
     attendeesListView = view.FindViewById<ListView>(Resource.Id.lstAttendees);
     attendeesListView.Adapter = new MyAttendee_ItemAdapter (this.Activity, items);
     attendeesListView.ItemClick += OnListEventClick;
     btnCreateAttendee.Click += delegate {
         var fragTx = FragmentManager.BeginTransaction();
         var frag = new CreateAttendeeFragment();
         fragTx.Replace(Resource.Id.framelayout_maincontainer, frag);
         fragTx.Commit();
     };
     return view;
 }
Ejemplo n.º 2
0
 private void CallFragment(int Id)
 {
     var frag =new Android.App.Fragment();
     var fragTx = FragmentManager.BeginTransaction();
     fragTx.SetCustomAnimations (Resource.Animation.slide_in_left, Resource.Animation.slide_out_right);
     switch (Id) {
     case Resource.Id.relativeLayoutcontainerHome:
     case Resource.Id.relativeLayoutcontainerMyEvents:
         frag =new MyEventsFragment();
         fragTx.Replace(Resource.Id.framelayout_maincontainer, frag);
         break;
     case Resource.Id.relativeLayoutcontainerCreateEvent:
         frag = new CreateEventFragment ();
         fragTx.Replace (Resource.Id.framelayout_maincontainer, frag).AddToBackStack("CREATEEVENT");
         break;
     case Resource.Id.relativeLayoutcontainerCreateAttendee:
         frag = new CreateAttendeeFragment ();
         fragTx.Replace (Resource.Id.framelayout_maincontainer, frag).AddToBackStack("CREATEATTENDEE");
         break;
     case Resource.Id.relativeLayoutcontainerMyAttendees:
         frag = new MyAttendeesFragment ();
         fragTx.Replace (Resource.Id.framelayout_maincontainer, frag).AddToBackStack("MYATTENDEES");
         break;
     default:
         frag =new MyEventsFragment();
         fragTx.Add(Resource.Id.framelayout_maincontainer, frag).AddToBackStack("MYEVENTS");
         break;
     }
     fragTx.Commit();
     mDrawerLayout.CloseDrawers ();
 }