added in version 22.1.0
belongs to Maven artifact


public static abstract class RecyclerView.SmoothScroller
extends Object

Known Direct Subclasses

Base class for smooth scrolling. Handles basic tracking of the target view position and provides methods to trigger a programmatic scroll.


Nested classes

class RecyclerView.SmoothScroller.Action

Holds information about a smooth scroll request by a RecyclerView.SmoothScroller

interface RecyclerView.SmoothScroller.ScrollVectorProvider

An interface which is optionally implemented by custom RecyclerView.LayoutManager to provide a hint to a RecyclerView.SmoothScroller about the location of the target position. 

Public constructors


Public methods

PointF computeScrollVectorForPosition(int targetPosition)

Compute the scroll vector for a given target position.

View findViewByPosition(int position)
int getChildCount()
int getChildPosition(View view)
RecyclerView.LayoutManager getLayoutManager()
int getTargetPosition()

Returns the adapter position of the target item

void instantScrollToPosition(int position)

This method was deprecated in API level 24.1.0. Use jumpTo(int).

boolean isPendingInitialRun()

Returns true if SmoothScroller has been started but has not received the first animation callback yet.

boolean isRunning()
void setTargetPosition(int targetPosition)

Protected methods

void normalize(PointF scrollVector)

Normalizes the vector.

void onChildAttachedToWindow(View child)
abstract void