Android: Expandable Navigation Drawer with custom

2019-05-18 22:36发布

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!!

4条回答
我欲成王,谁敢阻挡
2楼-- · 2019-05-18 22:42

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

This is exactly what I was looking for.

查看更多
我想做一个坏孩纸
3楼-- · 2019-05-18 22:44

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.

查看更多
放荡不羁爱自由
4楼-- · 2019-05-18 22:45

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.

查看更多
三岁会撩人
5楼-- · 2019-05-18 22:56
登录 后发表回答