Skip to content

Commit b6667d1

Browse files
committed
Bug 1983565 - Part 5: Add minimum sizes for page content r=android-reviewers,rebecatudor273
Differential Revision: https://phabricator.services.mozilla.com/D263355
1 parent aa41991 commit b6667d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mobile/android/fenix/app/src/main/java/org/mozilla/fenix/onboarding/redesign/view/OnboardingScreenRedesign.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,19 @@ private fun OnboardingPageForType(
389389
}
390390

391391
private object PageContentLayout {
392+
val MIN_HEIGHT_DP = 600.dp
393+
val MIN_WIDTH_DP = 360.dp
392394
const val HEIGHT_RATIO = 0.8f
393395
const val WIDTH_RATIO = 0.85f
394396
}
395397

396398
private fun pageContentHeight(scope: BoxWithConstraintsScope) =
397399
scope.maxHeight.times(PageContentLayout.HEIGHT_RATIO)
400+
.coerceAtLeast(PageContentLayout.MIN_HEIGHT_DP)
398401

399402
private fun pageContentWidth(scope: BoxWithConstraintsScope) =
400403
scope.maxWidth.times(PageContentLayout.WIDTH_RATIO)
404+
.coerceAtLeast(PageContentLayout.MIN_WIDTH_DP)
401405

402406
private class DisableForwardSwipeNestedScrollConnection(
403407
private val pagerState: PagerState,

0 commit comments

Comments
 (0)