Let's see,
i know how to change the style of a ListView (the orange color when an item is selected):
android:listSelector="@drawable/xxx" and a drawable with a bitmap or a @color
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/image" />
<item android:drawable="@android:color/transparent" />
</selector>
The thing is, in order to have a coherent design, i have to do the same thing for a context menu but i just can't see where to change it. There is no listSelector, nothing to change.
Here is how you do it. Go to resources > styles.xml and override the theme's itemBackgroud attribute value as follows:
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="android:itemBackground">"YOUR_COLOUR_HERE"</item>
</style>
If this doesn't work, check in AndroidManifet.xml that you are really using the same theme at App level:
<application
...
android:theme="@style/AppTheme">
...
</application>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With