Java Code Examples for android.support.test.espresso.action.Swipe#SLOW
The following examples show how to use
android.support.test.espresso.action.Swipe#SLOW .
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: ViewActions.java From SwipeCoordinator with Apache License 2.0 | 5 votes |
static ViewAction swipeRightNotReachingThreshold(Context context) { final float x = getWidthScreen(context) * 0.3f; return new GeneralSwipeAction(Swipe.SLOW, GeneralLocation.TOP_LEFT, new CoordinatesProvider() { @Override public float[] calculateCoordinates(View view) { return new float[] {x, 0f}; } }, Press.FINGER); }
Example 2
Source File: ViewActions.java From SwipeCoordinator with Apache License 2.0 | 5 votes |
static ViewAction swipeRightReachingThreshold(Context context) { final float x = getWidthScreen(context) * 0.8f; return new GeneralSwipeAction(Swipe.SLOW, GeneralLocation.TOP_LEFT, new CoordinatesProvider() { @Override public float[] calculateCoordinates(View view) { return new float[] {x, 0f}; } }, Press.FINGER); }
Example 3
Source File: ViewActions.java From SwipeCoordinator with Apache License 2.0 | 5 votes |
static ViewAction swipeDownNotReachingThreshold(Context context) { final float y = getHeightScreen(context) * 0.3f; return new GeneralSwipeAction(Swipe.SLOW, GeneralLocation.TOP_LEFT, new CoordinatesProvider() { @Override public float[] calculateCoordinates(View view) { return new float[] {0f, y}; } }, Press.FINGER); }
Example 4
Source File: ViewActions.java From SwipeCoordinator with Apache License 2.0 | 5 votes |
static ViewAction swipeDownReachingThreshold(Context context) { final float y = getHeightScreen(context) * 0.8f; return new GeneralSwipeAction(Swipe.SLOW, GeneralLocation.TOP_LEFT, new CoordinatesProvider() { @Override public float[] calculateCoordinates(View view) { return new float[] {0f, y}; } }, Press.FINGER); }
Example 5
Source File: MapActivityTest.java From mobile-android-samples with BSD 3-Clause "New" or "Revised" License | 4 votes |
private static ViewAction swipe() { CoordinatesProvider start = GeneralLocation.TOP_CENTER; CoordinatesProvider end = GeneralLocation.BOTTOM_CENTER; return new GeneralSwipeAction(Swipe.SLOW, start, end, Press.FINGER); }