View.RequestFocus View.RequestFocus Method

Definition

Overloads

RequestFocus(FocusSearchDirection, Rect) RequestFocus(FocusSearchDirection, Rect)

Call this to try to give focus to a specific view or to one of its descendants and give it hints about the direction and a specific rectangle that the focus is coming from.

RequestFocus(FocusSearchDirection) RequestFocus(FocusSearchDirection)

Call this to try to give focus to a specific view or to one of its descendants and give it a hint about what direction focus is heading.

RequestFocus() RequestFocus()

Call this to try to give focus to a specific view or to one of its descendants.

RequestFocus(FocusSearchDirection, Rect) RequestFocus(FocusSearchDirection, Rect)

Call this to try to give focus to a specific view or to one of its descendants and give it hints about the direction and a specific rectangle that the focus is coming from.

[Android.Runtime.Register("requestFocus", "(ILandroid/graphics/Rect;)Z", "GetRequestFocus_ILandroid_graphics_Rect_Handler")]
public virtual bool RequestFocus (Android.Views.FocusSearchDirection direction, Android.Graphics.Rect previouslyFocusedRect);
abstract member RequestFocus : Android.Views.FocusSearchDirection * Android.Graphics.Rect -> bool
override this.RequestFocus : Android.Views.FocusSearchDirection * Android.Graphics.Rect -> bool

Parameters

direction
FocusSearchDirection FocusSearchDirection

One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT

previouslyFocusedRect
Rect 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

Remarks

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.

RequestFocus(FocusSearchDirection) RequestFocus(FocusSearchDirection)

Call this to try to give focus to a specific view or to one of its descendants and give it a hint about what direction focus is heading.

[Android.Runtime.Register("requestFocus", "(I)Z", "")]
public bool RequestFocus (Android.Views.FocusSearchDirection direction);
member this.RequestFocus : Android.Views.FocusSearchDirection -> bool

Parameters

direction
FocusSearchDirection FocusSearchDirection

One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT

Returns

Remarks

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.

RequestFocus() RequestFocus()

Call this to try to give focus to a specific view or to one of its descendants.

[Android.Runtime.Register("requestFocus", "()Z", "")]
public bool RequestFocus ();
member this.RequestFocus : unit -> bool

Returns

Remarks

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