Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation Drawer, concept problems

This is my first question. I would like to ask your opinion about Navigation Drawer. I've tried some projects and I've read lot of information about it, but somehow I can't really understand how it really works.. Here are my reasons/doubts:

  • Theoretically, you could go to anywhere of your App from anywhere, I mean, this concept forces the designer to work only with Fragments, converting your one and only Activity in a sort of 'God concept', which it is not the best idea in order to develop an App with deep navigation..

  • If there is a way to combine Navigation Drawer and Activities, should I implement on every Activity the same Navigation Drawer over and over? I can't really see this..

I'm talking about this because I'm trying to adapt one of my Apps and use this kind of navigation pattern on it, but I can't really see how to do it.. I still think that it is better to have multiples Activities, and of course, Fragments on them, but I don't know how to combine them in order to get the best performance of the Navigation Drawer. I have seen similar questions on this site, but I haven't found the answer I'm looking for. Maybe I haven't read enough documentation, or maybe I'm wrong and I haven't understood how this pattern really works..

Thanks for your help.

like image 811
Ababel147 Avatar asked Oct 03 '22 17:10

Ababel147


1 Answers

There's nothing wrong with having one activity that contains your navigation drawer and swaps fragments in and out as you navigate the menu drawer. Additionally, "going anywhere" in your application from the Navigation Drawer shouldn't be a concern if you have good navigation. Good navigation for a Navigation Drawer is probably broken into top level views and detail views. Your top level views are groups of content, which you would likely place in your Navigation Drawer.

A good example of this is the Google Plus Android application. There is one main activity and the navigation drawer provides all of the top level views, which are fragments that are swapped in and out of the main activity. As you dive into content further, you get the detail views, which are activities.

Have a look at the official design documentation for App Structure and Navigation Drawer for more information.

like image 91
Jon Avatar answered Oct 11 '22 16:10

Jon