setSmoothScrollMaxPendingAlignments

Whenever the user triggers a focus change via a key event, DpadRecyclerView will check if it already has max number of pending alignment changes before dispatching focus to the next view.

Example: User presses KeyEvent.KEYCODE_DPAD_RIGHT 5 times and max is 2.

If focus is at position N, pressing KeyEvent.KEYCODE_DPAD_RIGHT 5 times will only dispatch focus up to position N + max instead of N + 5

Once a view is aligned to its final position or RecyclerView.getScrollState is RecyclerView.SCROLL_STATE_IDLE, we consume that alignment change.

Parameters

max

Maximum number of pending alignment changes