Most visited

Recently visited

Added in API level 4

GestureStore

public class GestureStore
extends Object

java.lang.Object
   ↳ android.gesture.GestureStore


GestureLibrary维护手势示例并对新手势进行预测

Summary

Constants

int ORIENTATION_INVARIANT

int ORIENTATION_SENSITIVE

int SEQUENCE_INVARIANT

int SEQUENCE_SENSITIVE

Public constructors

GestureStore()

Public methods

void addGesture(String entryName, Gesture gesture)

为条目添加一个手势

Set<String> getGestureEntries()

获取库中的所有手势条目名称

ArrayList<Gesture> getGestures(String entryName)

获取条目的所有手势

int getOrientationStyle()
int getSequenceType()
boolean hasChanged()
void load(InputStream stream)

加载手势库

void load(InputStream stream, boolean closeStream)
ArrayList<Prediction> recognize(Gesture gesture)

识别一个手势

void removeEntry(String entryName)

删除一个手势输入

void removeGesture(String entryName, Gesture gesture)

从库中删除一个手势。

void save(OutputStream stream)

保存手势库

void save(OutputStream stream, boolean closeStream)
void setOrientationStyle(int style)

指定手势库如何处理方向。

void setSequenceType(int type)

Inherited methods

From class java.lang.Object

Constants

ORIENTATION_INVARIANT

Added in API level 4
int ORIENTATION_INVARIANT

常数值:1(0x00000001)

ORIENTATION_SENSITIVE

Added in API level 4
int ORIENTATION_SENSITIVE

常量值:2(0x00000002)

SEQUENCE_INVARIANT

Added in API level 4
int SEQUENCE_INVARIANT

常数值:1(0x00000001)

SEQUENCE_SENSITIVE

Added in API level 4
int SEQUENCE_SENSITIVE

常量值:2(0x00000002)

Public constructors

GestureStore

Added in API level 4
GestureStore ()

Public methods

addGesture

Added in API level 4
void addGesture (String entryName, 
                Gesture gesture)

为条目添加一个手势

Parameters
entryName String: entry name

getGestureEntries

Added in API level 4
Set<String> getGestureEntries ()

获取库中的所有手势条目名称

Returns
Set<String> a set of strings

getGestures

Added in API level 4
ArrayList<Gesture> getGestures (String entryName)

获取条目的所有手势

Returns
ArrayList<Gesture> the list of gestures that is under this name

getOrientationStyle

Added in API level 4
int getOrientationStyle ()

Returns
int

getSequenceType

Added in API level 4
int getSequenceType ()

Returns
int SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE

hasChanged

Added in API level 4
boolean hasChanged ()

Returns
boolean

load

Added in API level 4
void load (InputStream stream)

加载手势库

Parameters
stream InputStream
Throws
IOException

load

Added in API level 4
void load (InputStream stream, 
                boolean closeStream)

Parameters
stream InputStream
closeStream boolean
Throws
IOException

recognize

Added in API level 4
ArrayList<Prediction> recognize (Gesture gesture)

识别一个手势

Parameters
gesture Gesture: the query
Returns
ArrayList<Prediction> a list of predictions of possible entries for a given gesture

removeEntry

Added in API level 4
void removeEntry (String entryName)

删除一个手势输入

Parameters
entryName String: the entry name

removeGesture

Added in API level 4
void removeGesture (String entryName, 
                Gesture gesture)

从库中删除一个手势。 如果给定条目没有更多手势,则手势条目将被删除。

Parameters
entryName String: entry name

save

Added in API level 4
void save (OutputStream stream)

保存手势库

Parameters
stream OutputStream
Throws
IOException

save

Added in API level 4
void save (OutputStream stream, 
                boolean closeStream)

Parameters
stream OutputStream
closeStream boolean
Throws
IOException

setOrientationStyle

Added in API level 4
void setOrientationStyle (int style)

指定手势库如何处理方向。 使用ORIENTATION_INVARIANT或ORIENTATION_SENSITIVE

setSequenceType

Added in API level 4
void setSequenceType (int type)

Parameters
type int: SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE

Hooray!