android.app.Instrumentation.waitForIdleSync()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(233)

本文整理了Java中android.app.Instrumentation.waitForIdleSync()方法的一些代码示例,展示了Instrumentation.waitForIdleSync()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instrumentation.waitForIdleSync()方法的具体详情如下:
包路径:android.app.Instrumentation
类名称:Instrumentation
方法名:waitForIdleSync

Instrumentation.waitForIdleSync介绍

暂无

代码示例

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

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();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

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();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

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();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
    UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
    getInstrumentation().waitForIdleSync();

    UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
    getInstrumentation().waitForIdleSync();
  }
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

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();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
    UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
    getInstrumentation().waitForIdleSync();

    UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
    getInstrumentation().waitForIdleSync();
  }
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

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();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void scroll() throws Throwable {
  View scrollable = ((View) activity.getCurrentScrollable()).findViewById(R.id.scroll);
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void scroll() throws Throwable {
  View scrollable = ((View) activity.getCurrentScrollable()).findViewById(R.id.scroll);
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP);
  getInstrumentation().waitForIdleSync();
  UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN);
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

@Override
protected void setUp() throws Exception {
  super.setUp();
  setActivityInitialTouchMode(true);
  activity = getActivity();
  scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable);
  callbackCounter = new int[2];
  getInstrumentation().waitForIdleSync();
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  for (int i = 0; i < 3; i++) {
    UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT);
    getInstrumentation().waitForIdleSync();
    scroll();
  }
  for (int i = 0; i < 3; i++) {
    UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.RIGHT);
    getInstrumentation().waitForIdleSync();
    scroll();
  }
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testScroll() throws Throwable {
  for (int i = 0; i < 5; i++) {
    UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT);
    getInstrumentation().waitForIdleSync();
    scroll();
  }
  for (int i = 0; i < 5; i++) {
    UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.RIGHT);
    getInstrumentation().waitForIdleSync();
    scroll();
  }
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testSaveAndRestoreInstanceState() throws Throwable {
    for (int i = 0; i < 3; i++) {
      UiTestUtils.saveAndRestoreInstanceState(this, activity);
      scroll();

      UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT);
      getInstrumentation().waitForIdleSync();
    }
  }
}

代码示例来源:origin: ksoichiro/Android-ObservableScrollView

public void testSaveAndRestoreInstanceState() throws Throwable {
    for (int i = 0; i < 5; i++) {
      UiTestUtils.saveAndRestoreInstanceState(this, activity);
      scroll();

      UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT);
      getInstrumentation().waitForIdleSync();
    }
  }
}

相关文章

Instrumentation类方法