How to increase the bottom navigation View height along with its icons and text sizes in android?

I use

compile 'com.android.support:design:25.0.0'

Android Bottom Navigation View and its height are fixed and small icons with small text are displayed. My question is, how can I increase their size? I tried to resize the xmlfile through the style ... all other properties work except the property textsize.

Can I do it pragmatically, if so, please write the code

+9
source share
5 answers

dimen dimens.xml, , . . , :-)

<!-- Overriding Default Bottom Navigation sizes-->
    <dimen name="design_bottom_navigation_text_size" tools:override="true">16sp</dimen>
    <dimen name="design_bottom_navigation_active_text_size" tools:override="true">20sp</dimen>
    <dimen name="design_bottom_navigation_height" tools:override="true">70dp</dimen>
+25

RamshaS , . ,

bottom_navigation_elevation
bottom_navigation_height
bottom_navigation_icon
bottom_navigation_margin_bottom
bottom_navigation_margin_top_active
bottom_navigation_margin_top_inactive
bottom_navigation_max_width
bottom_navigation_min_width
bottom_navigation_notification_elevation
bottom_navigation_notification_height
bottom_navigation_notification_margin_left
bottom_navigation_notification_margin_left_active
bottom_navigation_notification_margin_top
bottom_navigation_notification_margin_top_active
bottom_navigation_notification_margin_top_classic
bottom_navigation_notification_padding
bottom_navigation_notification_radius
bottom_navigation_notification_text_size
bottom_navigation_notification_width
bottom_navigation_padding_left
bottom_navigation_padding_right
bottom_navigation_small_active_max_width
bottom_navigation_small_active_min_width
bottom_navigation_small_inactive_max_width
bottom_navigation_small_inactive_min_width
bottom_navigation_small_margin_bottom
bottom_navigation_small_margin_top
bottom_navigation_small_margin_top_active
bottom_navigation_small_selected_width_difference
bottom_navigation_text_size_active
bottom_navigation_text_size_forced_active
bottom_navigation_text_size_forced_inactive
bottom_navigation_text_size_inactive
+12

, dimens.xml, @RamshaS,

design_bottom_navigation_active_item_max_width
design_bottom_navigation_active_text_size
design_bottom_navigation_elevation
design_bottom_navigation_height
design_bottom_navigation_item_max_width
design_bottom_navigation_item_min_width
design_bottom_navigation_margin
design_bottom_navigation_shadow_height
design_bottom_navigation_text_size
design_bottom_navigation_item_background
design_bottom_navigation_item
design_bottom_navigation_shadow_color

@Kobus Pitzer, dimens.xml . , , , dimens.xml

+4

<dimen name="design_bottom_navigation_active_item_max_width">168dp</dimen>
<dimen name="design_bottom_navigation_active_item_min_width">96dp</dimen>
<dimen name="design_bottom_navigation_active_text_size">14sp</dimen>
<dimen name="design_bottom_navigation_elevation">8dp</dimen>
<dimen name="design_bottom_navigation_height">56dp</dimen>
<dimen name="design_bottom_navigation_icon_size">24dp</dimen>
<dimen name="design_bottom_navigation_item_max_width">96dp</dimen>
<dimen name="design_bottom_navigation_item_min_width">56dp</dimen>
<dimen name="design_bottom_navigation_margin">8dp</dimen>
<dimen name="design_bottom_navigation_shadow_height">1dp</dimen>
<dimen name="design_bottom_navigation_text_size">12sp</dimen>
<color name="design_bottom_navigation_shadow_color">#14000000</color>
+3

I used scaleX and scaleY in the BottomNavigationView with the addition of start and end padding to set the bottom icons to the desired position. Solves the problem of icons and text size for screens of different sizes.

0
source

Source: https://habr.com/ru/post/1666060/


All Articles