user2286081
user2286081

Reputation: 181

How to create gesture programmatically in android?

I am a beginner in android.I want to know, how to create gesture programmatically?.That means, i dont need any pre built gesture file created by "gesture builder" app.But i want to create gestures by using only codings not by "gesture builder" app.For example, i want to create an alphapet "A" only by coding.And when the user draw on the gesture overview it want to display the Result "A".Is it possible? Can anyone give any idea?

Upvotes: 2

Views: 2889

Answers (2)

GrIsHu
GrIsHu

Reputation: 23638

Android supports the Gesture API since version 1.6. The API can be located in the package android.gesture, and lets you store, load, draw and recognize gestures. The below tutorial will show you a proof-of-concept application how you can make use of Gesture API.

Check out the Create Gesture Programmatically in Android

Upvotes: 2

Brandon Romano
Brandon Romano

Reputation: 1020

I wrote a blog post about this the other week, here.

To summarize, you're going to need to look into overriding the onTouchEvent that's provided by every Activity class.

This answer here could also point you in the right direction.

Upvotes: -1

Related Questions