tor-browser

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

commit 6b0ded1484eac226c37a4fe456ab94110aca3f34
parent dd3c500a9dd8970a8858d0464e41080b3f1c2316
Author: Mugurell <Mugurell@users.noreply.github.com>
Date:   Wed, 12 Nov 2025 15:40:52 +0000

Bug 1998100 - part 2 - Ensure the right bottom padding depending on the top View based toolbar r=android-reviewers,Roger

This is an old bug stemming from the act that home Views are not shown in a
vertical layout group but rather independent from each other so they need
custom padding set to ensure a consistent UI.
(Fix/issue can be observed more easily if the tabstrip is also enabled)

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

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/toolbar/HomeToolbarView.kt | 18+++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/toolbar/HomeToolbarView.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/toolbar/HomeToolbarView.kt @@ -224,14 +224,18 @@ internal class HomeToolbarView( context.theme.resolveAttribute(R.attr.bottomBarBackgroundTop), ) + val topPadding = context.pixelSizeFor(R.dimen.home_fragment_top_toolbar_header_margin) + + if (isTabletAndTabStripEnabled) { + context.pixelSizeFor(R.dimen.tab_strip_height) + } else { + 0 + } + homeBinding.homeAppBar.updateLayoutParams<ViewGroup.MarginLayoutParams> { - topMargin = - context.pixelSizeFor(R.dimen.home_fragment_top_toolbar_header_margin) + - if (isTabletAndTabStripEnabled) { - context.pixelSizeFor(R.dimen.tab_strip_height) - } else { - 0 - } + topMargin = topPadding + } + homeBinding.homepageView.updateLayoutParams<ViewGroup.MarginLayoutParams> { + bottomMargin = topPadding } }