You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
If I want to use menu groups with id to change visibility of items between activity state changes I cannot use android annotations because I need the Menu instance to call method setGroupVisibile. There is a way to get the menu via android annotations like:
@EActivity
@OptionsMenu(R.menu.my_menu)
public class MyActivity extends Activity {
@OptionMenu
protected Menu menu;
....
private void toggleState() {
menu.setGroupVisibile(R.id.mnu_my_menu_grp_my_group1, false);
menu.setGroupVisibile(R.id.mnu_my_menu_grp_my_group2, true);
}
}
My current work arround is to override the onCreateOptionsMenu method: