最近项目用到jetpack组件,首页底部导航栏 BottomNavigationView 自带动画效果,如何去掉效果。
1.stylen创建
<! --没有选中的样式-->
< style name="bottom_normal_text">
< item name="android:textColor">@color/font_hint< /item>
< item name="android:textSize">14sp< /item>
< /style>
< !--选中的样式-->
< style name="bottom_selected_text">
< item name="android:textColor">@color/colorPrimary< /item>
< item name="android:textSize">14sp< /item>
< /style>
2.修改xml
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="0dp&