10

Good Morning,

i am using bottom navigation view to do my bottom menu.

and now the title is too big and i can't found any solution to solve it

enter image description here

JsLaw
  • 153
  • 1
  • 2
  • 16

3 Answers3

35
  1. Open values\dimens.xml
  2. add this code

    <dimen 
          name="design_bottom_navigation_text_size"   
          tools:override="true">11sp </dimen>
    
    <dimen 
          name="design_bottom_navigation_active_text_size" 
          tools:override="true">12sp </dimen>
    
Aditya
  • 3,115
  • 1
  • 25
  • 34
A.G.THAMAYS
  • 2,918
  • 25
  • 31
6
 <com.google.android.material.bottomnavigation.BottomNavigationView
        android:id="@+id/bottom_navigation"
        android:layout_width="match_parent"
        android:layout_height="64dp"
        android:layout_gravity="bottom"
        android:background="@color/bg_grey"
      app:itemTextAppearanceActive="@style/BottomNavigationView.Active"
        app:itemTextAppearanceInactive="@style/BottomNavigationView"
        app:itemTextColor="@color/bottom_nav_color"
        app:labelVisibilityMode="labeled"
        app:menu="@menu/bottom_navigation_menu" />

styles.xml

<style name="BottomNavigationView" parent="@style/TextAppearance.AppCompat.Caption">
    <item name="android:textSize">10sp</item>
</style>

<style name="BottomNavigationView.Active" parent="@style/TextAppearance.AppCompat.Caption">
    <item name="android:textSize">11sp</item>
Raviraj
  • 786
  • 8
  • 14
-1

Create new style

<style name="NavigationViewOwnStyle">
 <item name="android:listPreferredItemHeightSmall">40dp</item><!-item height-->
 <item name="android:textSize">20sp</item> <!--item text size-->
</style>

and apply

<android.support.design.widget.NavigationView
    ...
    ...
    app:itemTextAppearance="@style/NavigationViewOwnStyle"
    ...
    ...
 />
Israel
  • 376
  • 2
  • 11