I found an example how to use a context menu with actionBar. This example waits for clicks on the phones menu button. But I want to have it appended to the icon or better the activity name. thanks
public class menu extends Activity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_fragen, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
..
That has nothing to do with
onCreateOptionsMenu()oronOptionsItemSelected(). To set up thatSpinner:Get your
ActionBarviagetActionBar()Call
setNavigationMode(ActionBar.NAVIGATION_MODE_LIST)on theActionBarCall
setListNavigationCallbacks()on theActionBarwith yourSpinnerAdapterand a listener object to be notified when the user makes a selection change in theSpinner