7

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Jyotirmoy Sundi
  • 355
  • 1
  • 5
  • 12
  • 1
    Maybe it helps you [Gestures Library](http://gestureworks.com/features/open-source-gestures/) & also [this](http://www.androidian.de/?p=344) – Praveenkumar Mar 08 '12 at 10:24
  • I also couldn't find any. Seems we have to create our own Gesture raw fils by using Gesture Builder application comes as a default application in emulators above 1.6 – AnujAroshA Mar 08 '12 at 11:53
  • I think you can make raw file by your own as you want.So no need of already exist raw file – Tofeeq Ahmad Mar 13 '12 at 06:37
  • @Praveen, Both links down...... – Pacerier Nov 19 '14 at 02:31
  • Try reading this post. I have an open source gesture library:http://stackoverflow.com/questions/13095494/how-to-detect-swipe-direction-between-left-right-and-up-down/30164390#30164390 – user2288580 Nov 26 '15 at 00:31

3 Answers3

3

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Arnav Gupta
  • 916
  • 12
  • 14
2

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.

Ravindranath Akila
  • 209
  • 3
  • 35
  • 45
AnujAroshA
  • 4,623
  • 8
  • 56
  • 99
  • But this is not related to my question...I was not able to find any either....its also not possible to combine two raw gesture files as android adk doesnt recognize two gesture files. I am not sure if their si any documentation of the same but when I tried it didnt work out as if two gesture files were not recognised.so its not possible to have 2 in one aplication and there is no way to combine them ASAIK. – Jyotirmoy Sundi Mar 09 '12 at 02:17
  • Is it possible to have multitouch library in android with gesture builder or is onTouchEvent is the only way out? – Jyotirmoy Sundi Mar 14 '12 at 03:30
  • you can use a `GestureOverlayView` for more control – edthethird Mar 14 '12 at 16:31
1

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Oscar Salguero
  • 10,275
  • 5
  • 49
  • 48
  • Apple is destroying the world (and itself) with patents. – Pacerier Nov 19 '14 at 02:32
  • I have two open source gesture libraries for Android https://bitbucket.org/warwick/hacergestov2 and https://bitbucket.org/warwick/hacergestov1. I also have a Dial Control Widget here: https://bitbucket.org/warwick/hgdialrepo. They are very tested and abstracted and support an awesome amount of developer scenarios – user2288580 Nov 24 '15 at 17:20
  • Here's a few good open source gesture libraries I've developed they come with demo apps https://bitbucket.org/warwick/hacergestov2 https://bitbucket.org/warwick/hacergestov1 https://bitbucket.org/warwick/hgdialrepo – user2288580 Nov 26 '15 at 00:34