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 OverScroller.abortAnimation() directly.

boolean computeScrollOffset()

This method is deprecated. Use OverScroller.computeScrollOffset() directly.

static ScrollerCompat create(Context context, Interpolator interpolator)

This method is deprecated. Use OverScroller constructor directly.

static ScrollerCompat create(Context context)

This method is deprecated. Use OverScroller constructor directly.

void fling(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY)

This method is deprecated. Use OverScroller.fling(int, int, int, int, int, int, int, int) directly.

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 OverScroller.fling(int, int, int, int, int, int, int, int, int, int) directly.

float getCurrVelocity()

This method is deprecated. Use OverScroller.getCurrVelocity() directly.

int getCurrX()

This method is deprecated. Use OverScroller.getCurrX() directly.

int getCurrY()

This method is deprecated. Use OverScroller.getCurrY() directly.

int getFinalX()

This method is deprecated. Use OverScroller.getFinalX() directly.

int getFinalY()

This method is deprecated. Use OverScroller.getFinalY() directly.

boolean isFinished()

This method is deprecated. Use OverScroller.isFinished() directly.

boolean isOverScrolled()

This method is deprecated. Use OverScroller.isOverScrolled() directly.

void notifyHorizontalEdgeReached(int startX, int finalX, int overX)

This method is deprecated. Use OverScroller.notifyHorizontalEdgeReached(int, int, int) directly.

void notifyVerticalEdgeReached(int startY, int finalY, int overY)

This method is deprecated. Use OverScroller.notifyVerticalEdgeReached(int, int, int) directly.

boolean springBack(int startX, int startY, int minX, int maxX, int minY, int maxY)

This method is deprecated. Use OverScroller.springBack(int, int, int, int, int, int) directly.

void startScroll(int startX, int startY, int dx, int dy, int duration)

This method is deprecated. Use OverScroller.startScroll(int, int, int, int, int) directly.

void startScroll(int startX, int startY, int dx, int dy)

This method is deprecated. Use OverScroller.getCurrX() directly.

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.