I want to change the background color of the spinner. But when I am changing the background of the spinner using the following code in the XML-- android:background="#000000". I am able to change the background but the arrow that is displayed at the right side of the spinner view disapears. Is there any other way to change the backgroundof the spinner without loosing the arrow???
Add this theme to you spinner:
values/styles.xml
<resources>
<style name="MyTheme">
<item name="android:spinnerStyle">@style/StandardSpinner</item>
</style>
</resources>
<style name="StandardSpinner" parent="@android:style/Widget.Spinner">
<item name="android:background">@drawable/spinner</item>
</style>
Also look at these :
http://android-er.blogspot.com/2010/12/custom-spinner-with-icon.html
http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/
http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog
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