How to add submenu items to NavigationView programmatically instead of menu xml

后端 未结 2 1178
鱼传尺愫
鱼传尺愫 2020-12-30 12:28

I\'m trying to add submenu items to NavigationView programmatically . I\'m able to add items into menu but not into submenu

2条回答
  •  萌比男神i
    2020-12-30 13:34

    Somebody figured out a way to do it via reflection and accessing a private field. It's not pretty, but it'll work, for the moment. https://stackoverflow.com/a/30604299/4232051

提交回复
热议问题