Java Code Examples for android.accessibilityservice.AccessibilityService#GESTURE_SWIPE_RIGHT_AND_LEFT

The following examples show how to use android.accessibilityservice.AccessibilityService#GESTURE_SWIPE_RIGHT_AND_LEFT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AccessibilityServiceCompatUtils.java    From talkback with Apache License 2.0 5 votes vote down vote up
public static String gestureIdToString(int gestureId) {
  switch (gestureId) {
    case AccessibilityService.GESTURE_SWIPE_DOWN:
      return "GESTURE_SWIPE_DOWN";
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_LEFT:
      return "GESTURE_SWIPE_DOWN_AND_LEFT";
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_RIGHT:
      return "GESTURE_SWIPE_DOWN_AND_RIGHT";
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_UP:
      return "GESTURE_SWIPE_DOWN_AND_UP";
    case AccessibilityService.GESTURE_SWIPE_LEFT:
      return "GESTURE_SWIPE_LEFT";
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_DOWN:
      return "GESTURE_SWIPE_LEFT_AND_DOWN";
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_RIGHT:
      return "GESTURE_SWIPE_LEFT_AND_RIGHT";
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_UP:
      return "GESTURE_SWIPE_LEFT_AND_UP";
    case AccessibilityService.GESTURE_SWIPE_RIGHT:
      return "GESTURE_SWIPE_RIGHT";
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_DOWN:
      return "GESTURE_SWIPE_RIGHT_AND_DOWN";
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_LEFT:
      return "GESTURE_SWIPE_RIGHT_AND_LEFT";
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_UP:
      return "GESTURE_SWIPE_RIGHT_AND_UP";
    case AccessibilityService.GESTURE_SWIPE_UP:
      return "GESTURE_SWIPE_UP";
    case AccessibilityService.GESTURE_SWIPE_UP_AND_DOWN:
      return "GESTURE_SWIPE_UP_AND_DOWN";
    case AccessibilityService.GESTURE_SWIPE_UP_AND_LEFT:
      return "GESTURE_SWIPE_UP_AND_LEFT";
    case AccessibilityService.GESTURE_SWIPE_UP_AND_RIGHT:
      return "GESTURE_SWIPE_UP_AND_RIGHT";
    default:
      return "(unhandled " + gestureId + ")";
  }
}
 
Example 2
Source File: GestureShortcutMapping.java    From talkback with Apache License 2.0 5 votes vote down vote up
private String getGestureString(int gestureId) {
  switch (gestureId) {
    case AccessibilityService.GESTURE_SWIPE_UP:
      return context.getString(R.string.title_pref_shortcut_up);
    case AccessibilityService.GESTURE_SWIPE_DOWN:
      return context.getString(R.string.title_pref_shortcut_down);
    case AccessibilityService.GESTURE_SWIPE_LEFT:
      return context.getString(R.string.title_pref_shortcut_left);
    case AccessibilityService.GESTURE_SWIPE_RIGHT:
      return context.getString(R.string.title_pref_shortcut_right);
    case AccessibilityService.GESTURE_SWIPE_UP_AND_DOWN:
      return context.getString(R.string.title_pref_shortcut_up_and_down);
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_UP:
      return context.getString(R.string.title_pref_shortcut_down_and_up);
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_RIGHT:
      return context.getString(R.string.title_pref_shortcut_left_and_right);
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_LEFT:
      return context.getString(R.string.title_pref_shortcut_right_and_left);
    case AccessibilityService.GESTURE_SWIPE_UP_AND_RIGHT:
      return context.getString(R.string.title_pref_shortcut_up_and_right);
    case AccessibilityService.GESTURE_SWIPE_UP_AND_LEFT:
      return context.getString(R.string.title_pref_shortcut_up_and_left);
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_RIGHT:
      return context.getString(R.string.title_pref_shortcut_down_and_right);
    case AccessibilityService.GESTURE_SWIPE_DOWN_AND_LEFT:
      return context.getString(R.string.title_pref_shortcut_down_and_left);
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_DOWN:
      return context.getString(R.string.title_pref_shortcut_right_and_down);
    case AccessibilityService.GESTURE_SWIPE_RIGHT_AND_UP:
      return context.getString(R.string.title_pref_shortcut_right_and_up);
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_DOWN:
      return context.getString(R.string.title_pref_shortcut_left_and_down);
    case AccessibilityService.GESTURE_SWIPE_LEFT_AND_UP:
      return context.getString(R.string.title_pref_shortcut_left_and_up);
    default:
      return null;
  }
}