Sdílet prostřednictvím


View.GetFocusedRect(Rect) Method

Definition

When a view has focus and the user navigates away from it, the next view is searched for starting from the rectangle filled in by this method.

[Android.Runtime.Register("getFocusedRect", "(Landroid/graphics/Rect;)V", "GetGetFocusedRect_Landroid_graphics_Rect_Handler")]
public virtual void GetFocusedRect (Android.Graphics.Rect? r);
[<Android.Runtime.Register("getFocusedRect", "(Landroid/graphics/Rect;)V", "GetGetFocusedRect_Landroid_graphics_Rect_Handler")>]
abstract member GetFocusedRect : Android.Graphics.Rect -> unit
override this.GetFocusedRect : Android.Graphics.Rect -> unit

Parameters

r
Rect

The rectangle to fill in, in this view's coordinates.

Attributes

Remarks

When a view has focus and the user navigates away from it, the next view is searched for starting from the rectangle filled in by this method.

By default, the rectangle is the #getDrawingRect(android.graphics.Rect)) of the view. However, if your view maintains some idea of internal selection, such as a cursor, or a selected row or column, you should override this method and fill in a more specific rectangle.

Java documentation for android.view.View.getFocusedRect(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