I tried to set a custom title bar includes spinner object but everytime it gave me that exception called "You cannot combine custom titles with other title features". I searched to find a solution site by site and also i did everything correctly as described on the net but the exception never disappeared. There is a very silly question left on my mind that it can be related to android 3.0? I am developing with version 3.0 (honeycomb). I don't know what should i do.
Thank you adamp, i made it with your guidance. here is a simple action bar with spinner example. May help to someone who is facing the similar issue.
super.onCreate(savedInstanceState);
setContentView(R.layout.screens);
ActionBar bar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
bar.setListNavigationCallbacks(new SpinnerAdapter(this, android.R.layout.simple_dropdown_item_1line, EczaneMgr.getInstance(this).getEczaneListAsSpinner()),
new OnNavigationListener() {
@Override
public boolean onNavigationItemSelected(int position, long itemId) {
Log.e("item position",String.valueOf(position));
return true;
//do whatever want to do...
}
}
);