X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Factivities%2FGuideActivity.kt;h=624ba5afa95f920c702b36583e9aee6998d06d48;hb=HEAD;hp=e421586b76e12ceb148f03246a2c5df7f7eee27e;hpb=5dd60cebd26469bcc597e1ccede8706fb403dfc1;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.kt b/app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.kt index e421586b..624ba5af 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/activities/GuideActivity.kt @@ -1,7 +1,7 @@ /* - * Copyright 2016-2023 Soren Stoutner . + * Copyright 2016-2024 Soren Stoutner . * - * This file is part of Privacy Browser Android . + * This file is part of 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(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.