tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f19f8106e228aa9344ae14fced4cc788599cf1bc
parent 451979278c24abac24eb482e75cfe9e41c4bbec6
Author: RebecaTudor <rebecatudor273@gmail.com>
Date:   Mon, 13 Oct 2025 09:08:51 +0000

Bug 1984060 - Part 1 - Don't show pager indicator for small screens. r=android-reviewers,gmalekpour,twhite

For onboarding screen we are not gonna display the pagination dots
for small screen devices.

Differential Revision: https://phabricator.services.mozilla.com/D266167

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/redesign/view/OnboardingScreenRedesign.kt | 25++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/redesign/view/OnboardingScreenRedesign.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/redesign/view/OnboardingScreenRedesign.kt @@ -72,6 +72,10 @@ import org.mozilla.fenix.onboarding.view.mapToOnboardingPageState import org.mozilla.fenix.theme.FirefoxTheme import org.mozilla.fenix.utils.isLargeScreenSize +/** + * The small device max height. The value comes from [org.mozilla.fenix.ext.isTallWindow]. + */ +private val SMALL_SCREEN_MAX_HEIGHT = 480.dp private val logger: Logger = Logger("OnboardingScreenRedesign") /** @@ -271,6 +275,7 @@ private fun OnboardingContent( BoxWithConstraints(modifier = Modifier.fillMaxSize()) { val boxWithConstraintsScope = this + val isSmallPhoneScreen = boxWithConstraintsScope.maxHeight <= SMALL_SCREEN_MAX_HEIGHT val isLargeScreen = LocalContext.current.isLargeScreenSize() val isLandscape = LocalConfiguration.current.orientation == Configuration.ORIENTATION_LANDSCAPE @@ -333,15 +338,17 @@ private fun OnboardingContent( Spacer(Modifier.weight(1f)) - PagerIndicator( - pagerState = pagerState, - activeColor = FirefoxTheme.colors.actionPrimary, - inactiveColor = FirefoxTheme.colors.actionSecondary, - leaveTrail = true, - modifier = Modifier - .align(Alignment.CenterHorizontally) - .padding(bottom = 16.dp), - ) + if (!isSmallPhoneScreen) { + PagerIndicator( + pagerState = pagerState, + activeColor = FirefoxTheme.colors.actionPrimary, + inactiveColor = FirefoxTheme.colors.actionSecondary, + leaveTrail = true, + modifier = Modifier + .align(Alignment.CenterHorizontally) + .padding(bottom = 16.dp), + ) + } } } }