Class OverscrollEdgeEffect

Object
org.mozilla.geckoview.OverscrollEdgeEffect

@UiThread public final class OverscrollEdgeEffect extends Object
  • Method Details

    • setTheme

      public void setTheme(@NonNull Context context)
      Set the theme to use for overscroll from a given Context.
      Parameters:
      context - Context to use for the overscroll theme.
    • setInvalidationCallback

      public void setInvalidationCallback(@Nullable 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). The Runnbale should schedule a future call to draw(Canvas) as a result of the invalidation.
      Parameters:
      runnable - Invalidation Runnable.
      See Also:
    • getInvalidationCallback

      @Nullable public Runnable getInvalidationCallback()
      Get the current invalidatation Runnable.
      Returns:
      Invalidation Runnable.
      See Also:
    • draw

      public void draw(@NonNull Canvas canvas)
      Draw the overscroll effect on a Canvas.
      Parameters:
      canvas - Canvas to draw on.