答案 0 :(得分:1)
尝试在主题中添加 actionModeBackground
<item name="actionModeBackground">@color/yourcolor</item>
例如,
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground" >@android:color/white</item>
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="actionModeBackground">@color/yourcolor</item>
</style>
答案 1 :(得分:0)
<item name="windowNoTitle">true</item>
<item name="windowActionBar">true</item>
s onCreate method add this
setSupportActionBar(myToolbar)`