In my Android application, I am using spinner, and I have loaded data from the SQLite database into the spinner, and it\'s working properly. Here is the code for that.
Here is a link that can help you to change the color of the Spinner:
Click here
You need to create your own layout file with a custom definition for the spinner item spinner_item.xml:
If you want to customize the dropdown list items, you will need to create a new layout file. spinner_dropdown_item.xml:
And finally another change in the declaration of the spinner:
ArrayAdapter adapter = ArrayAdapter.createFromResource(this,
R.array.planets_array, R.layout.spinner_item);
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
spinner.setAdapter(adapter);
That's it.