android - Input for onPrepareOptionsMenu -
i'm trying make app disables user going menu. know have override onprepareoptionsmenu(menu menu) have put input menu if want use function in different function? don't quite understand menu object , how many types has.
do this:
private menu moptionsmenu; @override public boolean oncreateoptionsmenu(final menu menu) { moptionsmenu = menu ... } private void updateoptionsmenu() { if (moptionsmenu != null) { onprepareoptionsmenu(moptionsmenu); } }
and call updateoptionsmenu() function want
Comments
Post a Comment