View.DragShadowBuilder.OnProvideShadowMetrics(Point, Point) Method

Definition

Provides the metrics for the shadow image.

[Android.Runtime.Register("onProvideShadowMetrics", "(Landroid/graphics/Point;Landroid/graphics/Point;)V", "GetOnProvideShadowMetrics_Landroid_graphics_Point_Landroid_graphics_Point_Handler")]
public virtual void OnProvideShadowMetrics (Android.Graphics.Point? outShadowSize, Android.Graphics.Point? outShadowTouchPoint);
[<Android.Runtime.Register("onProvideShadowMetrics", "(Landroid/graphics/Point;Landroid/graphics/Point;)V", "GetOnProvideShadowMetrics_Landroid_graphics_Point_Landroid_graphics_Point_Handler")>]
abstract member OnProvideShadowMetrics : Android.Graphics.Point * Android.Graphics.Point -> unit
override this.OnProvideShadowMetrics : Android.Graphics.Point * Android.Graphics.Point -> unit

Parameters

outShadowSize
Point

A android.graphics.Point containing the width and height of the shadow image. Your application must set android.graphics.Point#x to the desired width and must set android.graphics.Point#y to the desired height of the image. Since Android P, the width and height must be positive values.

outShadowTouchPoint
Point

A android.graphics.Point for the position within the shadow image that should be underneath the touch point during the drag and drop operation. Your application must set android.graphics.Point#x to the X coordinate and android.graphics.Point#y to the Y coordinate of this position.

Attributes

Remarks

Provides the metrics for the shadow image. These include the dimensions of the shadow image, and the point within that shadow that should be centered under the touch location while dragging.

The default implementation sets the dimensions of the shadow to be the same as the dimensions of the View itself and centers the shadow under the touch point.

Java documentation for android.view.View.DragShadowBuilder.onProvideShadowMetrics(android.graphics.Point, android.graphics.Point).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to