]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.java
Display memory usage information in About > Version. https://redmine.stoutner.com...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / GuideActivity.java
index d6809e57f6923b2f2b90462b33ae7471e2c616b6..54c87a87eaa26a6638d2201c73b29d2bf04d7b1c 100644 (file)
@@ -40,8 +40,7 @@ public class GuideActivity 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.
@@ -50,11 +49,7 @@ public class GuideActivity 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);
@@ -86,6 +81,9 @@ public class GuideActivity extends AppCompatActivity {
         // Set the view pager adapter.
         aboutViewPager.setAdapter(new GuidePagerAdapter(getSupportFragmentManager(), getApplicationContext()));
 
+        // Keep all the tabs in memory.
+        aboutViewPager.setOffscreenPageLimit(10);
+
         // Link the tab layout to the view pager.
         aboutTabLayout.setupWithViewPager(aboutViewPager);
     }