Udostępnij za pośrednictwem


View.ClearFocus Method

Definition

Called when this view wants to give up focus.

[Android.Runtime.Register("clearFocus", "()V", "GetClearFocusHandler")]
public virtual void ClearFocus ();
[<Android.Runtime.Register("clearFocus", "()V", "GetClearFocusHandler")>]
abstract member ClearFocus : unit -> unit
override this.ClearFocus : unit -> unit
Attributes

Remarks

Called when this view wants to give up focus. If focus is cleared #onFocusChanged(boolean, int, android.graphics.Rect) is called.

<strong>Note:</strong> When not in touch-mode, the framework will try to give focus to the first focusable View from the top after focus is cleared. Hence, if this View is the first from the top that can take focus, then all callbacks related to clearing focus will be invoked after which the framework will give focus to this view.

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

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