GestureStore
open class GestureStore
kotlin.Any | |
↳ | android.gesture.GestureStore |
GestureLibrary maintains gesture examples and makes predictions on a new gesture
Summary
Constants | |
---|---|
static Int | |
static Int | |
static Int | |
static Int |
Public constructors | |
---|---|
Public methods | |
---|---|
open Unit |
addGesture(entryName: String!, gesture: Gesture!) Add a gesture for the entry |
open MutableSet<String!>! |
Get all the gesture entry names in the library |
open ArrayList<Gesture!>! |
getGestures(entryName: String!) Get all the gestures of an entry |
open Int | |
open Int | |
open Boolean | |
open Unit |
load(stream: InputStream!) Load the gesture library |
open Unit |
load(stream: InputStream!, closeStream: Boolean) |
open ArrayList<Prediction!>! |
Recognize a gesture |
open Unit |
removeEntry(entryName: String!) Remove a entry of gestures |
open Unit |
removeGesture(entryName: String!, gesture: Gesture!) Remove a gesture from the library. |
open Unit |
save(stream: OutputStream!) Save the gesture library |
open Unit |
save(stream: OutputStream!, closeStream: Boolean) |
open Unit |
setOrientationStyle(style: Int) Specify how the gesture library will handle orientation. |
open Unit |
setSequenceType(type: Int) |
Constants
Public constructors
Public methods
addGesture
open fun addGesture(
entryName: String!,
gesture: Gesture!
): Unit
Add a gesture for the entry
Parameters | |
---|---|
entryName |
String!: entry name |
gesture |
Gesture!: |
getGestureEntries
open fun getGestureEntries(): MutableSet<String!>!
Get all the gesture entry names in the library
Return | |
---|---|
MutableSet<String!>! |
a set of strings |
getGestures
open fun getGestures(entryName: String!): ArrayList<Gesture!>!
Get all the gestures of an entry
Parameters | |
---|---|
entryName |
String!: |
Return | |
---|---|
ArrayList<Gesture!>! |
the list of gestures that is under this name |
getSequenceType
open fun getSequenceType(): Int
Return | |
---|---|
Int |
SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE |
recognize
open fun recognize(gesture: Gesture!): ArrayList<Prediction!>!
Recognize a gesture
Parameters | |
---|---|
gesture |
Gesture!: the query |
Return | |
---|---|
ArrayList<Prediction!>! |
a list of predictions of possible entries for a given gesture |
removeEntry
open fun removeEntry(entryName: String!): Unit
Remove a entry of gestures
Parameters | |
---|---|
entryName |
String!: the entry name |
removeGesture
open fun removeGesture(
entryName: String!,
gesture: Gesture!
): Unit
Remove a gesture from the library. If there are no more gestures for the given entry, the gesture entry will be removed.
Parameters | |
---|---|
entryName |
String!: entry name |
gesture |
Gesture!: |
setOrientationStyle
open fun setOrientationStyle(style: Int): Unit
Specify how the gesture library will handle orientation. Use ORIENTATION_INVARIANT or ORIENTATION_SENSITIVE
Parameters | |
---|---|
style |
Int: |
setSequenceType
open fun setSequenceType(type: Int): Unit
Parameters | |
---|---|
type |
Int: SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE |