Android Question Need help with corwin42’s example “Material Design 4 - Modifyable and advanced Menu”

Discussion in 'Android Questions' started by Dread, Jul 24, 2018.

Tags:
  1. Dread

    Dread Member Licensed User

    I have added Menu.AddSubMenu(4,4,6,"SubMenu") to the Activity_CreateMenu sub in corwin42’s example and want clicking “SubMenu” to redisplay the menu with submenu items. How can this be achieved? Any help would be greatly appreciated.
     
  2. DonManfred

    DonManfred Expert Licensed User

    Add the submenuitems to the newly created submenu.

    Code:
    Dim smSubmenu As ACSubMenu
    smSubmenu = NavDrawer.NavigationView.Menu.AddSubMenu(
    4,4,6,"SubMenu"' Remeber the submenu created/created by AddSubMenu...
    smSubmenu.AddWithGroup2(1, miUpgrade, 1001"Upgrade", xml.GetDrawable("ic_account_circle_black_24dp")).ItemCollapsed=True ' add item to the new submenu
     
    Dread and Erel like this.
  3. Dread

    Dread Member Licensed User

    Thank you DonManfred. Corwin's example "material Material Design 4 -Modifyable and advanced Menu" displays a menu when an overflow icon is clicked on a Toolbar.
    and not a NavDrawer. How do I modify your code? While I have been a member for a few years now, I am still very much a beginner at programming.
     
  4. DonManfred

    DonManfred Expert Licensed User

    Please create a new thread for any new question.
     
  5. Dread

    Dread Member Licensed User

    Hooray! After several attempts at modifying your code and coming back to it later in the day, I finally work it out. A sincere thanks DonManfred for you help.
     
    DonManfred likes this.
  6. DonManfred

    DonManfred Expert Licensed User

    click on the like link on the helpful post to show your honor
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice