当我选择文本时,会出现一个白条,并覆盖我的应用程序的操作栏。
我尝试使用以下代码将副本的颜色从白色更改为橙色:
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="actionBarStyle">@style/CustomActionBar</item>
<item name="displayOptions">homeAsUp</item>
</style>
<style name="CustomActionBar">
<item name="android:background">@color/orange_star</item>
</style>
但无效。
我无法上传图片,因为我的声誉低于10。
答案 0 :(得分:1)
试试这个。
<style name="AppTheme" parent="AppBaseTheme">
<item name="actionBarStyle">@style/CustomActionBar</item>
<item name="android:actionModeBackground">@drawable/actionbar_background</item>
<item name="actionModeBackground">@drawable/actionbar_background</item>
</style>
actionModeBackground
标记用于更改上下文操作栏的背景颜色。
我希望它有所帮助!