1. Download our Official Android App: Forums for Android!

Apps MenuItem enable\disable

Discussion in 'Android Development' started by eyalm_nm, Mar 4, 2010.

  1. eyalm_nm

    eyalm_nm Newbie
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    11
    Joined:
    Feb 5, 2010

    Feb 5, 2010
    11
    0
    15
    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.
     

    Advertisement

  2. Zero

    Zero Newbie
    Rank:
    None
    Points:
    16
    Posts:
    11
    Joined:
    Oct 23, 2009

    Oct 23, 2009
    11
    2
    16
    Override onPrepareOptionsMenu(Menu menu) in your activity and use menu.findItem to find the item you want to disable/enable.
     

Share This Page

Loading...