Android: Expandable Navigation Drawer with custom row views

人盡茶涼 提交于 2019-12-22 18:02:17

问题


I'm trying to do a navigation drawer menu with expandable elements like this --> http://goo.gl/SkMU8N

I had no idea so I started by doing something like this one (not mine).

https://github.com/PrashamTrivedi/DrawerLayoutTest

The problem is that those rows are simple text and they looks horrible.

I want to know how to modify the Adapter (or whatever) to attach my own xml files like you do with the normal drawer (example here --> http://goo.gl/phAJy).

Thanks a lot!!


回答1:


Here an example of slide list item https://github.com/tjerkw/Android-SlideExpandableListView




回答2:


What I've done --> http://goo.gl/KPmxbL

This is exactly what I was looking for.




回答3:


There is no issue with navigation drawer. All you have to so is find some tutorial how to create an expandable ListView because Navigation Drawer is just a ViewGroup which can contain any view.




回答4:


https://github.com/PrashamTrivedi/DrawerLayoutTest

This URL project doesn't have separate layout for list_view with menu & sub menu. That's why we are unable to edit the code.

Is there any code with separate layout for menu/sub menu. Also if you anyone know horizontal sub menu. Please provide the link.



来源:https://stackoverflow.com/questions/18496843/android-expandable-navigation-drawer-with-custom-row-views

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