INNER CODE UNIT · Java

pullToSmartRefresh

JsonChao/Awesome-WanAndroid · app/src/androidTest/java/json/chao/com/wanandroid/BasePageTest.java:95

    protected void pullToSmartRefresh(@IdRes int refreshLayoutId) {
        onView(allOf(withId(refreshLayoutId), hasFocus()))
                .check(matches(isDisplayed()))
                .perform(swipeDown());
    }

    /**
     * Scroll recyclerView to specify position
     *
     * @param recyclerViewId IdRes to recyclerView
     * @param position specify position
     */
    protected void scrollRecyclerViewToPosition(@IdRes int recyclerViewId, int position) {
        onView(allOf(withId(recyclerViewId), hasFocus()))
                .check(matches(isDisplayed()))
                .perform(scrollToPosition(position));
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…