I'm new to Android.
I'm learning to make menu and submenu now but stumbled upon a problem.
I want to change the submenu header icon in the xml but don't know how to.
I tried to change the header icon programatically but there's no method to get the submenu(only add submenu).
Is it possible to change the header icon in the xml? I saw codes that add submenu programatically and change the header 开发者_运维知识库there. Is it weird to make the submenu in the xml?
Thanks.
edit: why I cannot type 'Hi' at the first sentence?
MenuItem newSubMenu = mainMenu.add("SubMenu");
newSubMenu.method....
精彩评论