i want to make a swipe function between layout , for flying out menu , like Facebook application , but every example and tutorial that i have seen it's all swipe from the leftest part of screen or rightest part of screen,but i want to swipe from every part of screen, like Viber, when you Swipe from middle of screen or anywhere it will swipe to left or right but i don't know how exactly it works,is there any example or tutorial to make a Swipe to right or left between layout from every where in screen , not just leftest or rightest part of screen,something like Viber app Swipe Gesture.
2 回答
http://developer.android.com/design/patterns/swipe-views.html
under the documentatin on how to implement Lateral Navigation, there even is a sample code for download :)
Tutorial:
http://androidresearch.wordpress.com/2012/01/10/working-with-gesture-api-in-android/
I used something like this before to capture a 'Z' gesture. You can create any gesture you want. It's easy to use.
My result: https://www.youtube.com/watch?v=y3nGQ9djhqs&list=UUYTJ9XvTGqQVGevDMuNa6GA#t=281
(was my first app ever)
I'm not sure this will be the best solution for your needs but it will work.