Skip to content

Commit aa13723

Browse files
committed
Android:APIJSONTest 自动化 UI 测试优化 Action 显示名称
1 parent 88d9bae commit aa13723

File tree

1 file changed

+2
-1
lines changed
  • APIJSON-Android/APIJSONTest/app/src/main/java/apijson/demo

1 file changed

+2
-1
lines changed

APIJSON-Android/APIJSONTest/app/src/main/java/apijson/demo/InputUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
public class InputUtil {
88

99
public static String getActionName(int action) {
10-
return MotionEvent.actionToString(action);
10+
String s = StringUtil.getTrimedString(MotionEvent.actionToString(action));
11+
return s.startsWith("ACTION_") ? s.substring("ACTION_".length()) : s;
1112
// switch (action) {
1213
// case MotionEvent.ACTION_DOWN:
1314
// return "DOWN";

0 commit comments

Comments
 (0)