Issue
I am using action bar and I can add buttons towards the top right like this:
@Override
public boolean onCreateOptionsMenu(Menu menu)
menu.add("Save").setIcon(R.drawable.action_save).
setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
return true;
}
But I would like to add a Cancel
button towards the top left. Is there a way to do add a button towards the left?
Solution
What are you trying to do this for? If it's contextual, you should maybe use a contextual action menu. This would allow you to have a done or cancel button on the left.
See this guidance about contextual menus:
http://developer.android.com/guide/topics/ui/menus.html#context-menu
Sorry I would have posted this as a comment but haven't got enough rep.
Answered By - user2696372
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.