View.DragShadowBuilder.OnProvideShadowMetrics(Point, Point) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
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.