public final class GestureDescription
extends Object
| java.lang.Object | |
| android.accessibilityservice.GestureDescription | |
使用AccessibilityService_canPerformGestures媒体资源的辅助功能服务可以发送手势。 这个类描述了这些手势。 手势由一个或多个笔划组成。 一旦建立,手势是不可变的。
整个空间尺寸以屏幕像素为单位。 时间以毫秒为单位。
Nested classes |
|
|---|---|
class |
GestureDescription.Builder 建造者为 |
class |
GestureDescription.StrokeDescription 不断变化的描述可以成为手势的一部分。 |
公共方法(Public methods) |
|
|---|---|
static long |
getMaxGestureDuration() 获取手势持续时间的上限。 |
static int |
getMaxStrokeCount() 获取手势可能包含的笔画数量的上限。 |
GestureDescription.StrokeDescription |
getStroke(int index) 从手势中读出一笔 |
int |
getStrokeCount() 获取手势中的笔划数。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
long getMaxGestureDuration ()
获取手势持续时间的上限。
| 返回(Returns) | |
|---|---|
long |
The maximum duration in milliseconds. |
int getMaxStrokeCount ()
获取手势可能包含的笔画数量的上限。
| 返回(Returns) | |
|---|---|
int |
The maximum number of strokes. |
GestureDescription.StrokeDescription getStroke (int index)
从手势中读出一笔
| 参数(Parameters) | |
|---|---|
index |
int: the index of the stroke |
| 返回(Returns) | |
|---|---|
GestureDescription.StrokeDescription |
A description of the stroke. |
int getStrokeCount ()
获取手势中的笔划数。
| 返回(Returns) | |
|---|---|
int |
the number of strokes in this gesture |