Android Guides | Samples

Android.App.UiAutomation.FindFocus Method

Find the view that has the specified focus type.

Syntax

[Android.Runtime.Register("findFocus", "(I)Landroid/view/accessibility/AccessibilityNodeInfo;", "")]
public AccessibilityNodeInfo FindFocus ([Android.Runtime.GeneratedEnum] NodeFocus focus)

See Also

Parameters

focus
The focus to find. One of AccessibilityNodeInfo.FocusInput or AccessibilityNodeInfo.FocusAccessibility.

Remarks

Find the view that has the specified focus type. The search is performed across all windows.

Note: In order to access the windows you have to opt-in to retrieve the interactive windows by setting the AccessibilityServiceInfo.FlagRetrieveInteractiveWindows flag. Otherwise, the search will be performed only in the active window.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18