material-components / material-components/material-components-android
[BottomNavigationView] Bottom Navigation View Sizing
@hunterstich is already working on this.
Since May 17, 2022.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
In order to try to keep consistency across devices densities I use Smallest Width folders.
For the `BottomNavigationView` I set a `height of 56dp`, an `itemIconSize of 24dp` and a `textSize of 12sp`.
In order to test it I change the Smallest Width Available in my device, as I the `sw` size, the `bnb` overlaps the icon with the text, seems like the parent view of each item is not resizing accordingly as you can see from the screenshot with "Show Layout Bounds" enabled, while the icon and text sizes looks I expect.
In the screenshot I'm using:
- sw360dp as a baseline:
- bnb height: 56dp
- icon: 24dp
- text size: 12sp
- sw480dp:
- bnb height: 74.67dp
- icon: 32dp
- text size: 16sp
- sw720dp:
- bnb height: 112dp
- icon: 48dp
- text size: 24sp
Is there anyway to access the `design_bottom_navigation_item` to modify its layout params? as by looking a the screenshots, seems like it has a fixed height, that causes the icon/text overlaping.
or how can I avoid this?

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.