我正在尝试降低底部导航 View 中的图标。例如,现在他们像这样被压在顶线上。
如何降低图标?我希望它们在底部导航 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>
最佳答案
使用
bottomNavigationView.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED);
或
app:labelVisibilityMode="unlabeled"
关于android - 删除底部导航 View 中图标的填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44856730/