Android adding a submenu to a menuItem, where is addSubMenu()?

后端 未结 8 898
情歌与酒
情歌与酒 2020-12-01 04:55

I want to add a submenu inside my OptionsMenu to a menuItem, programatically according to my parameters. I\'ve checked \"MenuItem\" in android sdk and there is no addSubMenu

8条回答
  •  眼角桃花
    2020-12-01 05:35

    The best way to do this is in your xml menu file. You can do this by creating a new menu object inside of an item:

    
      
        ...
        
          ...
        
        ...
      
    
    

提交回复
热议问题