Sdílet prostřednictvím


View.RestoreDefaultFocus Method

Definition

Gives focus to the default-focus view in the view hierarchy that has this view as a root.

[Android.Runtime.Register("restoreDefaultFocus", "()Z", "GetRestoreDefaultFocusHandler", ApiSince=26)]
public virtual bool RestoreDefaultFocus ();
[<Android.Runtime.Register("restoreDefaultFocus", "()Z", "GetRestoreDefaultFocusHandler", ApiSince=26)>]
abstract member RestoreDefaultFocus : unit -> bool
override this.RestoreDefaultFocus : unit -> bool

Returns

Whether this view or one of its descendants actually took focus

Attributes

Remarks

Gives focus to the default-focus view in the view hierarchy that has this view as a root. If the default-focus view cannot be found, falls back to calling #requestFocus(int).

Java documentation for android.view.View.restoreDefaultFocus().

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