private void HideAllTabs(AndroidX.Fragment.App.FragmentTransaction fragTran)
 {
     if (_readerReadFrag != null)
     {
         fragTran.Hide(_readerReadFrag);
     }
 }
Example #2
0
        void ShowEmbeddedPageFragment(Fragment fragment)
        {
            FragmentTransaction ft = SupportFragmentManager.BeginTransaction();

            ft.AddToBackStack(null);
            ft.Replace(Resource.Id.fragment_frame_layout, fragment, "hello");

            ft.Commit();
        }
 //custom
 public static void ShowNoNetDialog(bool val)
 {
     if (val != true)
     {
         noNetBottomSheet            = new NoNetBottomSheet(_context);
         noNetBottomSheet.Cancelable = false;
         AndroidX.Fragment.App.FragmentTransaction ft = _context.SupportFragmentManager.BeginTransaction();
         ft.Add(noNetBottomSheet, "no_net");
         ft.CommitAllowingStateLoss();
     }
     else
     {
         return;
     }
 }
        public void OnChanged(Java.Lang.Object p0)
        {
            SMInAppContentUrlFragment inAppContentUrlFragment = SMInAppContentUrlFragment.NewInstance("MAIN");

            inAppContentUrlFragment.Refresh();

            //You can check if there is content.
            if (inAppContentUrlFragment.HasContent)
            {
                AndroidX.Fragment.App.FragmentTransaction fragmentTransaction = _fragmentManager.BeginTransaction();
                fragmentTransaction.Replace(Resource.Id.main_fragment_url, inAppContentUrlFragment);
                fragmentTransaction.Commit();
            }
            else
            {
                //There is no content, so you can display something else instead of the fragment if you want.
                //You can also listen to the broadcast sent after receiving In App Contents (cf. class EventReceiver) and,
                // if there is content for this category, then display the fragment.

                //Do stuff...
            }
        }