Android: 2 or more ExpandableListView inside Navigation Drawer

后端 未结 2 1216
自闭症患者
自闭症患者 2020-11-29 03:36

How could I do something like this?

\"enter

Two expandable listview inside nav

2条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 04:27

    FYI the screen shot you have shown in your qsn also have Pinnned or sectioned listview.

    ExpandableListView in navigation drawer:

    enter image description here

    Use this code DrawerLayoutTest for ExpandableListView in navigation drawer.

    Update: Here is exactly what you looking for, give it at try for this michenux navigation-drawer , Git

    Logic:

    1>use ExpandableListView + michenux navigation-drawer drawer for design and Expandable list view and for that count of "3" items inside use jgilfelt's android-viewbadger lib.

    2>You have to play around in getview(..) in the listview for disabling enabling the drop down icon of the expandable listview, it the item has no child (check for array or arraylist is null/empty) and make visible invisible the badger (drop down count icon/badger) thats it or simply change the list view item layout depending on the each item values Ex: for list row contains expandable childs load different layout with view badger !

    Credits: Michenaud,Jgilfelt

提交回复
热议问题