Udostępnij za pośrednictwem


View.SetFocusable(ViewFocusability) Method

Definition

Sets whether this view can receive focus.

[Android.Runtime.Register("setFocusable", "(I)V", "GetSetFocusable_IHandler", ApiSince=26)]
public virtual void SetFocusable (Android.Views.ViewFocusability focusable);
[<Android.Runtime.Register("setFocusable", "(I)V", "GetSetFocusable_IHandler", ApiSince=26)>]
abstract member SetFocusable : Android.Views.ViewFocusability -> unit
override this.SetFocusable : Android.Views.ViewFocusability -> unit

Parameters

focusable
ViewFocusability

One of #NOT_FOCUSABLE, #FOCUSABLE, or #FOCUSABLE_AUTO.

Attributes

Remarks

Sets whether this view can receive focus.

Setting this to #FOCUSABLE_AUTO tells the framework to determine focusability automatically based on the view's interactivity. This is the default.

Setting this to NOT_FOCUSABLE will ensure that this view is also not focusable in touch mode.

Java documentation for android.view.View.setFocusable(int).

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