下面列出了android.support.test.espresso.action.GeneralLocation#BOTTOM_CENTER 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public static ViewAction swipeBottomSheetDown() {
/* The default swipe action has a constraint where the swiped view has to be displayed in at least 90%,
* which is not the case with bottom sheets...
*/
return new NoConstraintsSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER,
GeneralLocation. BOTTOM_CENTER, Press.FINGER);
}
private static ViewAction swipe() {
CoordinatesProvider start = GeneralLocation.TOP_CENTER;
CoordinatesProvider end = GeneralLocation.BOTTOM_CENTER;
return new GeneralSwipeAction(Swipe.SLOW, start, end, Press.FINGER);
}
public static ViewAction swipeTop() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.BOTTOM_CENTER, GeneralLocation.TOP_CENTER, Press.FINGER);
}
public static ViewAction swipeBottom() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER, GeneralLocation.BOTTOM_CENTER, Press.FINGER);
}
private static ViewAction swipeDown() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER,
GeneralLocation.BOTTOM_CENTER, Press.FINGER);
}
private static ViewAction swipeDown() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER,
GeneralLocation.BOTTOM_CENTER, Press.FINGER);
}
public static ViewAction swipeTop() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.BOTTOM_CENTER, GeneralLocation.TOP_CENTER, Press.FINGER);
}
public static ViewAction swipeBottom() {
return new GeneralSwipeAction(Swipe.FAST, GeneralLocation.TOP_CENTER, GeneralLocation.BOTTOM_CENTER, Press.FINGER);
}