disable welcome screen page switch with dots
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 2s
All checks were successful
Auto Tag on Version Change / check-version (push) Successful in 2s
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user