ScrollerCompat
public
final
class
ScrollerCompat
extends Object
| java.lang.Object | |
| ↳ | androidx.core.widget.ScrollerCompat |
This class is deprecated.
Use OverScroller directly.
Provides access to new Scroller APIs when available.
This class provides a platform version-independent mechanism for obeying the current device's preferred scroll physics and fling behavior. It offers a subset of the APIs from Scroller or OverScroller.
Summary
Public methods | |
|---|---|
void
|
abortAnimation()
This method is deprecated.
Use |
boolean
|
computeScrollOffset()
This method is deprecated.
Use |
static
ScrollerCompat
|
create(Context context, Interpolator interpolator)
This method is deprecated.
Use |
static
ScrollerCompat
|
create(Context context)
This method is deprecated.
Use |
void
|
fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY)
This method is deprecated.
Use |
void
|
fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY, int overX, int overY)
This method is deprecated.
Use |
float
|
getCurrVelocity()
This method is deprecated.
Use |
int
|
getCurrX()
This method is deprecated.
Use |
int
|
getCurrY()
This method is deprecated.
Use |
int
|
getFinalX()
This method is deprecated.
Use |
int
|
getFinalY()
This method is deprecated.
Use |
boolean
|
isFinished()
This method is deprecated.
Use |
boolean
|
isOverScrolled()
This method is deprecated.
Use |
void
|
notifyHorizontalEdgeReached(int startX, int finalX, int overX)
This method is deprecated.
Use |
void
|
notifyVerticalEdgeReached(int startY, int finalY, int overY)
This method is deprecated.
Use |
boolean
|
springBack(int startX, int startY, int minX, int maxX, int minY, int maxY)
This method is deprecated.
Use |
void
|
startScroll(int startX, int startY, int dx, int dy, int duration)
This method is deprecated.
Use |
void
|
startScroll(int startX, int startY, int dx, int dy)
This method is deprecated.
Use |
Inherited methods | |
|---|---|
Public methods
abortAnimation
public void abortAnimation ()
This method is deprecated.
Use OverScroller.abortAnimation() directly.
Stops the animation. Aborting the animation causes the scroller to move to the final x and y position.
computeScrollOffset
public boolean computeScrollOffset ()
This method is deprecated.
Use OverScroller.computeScrollOffset() directly.
Call this when you want to know the new location. If it returns true, the animation is not yet finished. loc will be altered to provide the new location.
| Returns | |
|---|---|
boolean |
|
create
public static ScrollerCompat create (Context context, Interpolator interpolator)
This method is deprecated.
Use OverScroller constructor directly.
| Parameters | |
|---|---|
context |
Context |
interpolator |
Interpolator |
| Returns | |
|---|---|
ScrollerCompat |
|
create
public static ScrollerCompat create (Context context)
This method is deprecated.
Use OverScroller constructor directly.