i want to design a navigation drawer for my app . In it i want various options to go to various activity.
I also want to add some clickable items on title bar which would go to any activity specified.
so, please suggest me direction to proceed.
Best example is add new activity and select "Navigation Drawer Activity"
That use titlebar item for opening menu and swip for opening and closing menu
Related
I am new to Android. I want to implement navigation drawer as this :
The Navigation drawer should open below App Bar and should have red left pane for category icon and right page (white) with navigation options.
I am trying to convert default Navigation Drawer activity of Android to this style but don't know where to start with.
If anyone can help me implementing this would be great help.
Thanks in advance.
you need a custom navigation drawer to achive that, you can start by following this link https://github.com/awidiyadew/DrawerMultiLevelListview
i am developing an chat app in that there are two navigation drawer
Left side drawer has hamburger icon to open and close
i want to place an icon in the right side of the screen so that when the user touches icon the navigation drawer will open like in android emulator there is small icon extending to the navigation drawer
Use menu items like below:
<item
android:id="#+id/workteamaction"
android:icon="#drawable/yourimage"
android:title="#string/yourtitle"
app:showAsAction="always" />
And set your image.then, handle it for showing that NavigationDrawer.
Also, take a look:
Two Navigation Drawer on same Activity
Handling a Menu Item Click Event - Android
Also, i've saw one application was using OveflowMenu for opening another NavigationDrawer.you may want to take a look at here :
Android create custom overflow menu item
Edit:
i want to place an icon in the right side of the screen so that when
the user touches icon the navigation drawer will open like in android
emulator there is small icon extending to the navigation drawer
Use android:gravity="" for your porpuse and then handle it for showing that NavigationDrawer.
E.g: android:gravity="end"
Read the docs for the flags.(right-left-center-buttom or etc).
I use sliding drawer menu in my android project and
I use one drawer menu for all of myActivies
I want in root Activity when click on actionbar`s icon the drawer menu is open!
and in childs Activities when click on actionbar's icon go to parent Activity
like google play or gmail and ...
how I can do this?!
Implement the navigation as usual (with drawertoggle and everything), then call
_toggle.setDrawerIndicatorEnabled(false);
It will hide the drawer icon (the three vertical lines) and display the up caret. The up icon click event will not be handle by the drawer and will finish the activity (if you do so in the OnOptionsItemSelected).
yup, you can use Navigation drawer in the layout and as well as in the java code.
check this url for screenshot
https://developer.android.com/design/media/navigation_drawer_holo_dark_light.png
How can I slide the layout with action bar ?
Right now my navigation drawer list just appear below the action bar, but I want it to overlap the action bar onclick of navigation drawer icon; can I do this?
For this you can use sliding pane layout
Here is a link
https://github.com/cricklet/Android-PanesLibrary/tree/master/example
you can slide the layout with action bar
you have to make a sliding pane and then navigation drawer in the 2nd view
which you will get after implement this example
and here is the link for navigation drawer
http://www.codeofaninja.com/2014/02/android-navigation-drawer-example.html
combine these examples
it can help you a lot!!
Navigation drawer usually stays below action bar so you can slide it out or open it via the navigation button. Based on the image you posted, I think you should use this well-known lib: https://github.com/jfeinstein10/SlidingMenu.
It takes some steps to set up but when you're done you can customize it the way you want easily. The author also provided demo on Google Play Store and Youtube for you to review.
I've setup up a navigation drawer in my android App. I would like to add a button to the left but not in the action bar, because I don't have action bar. What I want to do is a button which can be taken and swiped to open the menu.
In the doc : http://developer.android.com/training/implementing-navigation/nav-drawer.html#ActionBarIcon I don't want to use the app icon, but my own button.
Is it possible ?
With this library you can do exactly what you want. It's easy to implement and use.
https://github.com/jfeinstein10/SlidingMenu