Are there open source gesture libraries in Android

2019-04-24 02:35发布

I have defined my own gestures in an Android app. Is this the only way to define gestures?

Are there any standard opensource libraries which will already have the gesture's raw file?

3条回答
何必那么认真
2楼-- · 2019-04-24 02:56

Pretty much all the libraries that have an extended Android touch UI are proprietary... HTC has HTC Sense, Samsung has TouchWiz, etc.

Apple holds a lot of patents for multi-touch things, and I think that their current battles against HTC and other phone manufacturers have discouraged the development of open source solutions. For a developer who invests their time on open source libraries with the hope to create a community around it and then maybe offer it commercially, to expect to receive "cease and desist letters" is not a good incentive.

But, you can always implement multi-touch gestures by yourself.

A good tutorial is How to use multi-touch in Android 2.

查看更多
SAY GOODBYE
3楼-- · 2019-04-24 03:03

This is the Android documentation which will describe the Gestures. GestureDetector class contains methods for most of the simple gestures that we need for our small applications.

查看更多
别忘想泡老子
4楼-- · 2019-04-24 03:14

I have been developing a library to support basic 1 nad 2 finger gestures on Android with a very very simple drop in functionality.

Most gestures can be set as easily as:

view.setOn2FingerGestureListener (new On2FingerGestureListener () {
    @Override
    onSwipeup() {
    }

    onSwipedown() {
    }
});

The library is opensource and can also be downloaded as a JAR file (.jar).

I haven't decided upon a license yet (will most probably be Apache), so currently it is under NO License.

查看更多
登录 后发表回答