Files
brave-core/android/java/org/chromium
Serg 3c40cb1d47 [Android][Origin] Reclaim toolbar space when the rewards icon is hidden on tablet (#36975)
On tablet the rewards (BAT) icon lives in the brave_toolbar row, a
wrap_content LinearLayout that caches its measured width. When the icon
is hidden from onMeasure (e.g. when Brave Origin disables rewards), the
implicit requestLayout() from setVisibility() is dropped because the
toolbar is already mid-layout, so the row keeps its old width and the
weighted location bar never reclaims the freed space, leaving a gap
until a device rotation forces a fresh layout.

Route all rewards-slot visibility changes through a helper that, on an
actual change on tablet, re-requests layout on the rewards view itself
(so its row re-measures) off the measure pass, and refreshes the cached
tablet toolbar snapshot.

Resolves: https://github.com/brave/brave-browser/issues/56036
2026-06-03 19:15:36 -04:00
..