View.HasExplicitFocusable Property

Definition

Returns true if this view is focusable or if it contains a reachable View for which #hasExplicitFocusable() returns true.

public virtual bool HasExplicitFocusable { [Android.Runtime.Register("hasExplicitFocusable", "()Z", "GetHasExplicitFocusableHandler", ApiSince=26)] get; }
[<get: Android.Runtime.Register("hasExplicitFocusable", "()Z", "GetHasExplicitFocusableHandler", ApiSince=26)>]
member this.HasExplicitFocusable : bool

Property Value

true if the view is focusable or if the view contains a focusable view, false otherwise

Attributes

Remarks

Returns true if this view is focusable or if it contains a reachable View for which #hasExplicitFocusable() returns true. A "reachable hasExplicitFocusable()" is a view whose parents do not block descendants focus. Only #VISIBLE views for which #getFocusable() would return #FOCUSABLE are considered focusable.

This method preserves the pre-Build.VERSION_CODES#O behavior of #hasFocusable() in that only views explicitly set focusable will cause this method to return true. A view set to #FOCUSABLE_AUTO that resolves to focusable will not.

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

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