Skip to content Skip to sidebar Skip to footer

Recyclerview Scroll_state_idle Is Being Called Late

On RecyclerView addOnScrollListener the property SCROLL_STATE_IDLE takes time to get called at end of the item size and when scrolled up to the top of the RecyclerView. But it work

Solution 1:

Having the same issue, the only workaround I've found is to send a stopScroll() whenever the RecyclerView gets a SCROLL_STATE_SETTLING, though not the ideal solution. Probably would be better to detect if it has reached the top or bottom edge, taking into account the scrolling direction, and then call stopScroll():

@OverridepublicvoidonScrollStateChanged(finalint state)
{
    super.onScrollStateChanged(state);

    if (state == RecyclerView.SCROLL_STATE_SETTLING)
    {
        this.stopScroll();
    }
}

Update

This issue seems to be a bug in the support library, though it was reported as fixed its clear that the problem still exists, so hopefully we should see an adequate solution in the future:

https://issuetracker.google.com/issues/66996774

Solution 2:

Invoke stopScroll() when your recyclerview has been reached to to bottom. I think Since it's support library version up, velocity is calulated and it makes delay a little.

Post a Comment for "Recyclerview Scroll_state_idle Is Being Called Late"