I wanted to apply a custom font to my spinner. The only way i found out is that to create a custom adapter. Here is my code
private class CustomAdapter e
The simplest, I think :)
List listOfItems = getListOfItems(); // returns ArrayList
ArrayAdapter spinnerAdapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item, listOfItems);
targetSpinner.setAdapter(spinnerAdapter);
Ok, to simply put a list of string in a spinner shouldn't force us to implement an Adapter. That's a code blot and getting a bit pattern crazy, I think.
Trick is the simple_spinner_item id - damn, I like the R.id mechanism but this isn't intuitive from the docs.