Vistari
Vistari

Reputation: 707

How to change the background colour of the spinner on the aciton bar

I'm working on an android app and have come across an issue, I have managed to get the list items on the action bar to highlight to the color i want but the 'spinner' area around the item is staying the default blue, does anyone know how i can change this color?

image

Upvotes: 1

Views: 218

Answers (3)

Vistari
Vistari

Reputation: 707

I've fixed it!

I used this website which allows you set colors etc. for your action bar and then you just put them in your drawables folder and link it up with the style sheet.

I'm not sure if its the cleanest fix but it works.

http://jgilfelt.github.io/android-actionbarstylegenerator/

Upvotes: 1

Anton Bevza
Anton Bevza

Reputation: 463

Try this: (without Sherlok)

<style name="Theme.MyTheme" parent="@style/YourTheme">
    <item name="android:selectableItemBackground">@drawable/ab_selector</item>
    <item name="android:actionBarWidgetTheme">@style/WidgetStyle</item>
</style>

<style name="WidgetStyle" parent="Widget">
    <item name="android:itemBackground">@drawable/ab_menu_selector</item>
</style>

Upvotes: 0

TronicZomB
TronicZomB

Reputation: 8747

Try using android:background within your spinner.

Upvotes: 0

Related Questions