1

I'd like to implement a small feature on my application that allows the user to swipe left and swipe right on a fixed part of the screen. A swipe left would call a certain method and a swipe right would call a different method. I've seen swipe examples where the activity changes upon swiping left or right, but I only want to call methods, and have it only available on a small part of the screen.

Is this possible? Can anyone point me in the right direction to a library or good tutorial?

4

1 回答 1

0

看看SimpleOnGestureListener API。您肯定可以处理滑动并从中调用方法。看看这个教程。当您在活动中实现 SimpleGestureActivity 时,请从 switch 语句中的适当案例中调用您的方法。

于 2012-10-24T16:47:58.580 回答