What is the use of invalidateOptionsMenu() in android -


i newbie android when going through sample code navigation drawer found called method invalidateoptionsmenu() searched regarding functionality couldn't find answer can please brief me functionality , whenshould use that.

this function tell android should redraw menu. default, once menu created, won't redrawn every frame (since useless redraw same menu on , on again).

you should call function when changed in option menu (added element, deleted element or changed text). way android know it's time te redraw menu , change appear.

hope answers question


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -