Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Android Spinner Layout/Design

Tags:

android

I am trying to modify the design of Spinner widget. I can change the background, but I can't find a way to change the arrow icon on the right side. Is there a way to do it?

Thanks!

like image 585
LambergaR Avatar asked Jan 14 '10 14:01

LambergaR


People also ask

What is the difference between ListView and spinner in Android?

In the default state, a spinner shows its currently selected value. Touching the spinner displays a dropdown menu with all other available values, from which the user can select a new one. ListView is a view group that displays a list of scrollable items.

How Use spinner in Android app explain with example?

Example to demonstrate the SpinnerUse ArrayAdapter to store the courses list. Create a single MainActivity that contains the spinner and on clicking any item of spinner Toast with that course name will be shown. Creating the activities: There will be one activity and hence one XML file for MainActivity. activity_main.


1 Answers

The whole thing is a single 9 patch png image. I've modified the entire look of spinners before by replacing the images. See this page: http://androiddrawableexplorer.appspot.com/

Specifically look at btn_dropdown_normal.9, btn_dropdown_pressed.9, btn_dropdown_selected.9 and btn_dropdown_disabled.9

You just need to provide your own versions of those images.

like image 110
Mark B Avatar answered Sep 25 '22 20:09

Mark B