]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/LogcatActivity.java
Add the option to move the app bar to the bottom of the screen. https://redmine.stout...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / LogcatActivity.java
index 8e54bb43a119d6e16c5d9e425d1d0e2854650f6b..78d203dac4f8b28ec6370294f0f585122db90c6a 100644 (file)
@@ -72,8 +72,9 @@ public class LogcatActivity extends AppCompatActivity implements SaveDialog.Save
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
 
-        // Get the screenshot preference.
+        // Get the preferences.
         boolean allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false);
+        boolean bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false);
 
         // Disable screenshots if not allowed.
         if (!allowScreenshots) {
@@ -87,7 +88,11 @@ public class LogcatActivity extends AppCompatActivity implements SaveDialog.Save
         super.onCreate(savedInstanceState);
 
         // Set the content view.
-        setContentView(R.layout.logcat_coordinatorlayout);
+        if (bottomAppBar) {
+            setContentView(R.layout.logcat_coordinatorlayout_bottom_appbar);
+        } else {
+            setContentView(R.layout.logcat_coordinatorlayout_top_appbar);
+        }
 
         // Get handles for the views.
         Toolbar toolbar = findViewById(R.id.logcat_toolbar);