如何在Android中修复BottomBar?

时间:2017-08-14 14:25:04

标签: android android-layout android-bottomnav

this is my bottom bar and i want to make it fixed without this animation

我的导航代码

<android.support.design.widget.BottomNavigationView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/windowBackground"
    app:menu="@menu/navigation"
    app:tabMode="fixed"


    android:backgroundTint="#F0F0F0"
    app:itemBackground="@color/white"
    app:itemIconTint="@color/colorPrimary"
    app:itemTextColor="@color/colorPrimary"

    />

1 个答案:

答案 0 :(得分:0)

选择时菜单图标会移动一点。解决此问题最简单的方法是使用BottomNavigationViewEx库。

enter image description here