Dynamic Menus in NavigationView

后端 未结 4 701
[愿得一人]
[愿得一人] 2021-02-14 02:42

I have this Layout:



        
4条回答
  •  囚心锁ツ
    2021-02-14 03:42

    You can add menus dynamically by following steps :

    Step1. Obtain menu object from Navigation View NavigationView.getMenu()

    Step2. Add any item to the menu using Menu.add()

提交回复
热议问题