@UiThread public final class OverscrollEdgeEffect extends Object
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas canvas)
Draw the overscroll effect on a Canvas.
|
Runnable |
getInvalidationCallback()
Get the current invalidatation Runnable.
|
void |
setInvalidationCallback(Runnable runnable)
Set a Runnable that acts as a callback to invalidate the overscroll effect (for
example, as a response to user fling for example).
|
void |
setTheme(Context context)
Set the theme to use for overscroll from a given Context.
|
public void setTheme(@NonNull Context context)
context
- Context to use for the overscroll theme.public void setInvalidationCallback(@Nullable Runnable runnable)
draw(Canvas)
as a result of the invalidation.runnable
- Invalidation Runnable.getInvalidationCallback()
@Nullable public Runnable getInvalidationCallback()
setInvalidationCallback(Runnable)
public void draw(@NonNull Canvas canvas)
canvas
- Canvas to draw on.