Skip to content

Commit 615414c

Browse files
committed
Android:APIJSONTest 自动 UI 测试初步解决不能回放滑动事件
1 parent 38b684b commit 615414c

File tree

5 files changed

+255
-128
lines changed

5 files changed

+255
-128
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package apijson.demo.ui;
2+
3+
import android.view.MotionEvent;
4+
5+
public class TouchUtil {
6+
7+
public static String getActionName(int action) {
8+
switch (action) {
9+
case MotionEvent.ACTION_DOWN:
10+
return "DOWN";
11+
case MotionEvent.ACTION_MOVE:
12+
return "MOVE";
13+
case MotionEvent.ACTION_SCROLL:
14+
return "SCROLL";
15+
case MotionEvent.ACTION_UP:
16+
return "UP";
17+
case MotionEvent.ACTION_MASK:
18+
return "MASK";
19+
case MotionEvent.ACTION_OUTSIDE:
20+
return "OUTSIDE";
21+
default:
22+
return "CANCEL";
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)