Skip to content
Advertisement

Tag: menuitem

How to change menu item text dynamically in Android

I’m trying to change the title of a menu item from outside of the onOptionsItemSelected(MenuItem item) method. I already do the following; however I’d like to be able to modify the title of a particular menu item outside of this method. Answer As JxDarkAngel suggested, calling this from anywhere in your Activity, and then overriding: is a much better choice.

Advertisement