Reputation: 1060
I am trying to make an options menu popup after I drag and drop a marker on a map. In my map activitity I have this optionsmenu created:
@Override
public boolean onCreateOptionsMenu(Menu menu){
menu
.add(Menu.NONE, Menu.FIRST+1,Menu.NONE, "Use Point?");
//.setIcon(R.drawable.androidmarker);
menu
.add(Menu.NONE,Menu.FIRST+2,Menu.NONE,"Cancel");
//.setIcon(R.drawable.androidmarker);
return(super.onCreateOptionsMenu(menu));
}
Is there a way I can execute this without pressing the menu button?
Upvotes: 1
Views: 141
Reputation: 2079
I think calling openOptionsMenu() will do what you want: http://developer.android.com/reference/android/app/Activity.html#openOptionsMenu%28%29
Upvotes: 2