Added in API level 4

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(gesture: Gesture!)

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

Specify how the gesture library will handle orientation.

open Unit

Constants

ORIENTATION_INVARIANT

Added in API level 4
static val ORIENTATION_INVARIANT: Int
Value: 1

ORIENTATION_SENSITIVE

Added in API level 4
static val ORIENTATION_SENSITIVE: Int
Value: 2

SEQUENCE_INVARIANT

Added in API level 4
static val SEQUENCE_INVARIANT: Int
Value: 1

SEQUENCE_SENSITIVE

Added in API level 4
static val SEQUENCE_SENSITIVE: Int
Value: 2

Public constructors

GestureStore

Added in API level 4
GestureStore()

Public methods

addGesture

Added in API level 4
open fun addGesture(
    entryName: String!,
    gesture: Gesture!
): Unit

Add a gesture for the entry

Parameters
entryName String!: entry name
gesture Gesture!:

getGestureEntries

Added in API level 4
open fun getGestureEntries(): MutableSet<String!>!

Get all the gesture entry names in the library

Return
MutableSet<String!>! a set of strings

getGestures

Added in API level 4
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

getOrientationStyle

Added in API level 4
open fun getOrientationStyle(): Int

getSequenceType

Added in API level 4
open fun getSequenceType(): Int
Return
Int SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE

hasChanged

Added in API level 4
open fun hasChanged(): Boolean

load

Added in API level 4
open fun load(stream: InputStream!): Unit

Load the gesture library

load

Added in API level 4
open fun load(
    stream: InputStream!,
    closeStream: Boolean
): Unit

recognize

Added in API level 4
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

Added in API level 4
open fun removeEntry(entryName: String!): Unit

Remove a entry of gestures

Parameters
entryName String!: the entry name

removeGesture

Added in API level 4
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!:

save

Added in API level 4
open fun save(stream: OutputStream!): Unit

Save the gesture library

save

Added in API level 4
open fun save(
    stream: OutputStream!,
    closeStream: Boolean
): Unit

setOrientationStyle

Added in API level 4
open fun setOrientationStyle(style: Int): Unit

Specify how the gesture library will handle orientation. Use ORIENTATION_INVARIANT or ORIENTATION_SENSITIVE

Parameters
style Int:

setSequenceType

Added in API level 4
open fun setSequenceType(type: Int): Unit
Parameters
type Int: SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE