Long text cutting off in BottomNavigationView
See original GitHub issueOverview
Long texts cut off in BottomNavigationView only when tab is selected. When tab is unselected, it displays the text properly
When tab is unselected (Meine tickets)
When tab is selected (Meine tickets)
Reproduction steps
- Setup bottom navigation view with 5 menu items with titles as: “Starseite”, “Suchen”, “Meine Tickets”, “Verkaufen”, “Profil”
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_home"
android:icon="@drawable/tab_home_icon_selector"
android:title="@string/nav_tab_home"/>
<item
android:id="@+id/action_explore"
android:icon="@drawable/tab_explore_icon_selector"
android:title="@string/nav_tab_explore"/>
<item
android:id="@+id/action_my_tickets"
android:icon="@drawable/tab_tickets_icon_selector"
android:title="@string/nav_tab_my_tickets"/>
<item
android:id="@+id/action_sell"
android:icon="@drawable/tab_sell_icon_selector"
android:title="@string/nav_tab_sell"/>
<item
android:id="@+id/action_profile"
android:icon="@drawable/tab_profile_icon_selector"
android:title="@string/nav_tab_profile"/>
</menu>
- View style is:
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/home.navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:labelVisibilityMode="labeled"
app:menu="@menu/home"/>
Version number
- Found in version 1.0.0-alpha3
Operating system and device
- Found in Nexus 5X emulator running Android Oreo
Issue Analytics
- State:
- Created 5 years ago
- Reactions:15
- Comments:35 (2 by maintainers)
Top Results From Across the Web
[BottomNavigationView] Long text cutting off in ... - Issue Tracker
In short, bolding of a label when a tab is selected is causing text to disappear. Issue summary.
Read more >Android BottomNavigationView Truncating Text - Stack Overflow
Is there a way to disable BottomNavigationView's implementation of slighting enlarging the text/icon of a selected item? Thanks, Otterman.
Read more >Control Text Size on Android Bottom Navigation View
Easily set a static text size for your tabs when using Bottom Navigation View.
Read more >Some tips to a better experience working with Android's ...
BottomNavigationView creates bottom navigation bars, making it easy to explore and switch between top-level content views with a single tap.
Read more >Bottom navigation - Material Design
The labelVisibilityMode attribute can be used to adjust the behavior of the text labels for each navigation item. There are four visibility modes:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please add this property in your Xml app:labelVisibilityMode=“selected”
Use @sagrawal2418 answer:
in combination with @DhanalakshmiS answer, it works perfectly. There’s no padding at all and text remains the same: