EdgeEffectCompat

public final class EdgeEffectCompat


Helper for accessing EdgeEffect. This class is used to access EdgeEffect on platform versions that support it. When running on older platforms it will result in no-ops. It should be used by views that wish to use the standard Android visual effects at the edges of scrolling containers.

Summary

Public constructors

This method is deprecated.

Use EdgeEffect constructor directly or create.

Public methods

static @NonNull EdgeEffect

Constructs and returns a new EdgeEffect themed using the given context, allowing support for the view attributes.

boolean
draw(Canvas canvas)

This method is deprecated.

Use draw directly.

void

This method is deprecated.

Use finish directly.

static float

Returns the pull distance needed to be released to remove the showing effect.

boolean

This method is deprecated.

Use isFinished directly.

boolean
onAbsorb(int velocity)

This method is deprecated.

Use onAbsorb directly.

boolean
onPull(float deltaDistance)

This method is deprecated.

Use onPull.

boolean
onPull(float deltaDistance, float displacement)

This method is deprecated.

Use onPull directly.

static void
onPull(
    @NonNull EdgeEffect edgeEffect,
    float deltaDistance,
    float displacement
)

A view should call this when content is pulled away from an edge by the user.

static float
onPullDistance(
    @NonNull EdgeEffect edgeEffect,
    float deltaDistance,
    float displacement
)

A view should call this when content is pulled away from an edge by the user.

boolean