下面列出了android.test.TouchUtils#touchAndCancelView ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public void testScroll() throws Throwable {
TouchUtils.touchAndCancelView(this, scrollable);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
}
public void testScroll() throws Throwable {
TouchUtils.touchAndCancelView(this, scrollable);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
}
public void testScroll() throws Throwable {
TouchUtils.touchAndCancelView(this, scrollable);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
}
public void testScroll() throws Throwable {
TouchUtils.touchAndCancelView(this, scrollable);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
}
public void testScroll() throws Throwable {
TouchUtils.touchAndCancelView(this, scrollable);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
getInstrumentation().waitForIdleSync();
}