In android you could set a navigation list in action bar by passing spinner adapter and OnNavigationListener. the issue is that the navigation list dont fill most of the action bar, how to make it expand like the gmail app : Example of Gmail app :
My app:
And here's the code :
//... setting the array adapter
ActionBar actionBar = getActionBar();
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
NavigationListener navigationListener = new NavigationListener();
ListAdapter listAdapter = new ListAdapter();
actionBar.setListNavigationCallbacks(listAdapter, navigationListener);
actionBar.setDisplayShowTitleEnabled(false);
Other problem i face is the size of the spinner item, they show up really small, is that because i dont pass customized textview (look at screenshot)? example of what i do :
private class ListAdapter extends BaseAdapter implements SpinnerAdapter {
public View getView(int pos, View view, ViewGroup viewGroup) {
TextView text = new TextView(context);
text.setText(arrayAdapter.getItem(pos).toString());
return text;
}
}