dt0 dt0 - 3 years ago 188
Android Question

Android - Programmatically select menu option

Is there a way to programmatically select a menu option? Basically, I want a button in a view to perform the same action as pressing a specific menu option. I was thinking of trying to call onOptionsItemSelected(MenuItem item) but I don't know what to put for the menu item.

Answer Source

Why don't you have both UI events call a common method?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download