android gesture,GitHub - rharter/android-gesture-detectors: Gesture detector framework for multitouc...

Android Gesture Detectors Framework

Introduction

Since I was amazed Android has a ScaleGestureDetector since API level 8 but

(still) no such thing as a RotateGestureDetector I decided to create this class

myself. In the process I decided to create a small extendable framework for

GestureDetectors in general.

Download

Gradle

compile 'com.almeros.android-gesture-detectors:library:1.0'

Maven

com.almeros.android-gesture-detectors

library

1.0

Tutorials

Using gesture detectors

If you want to use the ScaleGestureDetector and/or the gesture detectors

from this project, please read my tutorial: code.almeros.com/android-multitouch-gesture-detectors

Extending

If you want to extend this framework with new gesture detectors please read

my tutorial about that here: coming soon

I hope you'll send me a pull request with your FingerTwistGestureDetector or something ;)

Containments

RotateGestureDetector

Helps finding out the rotation angle between the line of two fingers (with the

normal or previous finger positions)

MoveGestureDetector

Convenience gesture detector to keep it easy moving an object around with one

ore more fingers without losing the clean usage of the gesture detector pattern.

ShoveGestureDetector

Detects a vertical two-finger shove. (If you place two fingers on screen with less than a 20 degree angle between them,

this will detact movement on the Y-axis.)

ScaleGestureDetector (default Android)

This one is NOT in this framework, but is gesture detector that resides in the

Android API since API level 8 (2.2).

BaseGestureDetector (abstract)

Abstract class that every new gesture detector class should extend.

TwoFingerGestureDetector (abstract)

Abstract class that extends the BaseGestureDetector and that every new gesture

detector class for two finger operations should extend.

License

This project is licensed with the 2-clause BSD license.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值