Creating a Navigation Drawer - android

In developer.android training there is an explnation on how to create Navigation Drawer http://developer.android.com/training/implementing-navigation/nav-drawer.html.
there is a sample app in this tuturial --> http://developer.android.com/shareables/training/NavigationDrawer.zip .
in eclipse you can also create Navigation Drawer (file->new->android application project....->Navigation Drawer activity).
in eclipse Navigation Drawer activity there is a NavigationDrawerFragment class , but in the sample app they use ListView
my question is why the sample app and eclipse Navigation Drawer activity are so diffrent (Although they have the same functionality)?
what is the use of NavigationDrawerFragment class? why to use Fragement ( instead of ListView like in the sample app)?

I never work with NavigationDrawerFragment. I think its hard or etc. If you want real Navigation Drawer go to this link=
http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/

Here you have and updated Nav Drawer implementation sample according to Material Design. From Google IO 2015 it's recommended to use the Android Support Design library that will make your life easy.

Related

How to design Sliding tabs with Android Studio default Navigation drawer?

I want to Implement Navigation drawer with sliding tabs. I have done this by designing my own navigation drawer. Now I want to use Android studio default navigation drawer with sliding tabs. I am not getting any idea???? Can anyone please help me...
THANKS in Advance
It has been explained here in great detail with code.
http://developer.android.com/training/implementing-navigation/nav-drawer.html
For New Project:-
Create New Project, while project creating, select Sample Activity like Navigation Drawer Activity Or Tabbed Activity. You can create it by selecting.
Or, In existing Project:-
Goto File --> New --> Activity --> Gallery and Select which you want.
Thanks,

Adding Navigation Drawer to TabHost Activity in Android

I have an android app that uses legacy TabHost, its deprecated but still works fine.
Requirement is to add a sliding Navigation Drawer to the TabHost. Menu in the Nav drawer will be a combination of tabs in the tabhost plus additional items.
Can anyone provide examples of how to integrate Navigation Drawer with TabHost?
thanks!
Section 3.2 in this article explains quite well how to implement the navigation drawer. In this example they set it up with a header and a RecyclerView, but you can really build it however you like.
I hope this helps

How to replace default hamburger icon with custom drawable (Used latest NavigationView, design support library, tool bar))

I have followed exact steps in the following tutorial for making navigation drawer using design support library. But i want to replace the default hamburger icon (using drawerToggle.syncState()). How can i do it?
https://github.com/codepath/android_guides/wiki/Fragment-Navigation-Drawer
Also I want to make Navigation drawer switch activities instead of fragments. For this, i have made a BaseActivity following above tutorial and extended all other activities from this BaseActivity. I am able to get the result but when a new activity is launched unable to preserve the highlighting of selected item in navigation drawer. Please suggest any solutions?

Adding navigation drawer to AppCompatActivity

I need to add a navigation drawer to my app. The activities extend AppCompatActivity. I want the navigation drawer to be used in some of the activities. The navigation drawer should look something like the one if the play store (i.e. a circled ImageView and some text + a listView). Can I edit the code available when creating a new navigation drawer activity in Android studio?
I tried the following code Here and extended it in my activity but it didn't work.
Sometimes using the navigation drawer template activity is a complete mess. Try this tutorial. Slidenerd is a really good source for the new material design stuff. :)

navigation drawer activity is not available when I create a new application

I want to create a Navigation Drawer in my application. I think by default template is available for that. But when I create a new application it is not showing the Navigation Drawer Activity.
I think it is because of Min.SDK and Target SDK that you set at the time of creating a new application.
Now If i try with Min.SDK 4.0 and Target SDK 4.4 i can see Navigation Drawer option.
One suggestion that I would like to given you that don't go with default navigation drawer as it has a lot of prob while customization.
So I recommend you to go with http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/ this tutorial.it explains pretty well.

Categories

Resources