예제 #1
0
        public static Intent CreateGooglePlayStoreViewIntent(Context context, String packageId,
                                                             Boolean useBrowserForced = false)
        {
            SmtuScheduleApplication application = context.ApplicationContext as SmtuScheduleApplication;

            if (!useBrowserForced && application.IsPlayStoreInstalled())
            {
                return(CreateViewIntentFromUrl("market://details?id=" + packageId));
            }

            return(CreateViewIntentFromUrl("https://play.google.com/store/apps/details?id=" + packageId));
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SmtuScheduleApplication application = ApplicationContext as SmtuScheduleApplication;

            application.Preferences.ThemeChanged += Recreate;

            SetTheme(application.Preferences.UseDarkTheme ? Resource.Style.Theme_SmtuSchedule_Dark
                : Resource.Style.Theme_SmtuSchedule_Light);

            SetContentView(Resource.Layout.preferencesActivity);

            Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.preferencesActivityToolbar);

            toolbar.NavigationClick += (s, e) => OnBackPressed();

            SupportFragmentManager.BeginTransaction()
            .Replace(Resource.Id.preferencesContentFrameLayout, new PreferencesFragment())
            .Commit();
        }