I am working on an Android Honeycomb with an ActionBar. I have set up the ActionBar the following way:
// Configures the action bar
private void configureActionBar() {
mActionBar = getActionBar();
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
SpinnerAdapter spinnerAdapter = ArrayAdapter.createFromResource(this, R.array.rooms, android.R.layout.simple_spinner_dropdown_item);
ActionBar.OnNavigationListener navigationCallback = new ActionBar.OnNavigationListener() {
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
String[] rooms = getResources().getStringArray(R.array.rooms);
mAppState.setCurrentRoom(rooms[itemPosition]);
return false;
}
};
mActionBar.setListNavigationCallbacks(spinnerAdapter, navigationCallback);
}
The image below displays a screenshot of a portion of the ActionBar. I would like to style the dropdown list, but am not sure how to do it. This link has some XML samples, but I do not know how to apply them and how to style the specific elements that are pointed out below.

Here’s a list of changes that I would like to make:
- Change the font size of the selected item to match that of the words “Room Manager”
- Remove the gray line underlying the displayed selected item
- Remove the blue line at the top of the dropdown list
- Add radio buttons to the list items and check the currently selected item in the dropdown list
- Change the color of the lines separating the list items
Does anyone have any ideas on how to do this?
Thank you!
I found out how to style the items in the list, as well as the displayed item. The solution involved creating two layout xml files in the /res/layout directory – one for the spinner dropdown items, and one for the selector (the displayed item). I was then able to add the view resources to the ArrayAdapter.
R.layout.spinner_dropdown_text_view:
R.layout.spinner_selector_text_view:
The ArrayAdapter code:
The result:
Unfortunately, I was not able to figure out how to add the radio buttons, or how to remove any of the horizontal lines.