View.ContentCaptureSession 屬性

定義

取得用來通知內容擷取事件的會話。 -或- 設定與此檢視相關聯的 (選擇性) ContentCaptureSession

public Android.Views.ContentCaptures.ContentCaptureSession? ContentCaptureSession { [Android.Runtime.Register("getContentCaptureSession", "()Landroid/view/contentcapture/ContentCaptureSession;", "", ApiSince=29)] get; [Android.Runtime.Register("setContentCaptureSession", "(Landroid/view/contentcapture/ContentCaptureSession;)V", "GetSetContentCaptureSession_Landroid_view_contentcapture_ContentCaptureSession_Handler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getContentCaptureSession", "()Landroid/view/contentcapture/ContentCaptureSession;", "", ApiSince=29)>]
[<set: Android.Runtime.Register("setContentCaptureSession", "(Landroid/view/contentcapture/ContentCaptureSession;)V", "GetSetContentCaptureSession_Landroid_view_contentcapture_ContentCaptureSession_Handler", ApiSince=29)>]
member this.ContentCaptureSession : Android.Views.ContentCaptures.ContentCaptureSession with get, set

屬性值

會話是由 明確設定,由 繼承 #setContentCaptureSession(ContentCaptureSession) 自上階、預設會話,或 null 如果此檢視已停用內容擷取。

屬性

備註

屬性 getter 檔:

取得用來通知內容擷取事件的會話。

android.view.View.getContentCaptureSession() JAVA 檔。

屬性 setter 檔:

設定與此檢視相關聯的 (選擇性) ContentCaptureSession

當您需要與此 ContentCaptureContext 檢視相關聯的內容擷取事件或其檢視階層 (為 ViewGroup) 時,應該呼叫這個方法。

例如,如果您的活動與 Web 網域相關聯,您必須先設定主要 DOM 的內容:

ContentCaptureSession mainSession = rootView.getContentCaptureSession();
              mainSession.setContentCaptureContext(ContentCaptureContext.forLocusId(Uri.parse(myUrl));

然後,如果頁面有 IFRAME ,您會為其建立新的會話:

ContentCaptureSession iframeSession = mainSession.createContentCaptureSession(
                  ContentCaptureContext.forLocusId(Uri.parse(iframeUrl)));
              iframeView.setContentCaptureSession(iframeSession);

android.view.View.setContentCaptureSession(android.view.contentcapture.ContentCaptureSession) JAVA 檔。

此頁面的部分是根據所建立和共用的工作進行修改,並根據 2.5 屬性授權中所述的詞彙來使用。

適用於