Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to view default android simple_spinner_dropdown_item style

Often i like default android style defined for some widget.

Often i like to just slightly modify this default style, not create my own style from a scratch.

Now, i use android.R.layout.simple_spinner_dropdown_item as dropDownViewResource on my spinner adapter - like this:

adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

I can open this layout xml file and copy its content to modify it. But the most important part of that xml file is attribute style, it looks like this: style="?android:attr/spinnerDropDownItemStyle"

Now, my question is: how do i find/view/copy this style spinnerDropDownItemStyle, so i can for example just change background color.

Thanx for your help

like image 971
hendrix Avatar asked Mar 28 '12 16:03

hendrix


1 Answers

here you can find style spinnerDropDownItemStyle:

https://github.com/android/platform_frameworks_base/blob/master/core/res/res/values/themes.xml

But, if you looking for change background of Spinner, you'll need to search for 9 patch images:

https://developer.android.com/studio/write/draw9patch.html

And here a good example:

http://www.gersic.com/blog.php?id=57

Ty

like image 149
Rodrigo Avatar answered Nov 15 '22 02:11

Rodrigo