fix(android): fix Material3 BottomNavigation height #14110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New PR:
I've only add the note in the docs as I've started a rewrite of the BottomNavigation in another PR.
Old PR (just as a reference):
SO issue in native land: https://stackoverflow.com/questions/72062902/how-do-i-get-the-bottom-navigation-bar-height-for-material-design-3 and some screenshots.
Currently we use
design_bottom_navigation_height
for the height of the bottom navigation (56dp). It looks like Material 3 is usingm3_bottom_nav_min_height
(80dp).We need to check if the app is using a Material3 theme and then use the new dimens value.
Test
Yellow text field should be fully visible in the tab.
Questions:
Can we use
activity.getTheme().toString().indexOf("Material3")
to check for Material3 theme?Workaround
If you use M3 in your app you can add
/app/platform/android/res/values/dimens.xml
withto override the current value.