I tried setting elevation from xml and programmatically both. But nothing works.
仅当您在 BottomNavigationView 中将白色设置为 android:background 时,它才有效。
这是我的代码并且它正在工作:
<android.support.design.widget.BottomNavigationView
android:id="@+id/bottom_navigation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/white"
app:elevation="8dp"
app:itemIconTint="@color/bottom_color_state"
app:itemTextColor="@color/bottom_color_state"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.52"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_navigation_main" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)