6

I'm trying to make the icons in a bottom navigation view lower. For example, right now they are pressed against the top line like this.

See image here

How would I make the icon lower? I want them to be centered vertically in the bottom navigation view.

xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.jchousurface.mastertrack.homescreen">

<FrameLayout
    android:id="@+id/content"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_weight="1">
</FrameLayout>

<android.support.design.widget.BottomNavigationView
    android:id="@+id/navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:background="#FFFFFF"
    app:menu="@menu/navigation" />

</LinearLayout>
Jeffrey Chou
  • 331
  • 2
  • 4
  • 15

2 Answers2

3

use

bottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED);

or

app:labelVisibilityMode="unlabeled"
UgAr0FF
  • 805
  • 8
  • 18
0

change attribute android:layout_height="40dp" or lower in BottomNavigationView