2

I'd like to implement a view that when invisible, slides in when swiping from the right (from outside of the screen). When visible, slides back out to the right when swiping to the right from outside that view.

So I guess this is called a swipe gesture while showing the slide animation as the swipe is still being done. I want it to be fluent, which means that if the swipe gesture is only part made, the view will only part slide, meaning the view follows the gesture.

I'm thinking of something very similar to Amazon's Cloud Drive months view. See screenshot below.

Any idea how to do this? An Example code? 3rd party library?

I tried to search for this. Found how to do the animation: here and here. Found how to recognize the gestures: here and here. Found even the combination of both but not when swiping from the edge of the screen to open nor when swiping from outside of the view to close.

Here are the things I investigated that didn't do the job and why:

  1. SlidingMenu - Slides from the edge and from outside of the view but animates the main window and not just the side view. Also, it's very complicated and hard to get only the required behavior of sliding from/to the edge.
  2. Roman Nurik's Android-SwipeToDismiss - Doesn't recognize swiping from outside of the view nor from the edge of the screen.
  3. Wunderlists - Doesn't recognize swiping from outside of the view nor from the edge of the screen.

enter image description here

Community
  • 1
  • 1
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
  • I think you mean Navigation Drawer. Here is a link to: [Guidelines to Navigation Drawer in android developer](https://developer.android.com/design/patterns/navigation-drawer.html) and [Implementing Navigation Drawer](https://developer.android.com/training/implementing-navigation/nav-drawer.html) – j4rey Nov 25 '14 at 06:47
  • Thanks but problematic. Issues with using the built-in DrawerLayout: 1.Hard bound to the actionbar. 2.I'm already using it for the left side. Adding it to the right means same behavior for both, like shadow and title animation. 3.Fragments is and overkill - just a simple view/layout. – AlikElzin-kilaka Nov 25 '14 at 08:58

0 Answers0