1

I have changed my icon's size but the title isn't fitting within the icon and is looking like this. The icon size is 40dp.

Here is my code:

       <android.support.design.widget.BottomNavigationView
          android:id="@+id/navigationBar"
          android:layout_gravity="fill"
          android:layout_width="match_parent"
          android:layout_height="100dp"
          app:itemIconTint="@drawable/bottom_navigation_selection"
          app:itemTextColor="@drawable/bottom_navigation_selection"
          app:menu="@menu/bottom_navigation"
          android:background="@color/appBar"/>

and here is my dimens.xml:

    <dimen name="design_bottom_navigation_icon_size" tools:override="true">50dp</dimen>
    <dimen name="design_bottom_navigation_item_max_width" tools:override="true">600dp</dimen>
    <dimen name="design_bottom_navigation_active_item_max_width" tools:override="true">600dp</dimen>

I hope you guys can help me find a solution. Thanks.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Alun
  • 149
  • 1
  • 9
  • check this https://stackoverflow.com/questions/43363568/how-to-increase-icon-size-in-android-bottom-navigation-layout – Mina George Jun 26 '19 at 08:40

1 Answers1

0

Add the following line in your BottomNavigationView:

app:labelVisibilityMode="labeled"

Example:

  <android.support.design.widget.BottomNavigationView
        android:id="@+id/navigation"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@color/colorPrimaryDark"
        android:textSize="@dimen/tv_text_very_small"
        app:itemTextAppearanceActive="@style/BottomNavigationView.Active"
        app:itemTextAppearanceInactive="@style/BottomNavigationView"
        app:itemIconTint="#000000"
        app:itemTextColor="#000000"
        app:labelVisibilityMode="labeled"
        app:menu="@menu/bottom_tabs" />
Nikhat Shaikh
  • 3,175
  • 1
  • 16
  • 21