X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FViewSourceActivity.kt;h=b2d50e7c79e96f56fc15c82a51588d73aadd95ff;hp=eb8ba87cc0a3147738c6c7276eb1e1fb7d10211f;hb=cd609c9888924549c03cd6509ed889cdb052d5bb;hpb=aa121d6d6df14a0425ac3b5603765dbae7e8d156 diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.kt b/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.kt index eb8ba87c..b2d50e7c 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/ViewSourceActivity.kt @@ -82,8 +82,9 @@ class ViewSourceActivity: AppCompatActivity(), UntrustedSslCertificateListener { // Get a handle for the shared preferences. val sharedPreferences = PreferenceManager.getDefaultSharedPreferences(applicationContext) - // Get the screenshot preference. + // Get the preferences. val allowScreenshots = sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false) + val bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false) // Disable screenshots if not allowed. if (!allowScreenshots) { @@ -104,7 +105,11 @@ class ViewSourceActivity: AppCompatActivity(), UntrustedSslCertificateListener { val userAgent = intent.getStringExtra(USER_AGENT)!! // Set the content view. - setContentView(R.layout.view_source_coordinatorlayout) + if (bottomAppBar) { + setContentView(R.layout.view_source_coordinatorlayout_bottom_appbar) + } else { + setContentView(R.layout.view_source_coordinatorlayout_top_appbar) + } // Get a handle for the toolbar. val toolbar = findViewById(R.id.view_source_toolbar)