• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps MenuItem enable\disable

eyalm_nm

Newbie
Hi,
In my application, I'm using a Start and StopmenuItems for starting an activity and stop it.
I'd like to disable the Stop till user press the Start and then enable the Stop and disable the Start.
How it can be done?
Thanks,
Eyal.
 
Override onPrepareOptionsMenu(Menu menu) in your activity and use menu.findItem to find the item you want to disable/enable.
 
Back
Top Bottom