Class View.DragShadow

java.lang.Object
icyllis.modernui.view.View.DragShadow
Enclosing class:
View

public static class View.DragShadow extends Object
Creates an image that the system displays during the drag and drop operation.
  • Constructor Details

    • DragShadow

      public DragShadow(View view)
    • DragShadow

      public DragShadow()
      Construct a shadow builder object with no associated View. This constructor variant is only useful when the onProvideShadowCenter(Point)} and onDrawShadow(Canvas) methods are also overridden in order to supply the drag shadow's dimensions and appearance without reference to any View object.
  • Method Details

    • getView

      @Nullable public final View getView()
    • onProvideShadowCenter

      public void onProvideShadowCenter(@NonNull Point outShadowCenter)
      Called when the view is not mouse hovered or shadow is nonnull, to determine where the mouse cursor position is in the shadow.
      Parameters:
      outShadowCenter - the center point in the shadow
    • onDrawShadow

      public void onDrawShadow(@NonNull Canvas canvas)
      Draw the shadow.
      Parameters:
      canvas - canvas to draw content