DpadRecyclerViewActions

Functions

Link copied to clipboard
fun execute(label: String, action: (recyclerView: DpadRecyclerView) -> Unit): ViewAction
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : RecyclerView.ViewHolder> scrollTo(itemViewMatcher: Matcher<View>, keyPressDelay: Int = DEFAULT_KEY_PRESS_DELAY): RecyclerViewActions.PositionableRecyclerViewAction

Similar to RecyclerViewActions.scrollToHolder, but instead of invoking scrollToPosition, it injects KeyEvents to simulate real DPAD events from the user

Link copied to clipboard
fun <T : RecyclerView.ViewHolder> scrollToHolder(viewHolderMatcher: Matcher<T>, keyPressDelay: Int = DEFAULT_KEY_PRESS_DELAY): RecyclerViewActions.PositionableRecyclerViewAction

Similar to RecyclerViewActions.scrollToHolder, but instead of invoking scrollToPosition, it injects KeyEvents to simulate real DPAD events from the user

Link copied to clipboard
fun selectLastPosition(smooth: Boolean, onPositionSelected: (position: Int) -> Unit = {}): ViewAction
Link copied to clipboard
fun selectPosition(position: Int, subPosition: Int = 0, smooth: Boolean = true): ViewAction
Link copied to clipboard
fun selectSubPosition(subPosition: Int, smooth: Boolean = true): ViewAction
Link copied to clipboard
fun waitForAdapterUpdate(updates: Int = 1, failOnTimeout: Boolean = false, timeout: Long = 2, timeoutUnit: TimeUnit = TimeUnit.SECONDS): ViewAction
Link copied to clipboard
fun waitForIdleScroll(timeout: Long = 5, timeoutUnit: TimeUnit = TimeUnit.SECONDS): ViewAction