public class DetoxSwipe
Along with class FlinglessSwiper, this is based on from Espresso's implementation of Swiping
(i.e. in androidx.test.espresso.action.Swipe - typically dispatched via the
androidx.test.espresso.action.GeneralSwipeAction action class).
The main differences compared to the original impl are:
Number of motion events isn't hardcoded to 10 (as in Espresso's). Mainly, more motions mean that the overall scrolling will add up to something more accurate (i.e. closer to the scrolling originally requested by the user, in DP).
Total swipe time globally isn't hardcoded, but determined by the swiper's implementation.
More comprehensible: broken down to two separate concern classes.
class FlinglessSwiper| Constructor and Description |
|---|
DetoxSwipe(float startX,
float startY,
float endX,
float endY,
int motionCount,
DetoxSwiper swiper)
Along with
class FlinglessSwiper, this is based on from Espresso's implementation of Swiping
(i.e. in androidx.test.espresso.action.Swipe - typically dispatched via the
androidx.test.espresso.action.GeneralSwipeAction action class). |
| Modifier and Type | Method and Description |
|---|---|
void |
perform() |
public DetoxSwipe(float startX,
float startY,
float endX,
float endY,
int motionCount,
@NotNull
DetoxSwiper swiper)
Along with class FlinglessSwiper, this is based on from Espresso's implementation of Swiping
(i.e. in androidx.test.espresso.action.Swipe - typically dispatched via the
androidx.test.espresso.action.GeneralSwipeAction action class).
The main differences compared to the original impl are:
Number of motion events isn't hardcoded to 10 (as in Espresso's). Mainly, more motions mean that the overall scrolling will add up to something more accurate (i.e. closer to the scrolling originally requested by the user, in DP).
Total swipe time globally isn't hardcoded, but determined by the swiper's implementation.
More comprehensible: broken down to two separate concern classes.
class FlinglessSwiper