View.OnProvideContentCaptureNodeProperties 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.
Populates the properties of this View for Content Capture version 2.
[Android.Runtime.Register("onProvideContentCaptureNodeProperties", "(Landroid/view/contentcapture/ContentCaptureNodeProperties;)V", "GetOnProvideContentCaptureNodeProperties_Landroid_view_contentcapture_ContentCaptureNodeProperties_Handler", ApiSince=37)]
public virtual void OnProvideContentCaptureNodeProperties(Android.Views.ContentCaptures.ContentCaptureNodeProperties properties);
[<Android.Runtime.Register("onProvideContentCaptureNodeProperties", "(Landroid/view/contentcapture/ContentCaptureNodeProperties;)V", "GetOnProvideContentCaptureNodeProperties_Landroid_view_contentcapture_ContentCaptureNodeProperties_Handler", ApiSince=37)>]
abstract member OnProvideContentCaptureNodeProperties : Android.Views.ContentCaptures.ContentCaptureNodeProperties -> unit
override this.OnProvideContentCaptureNodeProperties : Android.Views.ContentCaptures.ContentCaptureNodeProperties -> unit
Parameters
- properties
- ContentCaptureNodeProperties
The mutable node properties to populate for this view.
- Attributes
Remarks
Populates the properties of this View for Content Capture version 2.
This method is called when a view eligible for content capture is initially registered and appears on the screen, or when its properties are explicitly requested again. The populated properties are subsequently sent to the intelligence service through NotifyNodeAppearedOrChanged(AutofillId, ContentCaptureNodeProperties).
The default implementation computes and sets the most relevant properties, such as the layout bounds relative to the nearest content-capture-important parent, the parent's autofill ID, and the view's content description. Subclasses overriding this method should call base.OnProvideContentCaptureNodeProperties(properties) to populate these default properties, and then modify them as appropriate.
Views that host a virtual view structure, such as a web page, must only populate the node properties representing the host view itself and return immediately. They must subsequently report virtual child node events on the main UI thread using NotifyNodeAppearedOrChanged(AutofillId, ContentCaptureNodeProperties) when nodes appear or change, and NotifyNodeDisappeared(AutofillId) when nodes disappear.
Android reference for android.view.View.onProvideContentCaptureNodeProperties.
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.