fix(android): fix Material3 BottomNavigation height#14110
Merged
hansemannn merged 5 commits intomasterfrom Nov 9, 2024
Merged
Conversation
hansemannn
requested changes
Sep 16, 2024
...modules/ui/src/java/ti/modules/titanium/ui/widget/tabgroup/TiUIBottomNavigationTabGroup.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
This will just add a note to the docs now. As many people still use the old M2 themes and I've started a rewrite of the BottomNavigation in a different PR it should be enough for now. If you use a M3 theme you have to add the XML file with the height yourself |
Collaborator
|
It can only be seen as a workaround, as we definitely need the "clean" solution from the other PR |
hansemannn
approved these changes
Nov 9, 2024
Collaborator
hansemannn
left a comment
There was a problem hiding this comment.
Using this one until the new bottom nav is finished.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_heightfor 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.xmlwithto override the current value.