Android APIs
public static class

RecyclerView.SmoothScroller.Action

extends Object
java.lang.Object
   ↳ android.support.v7.widget.RecyclerView.SmoothScroller.Action

Class Overview

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

Summary

Constants
int UNDEFINED_DURATION
Public Constructors
RecyclerView.SmoothScroller.Action(int dx, int dy)
RecyclerView.SmoothScroller.Action(int dx, int dy, int duration)
RecyclerView.SmoothScroller.Action(int dx, int dy, int duration, Interpolator interpolator)
Public Methods
int getDuration()
int getDx()
int getDy()
Interpolator getInterpolator()
void setDuration(int duration)
void setDx(int dx)
void setDy(int dy)
void setInterpolator(Interpolator interpolator)
Sets the interpolator to calculate scroll steps
void update(int dx, int dy, int duration, Interpolator interpolator)
Updates the action with given parameters.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int UNDEFINED_DURATION

Constant Value: -2147483648 (0x80000000)

Public Constructors

public RecyclerView.SmoothScroller.Action (int dx, int dy)

Parameters
dx Pixels to scroll horizontally
dy Pixels to scroll vertically

public RecyclerView.SmoothScroller.Action (int dx, int dy, int duration)

Parameters
dx Pixels to scroll horizontally
dy Pixels to scroll vertically
duration Duration of the animation in milliseconds

public RecyclerView.SmoothScroller.Action (int dx, int dy, int duration, Interpolator interpolator)

Parameters
dx Pixels to scroll horizontally
dy Pixels to scroll vertically
duration Duration of the animation in milliseconds
interpolator Interpolator to be used when calculating scroll position in each animation step

Public Methods

public int getDuration ()

public int getDx ()

public int getDy ()

public Interpolator getInterpolator ()

public void setDuration (int duration)

public void setDx (int dx)

public void setDy (int dy)

public void setInterpolator (Interpolator interpolator)

Sets the interpolator to calculate scroll steps

Parameters
interpolator The interpolator to use. If you specify an interpolator, you must also set the duration.
See Also

public void update (int dx, int dy, int duration, Interpolator interpolator)

Updates the action with given parameters.

Parameters
dx Pixels to scroll horizontally
dy Pixels to scroll vertically
duration Duration of the animation in milliseconds
interpolator Interpolator to be used when calculating scroll position in each animation step