Share via


ActionMode.Callback2.OnGetContentRect(ActionMode, View, Rect) Method

Definition

Called when an ActionMode needs to be positioned on screen, potentially occluding view content.

[Android.Runtime.Register("onGetContentRect", "(Landroid/view/ActionMode;Landroid/view/View;Landroid/graphics/Rect;)V", "GetOnGetContentRect_Landroid_view_ActionMode_Landroid_view_View_Landroid_graphics_Rect_Handler", ApiSince=23)]
public virtual void OnGetContentRect (Android.Views.ActionMode? mode, Android.Views.View? view, Android.Graphics.Rect? outRect);
[<Android.Runtime.Register("onGetContentRect", "(Landroid/view/ActionMode;Landroid/view/View;Landroid/graphics/Rect;)V", "GetOnGetContentRect_Landroid_view_ActionMode_Landroid_view_View_Landroid_graphics_Rect_Handler", ApiSince=23)>]
abstract member OnGetContentRect : Android.Views.ActionMode * Android.Views.View * Android.Graphics.Rect -> unit
override this.OnGetContentRect : Android.Views.ActionMode * Android.Views.View * Android.Graphics.Rect -> unit

Parameters

mode
ActionMode

The ActionMode that requires positioning.

view
View

The View that originated the ActionMode, in whose coordinates the Rect should be provided.

outRect
Rect

The Rect to be populated with the content position. Use this to specify where the content in your app lives within the given view. This will be used to avoid occluding the given content Rect with the created ActionMode.

Attributes

Remarks

Called when an ActionMode needs to be positioned on screen, potentially occluding view content. Note this may be called on a per-frame basis.

Java documentation for android.view.ActionMode.Callback2.onGetContentRect(android.view.ActionMode, android.view.View, android.graphics.Rect).

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