Novice appear on the menu on learning a little problem.




When adding a submenu, click on "I have submenu" later, should show menu5, menu6, menu7, menu8.
Why he did not appear, nor error. Is a blank.
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Because you should be wrong with the submenu, and you just click Show log
Reply:
Because you display the menu by registerForContextMenu (btn); while long press is public void call onCreateContextMenu this method, but you did not write this method inside the content of the sub-menus.
Reply:
Did not understand and can explain the specific write it?
Reply:
But I click on the menu of the menu simulator, with the press and that's okay ah. Press the function that can be achieved.
Reply:
Baidu's under MENU Detailed Explanation and SubMENU of it,
Reply:
I also find some online code, paste up, up and running just do not display the sub-menu options.
Reply:
submenu it is SubMenu
Reply:
You can achieve long press, then it copied the contents public void onCreateContextMenu to onCreateOptionMenu sprinkled, long press can achieve that menu is the same spread, just the way the trigger menu is different.
No comments:
Post a Comment