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

Popular posts from this blog

minify - Minimizing css files -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -