Android ContextMenu 如何设置TextColor 和背景颜色?

标签 android contextmenu

我需要更改上下文菜单中文本的颜色。我尝试使用@style,但不起作用。我检查了帖子:Setting Application theme textColor to white causes Context Menu item text to be white (invisible) , cause de doubt is simillar,但没有不工作。有人可以帮助我或告诉我不可能改变颜色吗?

谢谢。

最佳答案

   <style name= "Theme.Blundell.Light" parent="@android:style/Theme.NoTitleBar">
     <item name="android:windowBackground">@drawable/background_light</item>
     <item name="android:textViewStyle">@style/Widget.TextView.Black</item>
   </style>

   <style name="Widget.TextView.Black" parent="@android:style/Widget.TextView">
       <item name="android:textColor">#000000</item>
   </style>

关于Android ContextMenu 如何设置TextColor 和背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17915337/

相关文章:

wpf - 将按钮单击事件上的WPF上下文菜单更改为MVVM

android - 如何在带有协调器父级的滚动回收器 View 上显示/隐藏 FAB

android - Admob 需要 api-13 或更高版本 我不能在旧的 API-8 手机上部署吗?

android: 如何收听 "sd card removed unexpectedly"

android - CSS 新手 : CSS not rendering on Android but does render with Visual Studio Ripple Virtual Nexus (Galaxy)

python - 如何为 QListWidget 中的每个项目制作上下文菜单?

javascript - 2 页面上的 jQuery.contextMenu 具有不同的触发器

android - 有没有办法检测 contextMenu 在 android 中是否打开?

cocoa - 右键单击 NSStatusItem

android - react-native-video Undefined 不是一个对象(评估'_reactNative ...)