开发者

android submenu header icon

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....
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜