How to add a collapsible menu item inside navigation drawer in android?

后端 未结 3 1541
南笙
南笙 2021-02-07 17:56

I have a DrawerLayout enclosing a NavigationView and this layout activity serves as a common Navigation drawer for all the activities in my app. I am p

3条回答
  •  梦谈多话
    2021-02-07 18:24

    You can use expandable list views inside navigation drawers, I don't understand why you don't want to use them. More on that can be found here http://developer.android.com/reference/android/widget/ExpandableListView.html

    If you insist on not using expandableListView, then the alternative is to design the expansion yourself using the menu's OnSelect for that specific item. Though I really don't know why you want this, you'd just be re-implementing the wheel.

提交回复
热议问题