Custom TextSize of BottomNavigationView support android

android, android-support-library, androiddesignsupport

Solution

Unfortunately this first version of BottomNavigationView came with a lot of limitations. And for now you can't change titles size just using the support design API. So to solve this limitation while google doesn't implement it, you can do:

In your dimen.xml you can put:

    <dimen name="design_bottom_navigation_text_size" tools:override="true">30sp</dimen>
    <dimen name="design_bottom_navigation_active_text_size" tools:override="true">30sp</dimen>

Doing this you are overriding the default value of dimen that the internal classes of BottomNavigationView use. So be carreful.

Problem

I am trying to change the textSize of BottomNavigationView from android support library 25.0.0 ``` <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:background="@color/colorPrimaryDark" android:foregroundTint="@color/colorAccent" app:itemIconTint="@android:color/white" app:itemTextColor="@android:color/white" app:layout_anchor="@id/lyt_container" app:layout_anchorGravity="bottom" app:itemTextAppearance="@style/TextStyleBNV" app:menu="@menu/nav_menu" /> <style name="TextStyleBNV"> <item name="android:textSize">@dimen/twelve_sp</item> <item name="android:padding">0dp</item> <item name="textAllCaps">false</item> </style> ``` Is there anything i am missing.

Original source

Related problems