Navigation Drawer and master/detail flow

最后都变了- 提交于 2019-11-28 10:06:08

问题


I try use two android templates (Navigation Drawer + Master/Details Flow). How can I use this two templates in one app? I will be grateful for any example.


回答1:


Update:

After being ask to do so by a moderator, I'm flagging this and another similar question (as duplicates).

Those questions:
How to implement navigation drawer with fragments master detail
https://stackoverflow.com/questions/25403377/combine-navigation-drawer-and-master-detail-layout


Original Answer:

Faced with the same problem, I found a tutorial on it that actually used the two design ideas together:

http://blog.evizija.si/android-layout/

I just followed their example and got my UI working as desired in about 5 minutes. It's actually incredibly simple. You make MasterActivity look a bit more like the generated ItemListActivity (ie. implement TaskListFragment.Callbacks, copy over the onItemSelected method, and a chuck of onCreate) and you're done!

I hope this helps solve your problem! Happy coding!



来源:https://stackoverflow.com/questions/20290973/navigation-drawer-and-master-detail-flow

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