How can I make a multi-level(more than 3 level) navigation drawer in android?

本小妞迷上赌 提交于 2019-12-11 13:07:22

问题


I am developing an android application where I need to put a navigation drawer which would have more than 3 levels.

What I want to do: If I click one item of my list in the drawer, a whole new list comes up in the drawer. This new list should also do the same when items of this list are clicked. This could go on for many levels.

What I have done till now: I am keeping an expandable list which expands when I click on any item. This design doesn't allow adding more levels.

Application which have similar drawers: svpply (please have a look at this application, it has a similar drawer)

I am a newbie in android development, try to add details to your ideas. Thanks!


回答1:


  • Have a single drawer keeping a FrameLayout.

  • Make all your list as ListFragment

  • Make Fragment Transaction on FrameLayout when a item is clicked.



来源:https://stackoverflow.com/questions/24300031/how-can-i-make-a-multi-levelmore-than-3-level-navigation-drawer-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!