Reputation: 70416
I try to change the default color of the popup menu by using styles:
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:popupMenuStyle">@style/PopUp</item>
</style>
<style name="PopUp" parent="@android:style/Widget.PopupMenu">
<item name="android:popupBackground">@color/white</item>
</style>
I have hooked up this theme in app manifest.
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19"/>
<application
android:name=".MyApplication"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
However this does not change the default grey background of the popup. Any ideas whats wrong?
Upvotes: 2
Views: 4602
Reputation: 70416
I changed
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:popupMenuStyle">@style/PopUp</item>
</style>
to
<style name="AppTheme" parent="android:Theme.Holo.Light">
<item name="android:popupMenuStyle">@style/PopUp</item>
</style>
now it works. However it seems that using android:Theme.Holo.Light.DarkActionBar you cannot change the style of the popup through xml.
Upvotes: 1