Android 为BottomNavigationView着色时的高程问题

Android 为BottomNavigationView着色时的高程问题,android,material-design,android-bottomnav,Android,Material Design,Android Bottomnav,我想用标高实现彩色底部导航视图(当前设计库版本25.2.0,测试设备7.1.2)。启动的一些代码: <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_align

我想用
标高
实现彩色
底部导航视图
(当前设计库版本25.2.0,测试设备7.1.2)。启动的一些代码:

<android.support.design.widget.BottomNavigationView
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_gravity="bottom"
    android:elevation="8dp"
    app:elevation="8dp"
    app:menu="@menu/bottom_navigation" />
但我想为背景和白色图标和文本设置一些颜色。。。下面的行

    app:itemIconTint="@color/white"
    app:itemTextColor="@color/white"
整个酒吧是纯白的,包括内容,明显。。。因此,如果
background
必须为白色,那么让我们使用

    app:itemBackground="@drawable/bottom_navigation_item_background"
可拉深/

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@color/mycolor_dark"/>
    <item android:drawable="@color/mycolor"/>
</selector>
绘制的条形图完全没有标高,但当我按下任何菜单项时,其背景将变为白色,并且。。。此项目上方有标高,仅此项目

当我从drawable-v21/XML文件中删除
行(或将
mycolor
设置为白色)时,将显示高程。波纹颜色没有影响,它可能是白色或任何其他(工作)

问题是:如何使用自定义颜色设置
BottomNavigationView
的样式,以使背景保持立面工作?

为了使用我的应用程序颜色,我使用了
app:theme=“@style/AppTheme.PopupOverlay”
。它们会自动设置为它们。 例如,如果主颜色为绿色,图标和文本将显示为绿色。 您需要保持白色背景和立面…

我使用了
app:theme=“@style/AppTheme.PopupOverlay”
来使用我的应用程序颜色。它们会自动设置为它们。 例如,如果主颜色为绿色,图标和文本将显示为绿色。 您需要保持白色背景和标高

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@color/mycolor_dark"/>
    <item android:drawable="@color/mycolor"/>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="@android:color/white">
    <item android:drawable="@color/mycolor"/>
</ripple>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true" android:drawable="@android:color/white"/>
    <item android:drawable="@color/mycolor"/>
</selector>