I'm trying to create an activity that has a sliding drawer at the bottom and allows the user to slide up and reveal a menu (shown as the grey area in my pictures). I'm currently having two issues:
Sliding Animation: When the user begins to drag, I want the Text and image to dynamically re-size and move as the drawer is dragged up (see pictures below). I have a working sliding drawer, but no animations.
Round Image: I want the round image (seen in the pictures below) to sit halfway on the sliding layout, but I can't seem to figure out how to do this. Any suggestions?
Here are the pictures showing what I'm trying to achieve:
Sliding drawer fully closed: link
Sliding drawer open a litte: link
Sliding drawer open more: link
Sliding drawer open all the way: link
(sorry, I don't have the rep to directly post the images)
You are looking for Design Library's Collapsing Toolbar class which you should check instead of reinventing the wheel. There's open source sample app you may want to check:
https://github.com/chrisbanes/cheesesquare
Related
In this type of Navigation Drawer, when you swipe from the left edge of the screen, current screen moves to right side while resizing and the Navigation Drawer become visible by a transparency transition effect while its resizing too. And also the Navigation Drawer shows up from behind of the current activity.
Like this one, my "Music" application:
So, how can I achieve this kind of Navigation Drawer? Is there any library, tutorial or...?
Many thanks!
its not navigation drawer (navigation drawer always comes from the top of screen).
you can use sliding layout.
https://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html
The closet library I found is SlidingMenu.
An example on Google Play:
https://play.google.com/store/apps/details?id=com.slidingmenu.example&hl=en
I want to implement sliding Menu like below images ,I am using SlidingPaneLayout to create Left Sliding Menu but How i can make it to behave like below images.
Now when some one close it by Either top left icons click or by drag to left it should be close like below shown image.
This image are just for giving idea of what i am try to do in my sliding Menu .
Let me known that some known how to achieve such in android.
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.
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
Hi I am doing a sliding drawer, following the tutorial here: http://android-pro.blogspot.sg/2010/09/using-android-slidingdrawer.html
However, the sliding drawer either open or closes fully. Is there any way so that the user can slide to limit the height of content? For example to slide open half of the sliding drawer to show half of the content, or slide a third to see a third of the content.
You will have to make a custom 'SlidingDrawer' so that its top offset does not default to the max height.
It is already implemented here