Esempio n. 1
0
        void ListItemClicked(int position)
        {
            FragmentManager.PopBackStack(null, PopBackStackFlags.Inclusive);

            Log.Debug(Tag, "Item {0} has been selected.", position);

            Android.App.Fragment fragment = null;
            switch (position)
            {
            case 0:
                fragment = new SessionListFragment();
                break;

            case 1:
                fragment = new SpeakerListFragment();
                break;

            case 2:
                fragment = new AboutFragment();
                break;
            }

            // Insert the fragment by replacing any existing fragment
            FragmentManager.BeginTransaction()
            .Replace(Resource.Id.content_frame, fragment)
            .Commit();

            // Highlight the selected item, update the title, and close the drawer
            drawerList.SetItemChecked(position, true);
            Title = sections [position];
            drawerLayout.CloseDrawer(drawerList);
        }
Esempio n. 2
0
		void ListItemClicked (int position)
		{
			FragmentManager.PopBackStack (null, PopBackStackFlags.Inclusive);

			Log.Debug (Tag, "Item {0} has been selected.", position);

			Android.App.Fragment fragment = null;
			switch (position) {
			case 0:
				fragment = new SessionListFragment ();
				break;
			case 1:
				fragment = new SpeakerListFragment ();
				break;
			case 2:
				fragment = new AboutFragment ();
				break;
			}

			// Insert the fragment by replacing any existing fragment
			FragmentManager.BeginTransaction ()
				.Replace (Resource.Id.content_frame, fragment)
				.Commit ();

			// Highlight the selected item, update the title, and close the drawer
			drawerList.SetItemChecked (position, true);
			Title = sections [position];
			drawerLayout.CloseDrawer (drawerList);
		}