I am trying to show icons with overflow menu with below codes
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.my_menu,menu);
if(menu instanceof MenuBuilder){
MenuBuilder menuBuilder = (MenuBuilder) menu;
menuBuilder.setOptionalIconsVisible(true);
}
It gives me this error
menuBuilder.setOptionalIconsVisible can only be called from within the same library group
on line
menuBuilder.setOptionalIconsVisible(true);
I know I can suppress it for ignore but I want know why its coming and there any another way to fix it ?
Thanks