Sdílet prostřednictvím


ViewGroup.OnRequestFocusInDescendants(Int32, Rect) Method

Definition

Look for a descendant to call View#requestFocus on.

[Android.Runtime.Register("onRequestFocusInDescendants", "(ILandroid/graphics/Rect;)Z", "GetOnRequestFocusInDescendants_ILandroid_graphics_Rect_Handler")]
protected virtual bool OnRequestFocusInDescendants (int direction, Android.Graphics.Rect? previouslyFocusedRect);
[<Android.Runtime.Register("onRequestFocusInDescendants", "(ILandroid/graphics/Rect;)Z", "GetOnRequestFocusInDescendants_ILandroid_graphics_Rect_Handler")>]
abstract member OnRequestFocusInDescendants : int * Android.Graphics.Rect -> bool
override this.OnRequestFocusInDescendants : int * Android.Graphics.Rect -> bool

Parameters

direction
Int32

One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT

previouslyFocusedRect
Rect

The rectangle (in this View's coordinate system) to give a finer grained hint about where focus is coming from. May be null if there is no hint.

Returns

Whether focus was taken.

Attributes

Remarks

Look for a descendant to call View#requestFocus on. Called by ViewGroup#requestFocus(int, android.graphics.Rect) when it wants to request focus within its children. Override this to customize how your ViewGroup requests focus within its children.

Java documentation for android.view.ViewGroup.onRequestFocusInDescendants(int, 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