Example #1
0
            public static PlaceholderFragment NewInstance(int sectionNumber)
            {
                var fragment = new PlaceholderFragment();
                var args     = new Bundle();

                args.PutInt(ArgSectionNumber, sectionNumber);
                fragment.Arguments = args;
                return(fragment);
            }
Example #2
0
            /**
             * Returns a new instance of this fragment for the given section
             * number.
             */
            public static PlaceholderFragment newInstance(int sectionNumber)
            {
                PlaceholderFragment fragment = new PlaceholderFragment();
                Bundle args = new Bundle();

                args.PutInt(ARG_SECTION_NUMBER, sectionNumber);
                fragment.Arguments = args;
                return(fragment);
            }
Example #3
0
        void LoadFragment(int id)
        {
            Android.Support.V4.App.Fragment fragment = null;
            switch (id)
            {
            case Resource.Id.menu_chat:
            case Resource.Id.menu_search:
            case Resource.Id.menu_groups:
                fragment = PlaceholderFragment.NewInstance();
                break;

            case Resource.Id.menu_posts:
                fragment = PostsFragment.NewInstance();
                break;

            case Resource.Id.menu_profile:
                fragment = UserSettingsFragment.NewInstance();
                break;
            }
            SupportFragmentManager.BeginTransaction()
            .Replace(Resource.Id.FrameContent, fragment)
            .Commit();
        }
Example #4
0
 public override Fragment GetItem(int position)
 {
     return(PlaceholderFragment.NewInstance(position + 1));
 }
Example #5
0
 public override Android.Support.V4.App.Fragment GetItem(int position)
 {
     return(PlaceholderFragment.newInstance(position + 1));
 }
 public void OnNavigationDrawerItemSelected(int position)
 {
     try
     {
         if (!IsFinishing)
         {
             FragmentManager.BeginTransaction().Replace(MyTrap.Droid.Resource.Id.container, PlaceholderFragment.newInstance(position + 1)).Commit();
         }
     }
     catch (Exception exception)
     {
         InsightsUtils.LogException(exception);
     }
 }