Custom animate navigation drawer - android

I have implemented Google's navigation drawer and I would like to add a custom animation when I click a menu item.
Ideally the menu would slide back as if closing, leaving a small sliver of the menu open. A dialog would open with an animation, originating from the space beside the selected menu item.
Something like this..
I tried to animate the left_drawer element on the x axis using ObjectAnimator, but this displaces the whole screen.
Can anyone help?

If you want it so the drawer is only peaking, try using drawerLayout.closeDrawers(true).
According to the source though, this closes all drawers (if you have more then one).
DrawLayout source

Related

How to increase the width of pulling the Navigation Drawer from the side

Is there an API to increase the width/sensitivity of pulling the Navigation Drawer from the left side of the screen? For ex: as of now, I need to press my finger closely to the left of the screen to pull the drawer out. I would like to increase this sensitivity.
There is a solution. You can Set drag margin for your Navigation Drawer
Check this link
Set drag margin for Android Navigation Drawer
There is no need to do that since the users could easily pop open the Navigation Drawer by pressing the title area iff you implement the DrawerListenerinterface or the more convinient ActionBarDrawerToggle class to provide the 3 horizontal line icon indicating there is Navigation Drawer being present. Then you just override the onPostCreate() method in your Activity and call ActionBarDrawerToggle.syncState() method to allow users to open the drawer by pressing about the title area. Click here for more info on how to achieve that. Hope this helps

How can I make the navigation drawer to not close the left drawer completely?

I have an Activity that its root element is a DrawerLayout, the DrawerLayout has a ListView child that acts as the left view of the drawer layout.
The question is:
How can I force the left drawer's list view to not close completely ?
I want its closed state to be like the photo below
I am currently using Android's guide to Create a Navigation Drawer.
I am open for any other library - like Sliding Menu - if that accomplishes my goal.
Thanks in Advance.
You can use SlidingPaneLayout, it's similar to NavigationDrawer.
Check this tutorial to find out how to reach it.
Why not just use that far leftmost menu as a fragment within your activity. Upon opening the NAv Drawer, you can still have it show the menus that are 2nd or 3rd level. This is pretty standard for our app, with a menu exposed and further menus available upon opening the drawer

Add a small tab on left drawer

I am new to android dev. I have a problem of adding a small tab on my left drawer.
Because it may be hard for user to detect that I have a left drawer so I want to add a tab to let people notice.
Here's the screenshot of my app.enter image description here
I hope it can have a small tab like this
Can you give me some hint to start?
You can just put a view on the left of your layout using relative layout and on click of that view you can just open the drawer by calling:
mDrawerLayout.openDrawer(Gravity.START)
This will open the drawer in the same way it open when action bar icon is clicked.

Android SlidingUpPanelLayout and slidinguppanel

I am having problem to incorporate the sliding menu and sliding up panel from
http://www.michenux.net/android-sliding-menu-part-22-690.html
Android: Up/down animated sliding menu
(https://github.com/umano/AndroidSlidingUpPanel)
When it first launched, the bottom panel showed up ok, I did a click/touch on the
sliding up panel, it goes up alright to show the second screen. Problem come when I click/touch
again on the second screen, it slided down but the screen overshoot to lower screen.
It doesn't goes back to the original location.
I have marked problem with "?????" and red color.
I discard the use of the sliding from left menu. The Android's Navigation Drawer suggested by the slidinguppannel solved this problem.
http://developer.android.com/training/implementing-navigation/nav-drawer.html

Sliding effect for opening menu in android

I want to open a sliding menu when we click on top button. Please check the below image. when i click on red marked image/button then how can i open a sliding menu/list items as you can see in 2nd image.
When this menus gets open then main window get slide toward right side of the screen where small part of the main screen will be visible.
I am not sure if this menu is a list of view!! Please help me out.
The best Library doing that is SlindingMenu from jfeinstein10 on Github.
Design your layout with two panels. Left panel with visibility GONE. And then in onClick method of your button at top-right, make visibility of left panel VISIBLE. You can create a Animation to open left panel smothly.

Categories

Resources