ContentCaptureSession.NewViewStructure(View) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为“标准”视图创建一个 ViewStructure
。
[Android.Runtime.Register("newViewStructure", "(Landroid/view/View;)Landroid/view/ViewStructure;", "", ApiSince=29)]
public Android.Views.ViewStructure NewViewStructure (Android.Views.View view);
[<Android.Runtime.Register("newViewStructure", "(Landroid/view/View;)Landroid/view/ViewStructure;", "", ApiSince=29)>]
member this.NewViewStructure : Android.Views.View -> Android.Views.ViewStructure
参数
- view
- View
返回
- 属性
注解
为“标准”视图创建一个 ViewStructure
。
在布局可见视图后,应调用此方法;然后,视图必须填充结构并将其传递给 #notifyViewAppeared(ViewStructure)
。
<b>注意:<管理此视图下的虚拟结构的 /b>视图必须仅填充表示此视图的节点并立即返回,然后异步报告(不一定在 UI 线程中)时,子节点出现、消失或通过调用ContentCaptureSession#notifyViewAppeared(ViewStructure)
ContentCaptureSession#notifyViewDisappeared(AutofillId)
更改其文本,以及ContentCaptureSession#notifyViewTextChanged(AutofillId, CharSequence)
分别更改其文本。 必须使用子级的结构创建ContentCaptureSession#newVirtualViewStructure(AutofillId, long)
,并且autofillId
可以通过或ContentCaptureSession#newAutofillId(AutofillId, long)
获取childStructure.getAutofillId()
子级的结构。
当虚拟视图层次结构表示网页时,还应:
<应为该 URL 生成 ul><li>调用 ContentCaptureManager#getContentCaptureConditions()
来推断内容捕获事件。 <li>为呈现新 URL(如)IFRAME
的每个 HTML 元素创建一个新ContentCaptureSession
子元素,并使用该会话从该子树通知事件。 </ul>
<b>注意: </b>以下方法structure
将被忽略: <ul<>li<>ViewStructure#setChildCount(int)
liViewStructure#newChild(int)
<>ViewStructure#asyncNewChild(int)
<>><ViewStructure#asyncCommit()
<ViewStructure#setHtmlInfo(android.view.ViewStructure.HtmlInfo)
>><ViewStructure#newHtmlInfoBuilder(String)
ViewStructure#setDataIsSensitive(boolean)
><ViewStructure#setWebDomain(String)
<><>ViewStructure#setElevation(float)
><<>ViewStructure#setTransformation(android.graphics.Matrix)
><<ViewStructure#addChildCount(int)
>ViewStructure#getChildCount()
ViewStructure#setAlpha(float)
/ul>
适用于 . 的 android.view.contentcapture.ContentCaptureSession.newViewStructure(android.view.View)
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。