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
Related
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
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 have been looking to find this for quite some time but couldn't find any solution.
I want to implement this kind of button which looks like a hamburger navigation drawer button when drawer is closed.But when it is opened the icon animates and convert to a 'back button' as show in the image.
That is the ActionBarDrawerToggle. The official implementation is in the appcompat-v7 library, and it requires that you be using AppCompatActivity and all its trimmings (e.g., Theme.AppCompat or children).
If you are using the native action bar, given some time, you can cross-port the ActionBarDrawerToggle from source to work with the native action bar. It took me an hour or two, IIRC.
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 have an app in which I would like a slide out menu. It would not be in control of all the apps settings, just a simple menu with a few options. I will still have a settings menu so I don't want to get rid of that. I would like to activate the slide menu with an icon in one of the corners of the app. On the button click I would like to slide out this simple menu (not settings).
Should I use the Navigation Drawer? My first thought is no since I am not controlling any sort of navigation from within this slider. Navigation Drawer also has some default behaviors that I am not sure you can override, i.e. slide from left side of screen to access, click app icon to access, click settings menu to access.
Am I supposed to use a Navigation Drawer and try and override a bunch of behavior or is there another android pattern that I can use?