UiAutomation.FindFocus(NodeFocus) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Find the view that has the specified focus type.
[Android.Runtime.Register("findFocus", "(I)Landroid/view/accessibility/AccessibilityNodeInfo;", "")]
public Android.Views.Accessibility.AccessibilityNodeInfo? FindFocus (Android.Views.Accessibility.NodeFocus focus);
[<Android.Runtime.Register("findFocus", "(I)Landroid/view/accessibility/AccessibilityNodeInfo;", "")>]
member this.FindFocus : Android.Views.Accessibility.NodeFocus -> Android.Views.Accessibility.AccessibilityNodeInfo
Parameters
- focus
- NodeFocus
The focus to find. One of AccessibilityNodeInfo#FOCUS_INPUT
or
AccessibilityNodeInfo#FOCUS_ACCESSIBILITY
.
Returns
The node info of the focused view or null.
- Attributes
Remarks
Find the view that has the specified focus type. The search is performed across all windows.
<strong>Note:</strong> In order to access the windows you have to opt-in to retrieve the interactive windows by setting the AccessibilityServiceInfo#FLAG_RETRIEVE_INTERACTIVE_WINDOWS
flag. Otherwise, the search will be performed only in the active window.
Java documentation for android.app.UiAutomation.findFocus(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.