X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FAboutActivity.java;h=9ce67ad74b3b054367269b68ee2cc59bafdd821a;hb=4196bafc4069857b554ac95addcae92fcabae901;hp=6ce5b431fa641b21d494a3b0238079bc9ad13235;hpb=fa3b8b382eb5ed86c598e3b126d1ef5dd117c5be;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java index 6ce5b431..9ce67ad7 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/AboutActivity.java @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2019 Soren Stoutner . + * Copyright © 2016-2020 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -41,8 +41,7 @@ public class AboutActivity extends AppCompatActivity { // Get a handle for the shared preferences. SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); - // Get the theme and screenshot preferences. - boolean darkTheme = sharedPreferences.getBoolean("dark_theme", false); + // Get the screenshot preference. boolean allowScreenshots = sharedPreferences.getBoolean("allow_screenshots", false); // Disable screenshots if not allowed. @@ -51,11 +50,7 @@ public class AboutActivity extends AppCompatActivity { } // Set the theme. - if (darkTheme) { - setTheme(R.style.PrivacyBrowserDark_SecondaryActivity); - } else { - setTheme(R.style.PrivacyBrowserLight_SecondaryActivity); - } + setTheme(R.style.PrivacyBrowser); // Run the default commands. super.onCreate(savedInstanceState); @@ -89,6 +84,9 @@ public class AboutActivity extends AppCompatActivity { // Setup the ViewPager. aboutViewPager.setAdapter(new AboutPagerAdapter(getSupportFragmentManager(), getApplicationContext(), blocklistVersions)); + // Keep all the tabs in memory. This prevents the memory usage updater from running multiple times. + aboutViewPager.setOffscreenPageLimit(10); + // Connect the tab layout to the view pager. aboutTabLayout.setupWithViewPager(aboutViewPager); }