How to implement Expandable android navigation drawer with subitems?

前端 未结 2 829
你的背包
你的背包 2020-12-29 13:39

How to implement android navigation drawer like this?

TopLevelView1 ~ TopLevelView4 can select and no children
TopVevelView5 can collaspe

My question is

2条回答
  •  猫巷女王i
    2020-12-29 14:09

    For navigation:

    • Alternative 1:

      Sliding Menu, which I would definitely go with. Even used by popular application like LinkedIn and Foursquare and easy to implement and use. Full explanation and example source codes: SlidingMenu - GitHub

    • Alternative 2:

      Android Navigation Drawer. If you want to fully customise everything yourself without using any libraries, this is your option. You can check codes and how to do it from Android Developers website: Creating a Navigation Drawer

    View inside your navigation drawer / sliding menu:

    • Alternative 1:

      Android default ExpandableListView. Links: Android Developers , androidhive

    • Alternative 2:

      AnimatedExpandableListView, which is implemented from ExpandableListView, but when an item is clicked, the expand is done with a smooth animation which you may prefer to use for a better look. AnimatedExpandableListView

提交回复
热议问题