/// <summary>
 ///     Ensure the recent caches are intialized and accessible, as well as double-checking the Launcher Enabled settings if
 ///     they haven't been checked recently
 /// </summary>
 protected virtual void InitializeCache()
 {
     retainedFragment = RetainFragment.FindOrCreateRetainFragment(FragmentManager);
     if (retainedFragment.HavePreferencesBeenChecked)
     {
         VerifyLauncherEnabledSettings();
         retainedFragment.HavePreferencesBeenChecked = true;
     }
 }
Esempio n. 2
0
        public static RetainFragment FindOrCreateRetainFragment(FragmentManager fm)
        {
            var fragment = fm.FindFragmentByTag <RetainFragment>(TAG);

            if (fragment == null)
            {
                fragment = new RetainFragment();
                fm.BeginTransaction().Add(fragment, TAG).Commit();
            }
            return(fragment);
        }