Navigation Drawer and master/detail flow

2019-01-28 12:43发布

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条回答
我只想做你的唯一
2楼-- · 2019-01-28 13:21

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!

查看更多
登录 后发表回答