EdgeEffect

Class of android.widget · EdgeEffect.java · Android's reference

public class EdgeEffect

The overscroll of a scrolling edge, as Android 12's stretch: a distance that pulls grow and a release eases back to zero over a few frames. The stretch itself is drawn by the scrolling view, from getDistance.

Fields

public static final int TYPE_GLOW = 0 source
public static final int TYPE_STRETCH = 1 source
public static final BlendMode DEFAULT_BLEND_MODE = BlendMode.SRC_ATOP source

Constructors

public EdgeEffect(Context context) empty body source
public EdgeEffect(Context context, AttributeSet attrs) empty body source

Methods

public void setSize(int width, int height) source
public void setType(int type) source
public int getType() source
public boolean isFinished() source
public void finish() source
public void onPull(float deltaDistance) source
public void onPull(float deltaDistance, float displacement) source
public float onPullDistance(float deltaDistance, float displacement) source
public float getDistance() source
public void onRelease() source
public void onAbsorb(int velocity) source
public void setColor(int color) source
public int getColor() source
public void setBlendMode(BlendMode blendmode) source
public BlendMode getBlendMode() source
public int getMaxHeight() source
public boolean draw(Canvas canvas) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.