android - how to add menu items dynamically to navigation drawer? -
i have 3 types of users each user has different menu options in navigation drawer.that menu options getting server.i have single login screen 3 users.according user login, menu delivered server.i want add menu item navigation drawer.i got code during search.but want know, how design navigation drawer accept dynamic menu items
navigationview navview = (navigationview) findviewbyid(r.id.your_nav_view_id); menu m = navview.getmenu(); submenu menugroup = m.addsubmenu("my menu group"); menugroup .add("name"); menugroup .add("address");
you can add recycler view in navigation layout , set adapter , set data received server.
Comments
Post a Comment