]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.kt
First wrong button text in View Headers in night theme. https://redmine.stoutner...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / activities / GuideActivity.kt
index e421586b76e12ceb148f03246a2c5df7f7eee27e..624ba5afa95f920c702b36583e9aee6998d06d48 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright 2016-2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2016-2024 Soren Stoutner <soren@stoutner.com>.
  *
- * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
  *
  * Privacy Browser Android is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -43,19 +43,17 @@ class GuideActivity : AppCompatActivity() {
         val bottomAppBar = sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)
 
         // Disable screenshots if not allowed.
-        if (!allowScreenshots) {
+        if (!allowScreenshots)
             window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
-        }
 
         // Run the default commands.
         super.onCreate(savedInstanceState)
 
         // Set the content view.
-        if (bottomAppBar) {
+        if (bottomAppBar)
             setContentView(R.layout.guide_bottom_appbar)
-        } else {
+        else
             setContentView(R.layout.guide_top_appbar)
-        }
 
         // Get handles for the views.
         val toolbar = findViewById<Toolbar>(R.id.guide_toolbar)
@@ -77,6 +75,9 @@ class GuideActivity : AppCompatActivity() {
         // Set the view pager adapter.
         guideViewPager2.adapter = guideStateAdapter
 
+        // Disable swiping between pages in the view pager.
+        guideViewPager2.isUserInputEnabled = false
+
         // Create a tab layout mediator.  Tab numbers start at 0.
         TabLayoutMediator(guideTabLayout, guideViewPager2) { tab, position ->
             // Set the tab text based on the position.