Do you know how to rename existing menu ?
I can rename when press menu item. But I don’t know how to access to menu item when press the button.
Please advice.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It would be good if you can clarify the question a little, but each time the user presses the Menu on their Android device while inside one of your activities, the
onPrepareOptionsMenumethod is called. The first time the menu is shown (i.e. only once), theonCreateOptionsMenumethod is called.Basically, the
onPrepareOptionsMenumethod is where you should make any changes such as enabling/disabling certain menu items, or changing the menu item text depending on the circumstances.As an example: