[Android] Fix for custom tab menu position (#29697)

This commit is contained in:
samartnik
2025-06-23 12:40:44 -04:00
committed by GitHub
parent 3dbf994e0f
commit e45eddf0fd
@@ -1519,7 +1519,8 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
BraveMenuButtonCoordinator.setMenuFromBottom(
isMenuButtonOnBottomControls()
|| BottomToolbarConfiguration.isToolbarBottomAnchored());
|| isToolbarPhone()
&& BottomToolbarConfiguration.isToolbarBottomAnchored());
}
public void updateWalletBadgeVisibility(boolean visible) {
@@ -1528,10 +1529,12 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
}
public void updateMenuButtonState() {
// No need to change the state if bottom controls are not enabled.
if (!BottomToolbarConfiguration.isBraveBottomControlsEnabled()) return;
BraveMenuButtonCoordinator.setMenuFromBottom(mIsBottomControlsVisible);
if (BottomToolbarConfiguration.isBraveBottomControlsEnabled()) {
BraveMenuButtonCoordinator.setMenuFromBottom(mIsBottomControlsVisible);
} else {
BraveMenuButtonCoordinator.setMenuFromBottom(
isToolbarPhone() && BottomToolbarConfiguration.isToolbarBottomAnchored());
}
}
@Override
@@ -1589,4 +1592,8 @@ public abstract class BraveToolbarLayoutImpl extends ToolbarLayout
}
}
}
private boolean isToolbarPhone() {
return BraveReflectionUtil.equalTypes(this.getClass(), ToolbarPhone.class);
}
}