public class GestureStore
extends Object
| java.lang.Object | |
| android.gesture.GestureStore | |
GestureLibrary维护手势示例并对新手势进行预测
常量(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) |
|
|---|---|
java.lang.Object
|
|
void addGesture (String entryName, Gesture gesture)
为条目添加一个手势
| 参数(Parameters) | |
|---|---|
entryName |
String: entry name |
Set<String> getGestureEntries ()
获取库中的所有手势条目名称
| 返回(Returns) | |
|---|---|
Set<String> |
a set of strings |
ArrayList<Gesture> getGestures (String entryName)
获取条目的所有手势
| 返回(Returns) | |
|---|---|
ArrayList<Gesture> |
the list of gestures that is under this name |
int getSequenceType ()
| 返回(Returns) | |
|---|---|
int |
SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE |
void load (InputStream stream)
加载手势库
| 参数(Parameters) | |
|---|---|
stream |
InputStream
|
| 抛出异常(Throws) | |
|---|---|
IOException |
|
void load (InputStream stream, boolean closeStream)
| 参数(Parameters) | |
|---|---|
stream |
InputStream
|
closeStream |
boolean
|
| 抛出异常(Throws) | |
|---|---|
IOException |
|
ArrayList<Prediction> recognize (Gesture gesture)
识别一个手势
| 参数(Parameters) | |
|---|---|
gesture |
Gesture: the query |
| 返回(Returns) | |
|---|---|
ArrayList<Prediction> |
a list of predictions of possible entries for a given gesture |
void removeEntry (String entryName)
删除一个手势输入
| 参数(Parameters) | |
|---|---|
entryName |
String: the entry name |
void removeGesture (String entryName, Gesture gesture)
从库中删除一个手势。 如果给定条目没有更多手势,则手势条目将被删除。
| 参数(Parameters) | |
|---|---|
entryName |
String: entry name |
void save (OutputStream stream)
保存手势库
| 参数(Parameters) | |
|---|---|
stream |
OutputStream
|
| 抛出异常(Throws) | |
|---|---|
IOException |
|
void save (OutputStream stream, boolean closeStream)
| 参数(Parameters) | |
|---|---|
stream |
OutputStream
|
closeStream |
boolean
|
| 抛出异常(Throws) | |
|---|---|
IOException |
|
void setOrientationStyle (int style)
指定手势库如何处理方向。 使用ORIENTATION_INVARIANT或ORIENTATION_SENSITIVE
void setSequenceType (int type)
| 参数(Parameters) | |
|---|---|
type |
int: SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE |