disable welcome screen page switch with dots
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 2s

This commit is contained in:
2026-05-18 23:36:31 +05:00
parent 2dd84ec50a
commit 1a58ce8b54

View File

@@ -30,6 +30,15 @@ class OnboardingActivity : AppCompatActivity(), SecuritySetupFragment.Callback {
binding.viewPager.adapter = adapter
TabLayoutMediator(binding.dotsIndicator, binding.viewPager) { _, _ -> }.attach()
// Disable tap-to-navigate on dots: touch listener must be on the individual
// tab views inside SlidingTabStrip (child 0), because they consume ACTION_DOWN
// before the TabLayout's own touch listener ever fires.
val tabStrip = binding.dotsIndicator.getChildAt(0) as? android.view.ViewGroup
tabStrip?.let {
for (i in 0 until it.childCount) {
it.getChildAt(i).setOnTouchListener { _, _ -> true }
}
}
// Pre-select language button without triggering the listener
val savedLang = prefs.getString("language", null)