I made a submenu with some elements in it. Now I want to add another icon with submenu items. I also applied the code to the menu items to add an icon, but it does not show me the icons, which my code is as follows:
public boolean onCreateOptionsMEnu(Menu m) { SubMenu s1 = m.addSubMenu("menu1"); s1.add(0,0,1,"1").setIcon(R.drawable.icon1); s1.add(0,1,2,"2").setIcon(R.drawable.icon2); return super.onCreateOptionsMenu(m); }
source share