本文整理汇总了Java中android.accessibilityservice.GestureDescription类的典型用法代码示例。如果您正苦于以下问题:Java GestureDescription类的具体用法?Java GestureDescription怎么用?Java GestureDescription使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GestureDescription类属于android.accessibilityservice包,在下文中一共展示了GestureDescription类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: Swipte
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
public void Swipte(int x1,int y1,int x2,int y2,int time){
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {
Log.e(TAG,"Swipte");
GestureDescription.Builder gestureBuilder = new GestureDescription.Builder();
Path path = new Path();
path.moveTo(x1,y1);
path.lineTo(x2,y2);
// if (event.getText() != null && event.getText().toString().contains("1")) {
// //Swipe left
// path.moveTo(rightSizeOfScreen, middleYValue);
// path.lineTo(leftSideOfScreen, middleYValue);
// } else {
// //Swipe right
// path.moveTo(leftSideOfScreen, middleYValue);
// path.lineTo(rightSizeOfScreen, middleYValue);
// }
gestureBuilder.addStroke(new GestureDescription.StrokeDescription(path, 0, time));
dispatchGesture(gestureBuilder.build(), new GestureResultCallback() {
@Override
public void onCompleted(GestureDescription gestureDescription) {
super.onCompleted(gestureDescription);
}
}, null);
}
}
开发者ID:yippeesoft,项目名称:NotifyTools,代码行数:30,代码来源:HelpService.java
示例2: gesturesAsync
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public void gesturesAsync(GestureDescription.StrokeDescription... strokes) {
if (mService == null)
return;
GestureDescription.Builder builder = new GestureDescription.Builder();
for (GestureDescription.StrokeDescription stroke : strokes) {
builder.addStroke(stroke);
}
mService.dispatchGesture(builder.build(), null, null);
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:11,代码来源:GlobalActionAutomator.java
示例3: gesturesAsync
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public void gesturesAsync(Object strokes) {
prepareForGesture();
mGlobalActionAutomator.gesturesAsync((GestureDescription.StrokeDescription[]) strokes);
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:6,代码来源:SimpleActionAutomator.java
示例4: gestures
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public boolean gestures(GestureDescription.StrokeDescription... strokes) {
if (mService == null)
return false;
GestureDescription.Builder builder = new GestureDescription.Builder();
for (GestureDescription.StrokeDescription stroke : strokes) {
builder.addStroke(stroke);
}
if (mHandler == null) {
return gesturesWithoutHandler(builder.build());
} else {
return gesturesWithHandler(builder.build());
}
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:15,代码来源:GlobalActionAutomator.java
示例5: gesture
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public boolean gesture(long start, long duration, int[]... points) {
Path path = pointsToPath(points);
return gestures(new GestureDescription.StrokeDescription(path, start, duration));
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:6,代码来源:GlobalActionAutomator.java
示例6: gestureAsync
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public void gestureAsync(long start, long duration, int[]... points) {
Path path = pointsToPath(points);
gesturesAsync(new GestureDescription.StrokeDescription(path, start, duration));
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:6,代码来源:GlobalActionAutomator.java
示例7: gestures
import android.accessibilityservice.GestureDescription; //导入依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.N)
public boolean gestures(Object strokes) {
prepareForGesture();
return mGlobalActionAutomator.gestures((GestureDescription.StrokeDescription[]) strokes);
}
开发者ID:feifadaima,项目名称:https-github.com-hyb1996-NoRootScriptDroid,代码行数:6,代码来源:SimpleActionAutomator.java
注:本文中的android.accessibilityservice.GestureDescription类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论