| java.lang.Object | |
| ↳ | android.support.v7.widget.RecyclerView.SmoothScroller.Action |
Holds information about a smooth scroll request by a RecyclerView.SmoothScroller.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | UNDEFINED_DURATION | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Instead of specifying pixels to scroll, use the target position to jump using
scrollToPosition(int).
| |||||||||||
Sets the interpolator to calculate scroll steps
| |||||||||||
Updates the action with given parameters.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
| dx | Pixels to scroll horizontally |
|---|---|
| dy | Pixels to scroll vertically |
| dx | Pixels to scroll horizontally |
|---|---|
| dy | Pixels to scroll vertically |
| duration | Duration of the animation in milliseconds |
| 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 |
Instead of specifying pixels to scroll, use the target position to jump using
scrollToPosition(int).
You may prefer using this method if scroll target is really far away and you prefer to jump to a location and smooth scroll afterwards.
Note that calling this method takes priority over other update methods such as
update(int, int, int, Interpolator), setX(float),
setY(float) and #setInterpolator(Interpolator). If you call
jumpTo(int), the other changes will not be considered for this animation
frame.
| targetPosition | The target item position to scroll to using instant scrolling. |
|---|
Sets the interpolator to calculate scroll steps
| interpolator | The interpolator to use. If you specify an interpolator, you must also set the duration. |
|---|
Updates the action with given 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 |