TextClassifierEvent.TextSelectionEvent クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
このクラスは、スマート テキスト選択機能に関連するイベントを表します。
[Android.Runtime.Register("android/view/textclassifier/TextClassifierEvent$TextSelectionEvent", ApiSince=29, DoNotGenerateAcw=true)]
public sealed class TextClassifierEvent.TextSelectionEvent : Android.Views.TextClassifiers.TextClassifierEvent, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/view/textclassifier/TextClassifierEvent$TextSelectionEvent", ApiSince=29, DoNotGenerateAcw=true)>]
type TextClassifierEvent.TextSelectionEvent = class
inherit TextClassifierEvent
interface IParcelable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 継承
- 属性
- 実装
注釈
このクラスは、スマート テキスト選択機能に関連するイベントを表します。
// User started a selection. e.g. "York" in text "New York City, NY".
new TextSelectionEvent.Builder(TYPE_SELECTION_STARTED)
.setEventContext(classificationContext)
.setEventIndex(0)
.build();
// System smart-selects a recognized entity. e.g. "New York City".
new TextSelectionEvent.Builder(TYPE_SMART_SELECTION_MULTI)
.setEventContext(classificationContext)
.setResultId(textSelection.getId())
.setRelativeWordStartIndex(-1) // Goes back one word to "New" from "York".
.setRelativeWordEndIndex(2) // Goes forward 2 words from "York" to start of ",".
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setEventIndex(1)
.build();
// User resets the selection to the original selection. i.e. "York".
new TextSelectionEvent.Builder(TYPE_SELECTION_RESET)
.setEventContext(classificationContext)
.setResultId(textSelection.getId())
.setRelativeSuggestedWordStartIndex(-1) // Repeated from above.
.setRelativeSuggestedWordEndIndex(2) // Repeated from above.
.setRelativeWordStartIndex(0) // Original selection is always at (0, 1].
.setRelativeWordEndIndex(1)
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setEventIndex(2)
.build();
// User modified the selection. e.g. "New".
new TextSelectionEvent.Builder(TYPE_SELECTION_MODIFIED)
.setEventContext(classificationContext)
.setResultId(textSelection.getId())
.setRelativeSuggestedWordStartIndex(-1) // Repeated from above.
.setRelativeSuggestedWordEndIndex(2) // Repeated from above.
.setRelativeWordStartIndex(-1) // Goes backward one word from "York" to
"New".
.setRelativeWordEndIndex(0) // Goes backward one word to exclude "York".
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setEventIndex(3)
.build();
// Smart (contextual) actions (at indices, 0, 1, 2) presented to the user.
// e.g. "Map", "Ride share", "Explore".
new TextSelectionEvent.Builder(TYPE_ACTIONS_SHOWN)
.setEventContext(classificationContext)
.setResultId(textClassification.getId())
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setActionIndices(0, 1, 2)
.setEventIndex(4)
.build();
// User chooses the "Copy" action.
new TextSelectionEvent.Builder(TYPE_COPY_ACTION)
.setEventContext(classificationContext)
.setResultId(textClassification.getId())
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setEventIndex(5)
.build();
// User chooses smart action at index 1. i.e. "Ride share".
new TextSelectionEvent.Builder(TYPE_SMART_ACTION)
.setEventContext(classificationContext)
.setResultId(textClassification.getId())
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setActionIndices(1)
.setEventIndex(5)
.build();
// Selection dismissed.
new TextSelectionEvent.Builder(TYPE_SELECTION_DESTROYED)
.setEventContext(classificationContext)
.setResultId(textClassification.getId())
.setEntityTypes(textClassification.getEntity(0))
.setScore(textClassification.getConfidenceScore(entityType))
.setEventIndex(6)
.build();
の Java ドキュメント android.view.textclassifier.TextClassifierEvent.TextSelectionEvent
。
このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。
フィールド
プロパティ
Class |
この |
Creator |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 |
EventCategory |
イベント カテゴリを返します。 (継承元 TextClassifierEvent) |
EventContext |
イベント コンテキストを返します。 (継承元 TextClassifierEvent) |
EventIndex |
このイベントが属する一連のイベントのインデックスを返します。 (継承元 TextClassifierEvent) |
EventType |
イベントの種類を返します。 (継承元 TextClassifierEvent) |
Extras |
このイベントに関する構造化されていない追加情報を含むバンドルを返します。 (継承元 TextClassifierEvent) |
Handle |
基になる Android インスタンスへのハンドル。 (継承元 Object) |
JniIdentityHashCode |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
JniPeerMembers |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 |
Locale |
検出されたロケールを返します。 (継承元 TextClassifierEvent) |
ModelName |
モデル名を返します。 (継承元 TextClassifierEvent) |
PeerReference |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
RelativeSuggestedWordEndIndex |
スマート選択範囲の末尾の相対単語 (排他) インデックスを返します。 |
RelativeSuggestedWordStartIndex |
スマート選択の開始位置の相対ワード インデックスを返します。 |
RelativeWordEndIndex |
選択範囲の末尾の相対単語 (排他) インデックスを返します。 |
RelativeWordStartIndex |
選択範囲の先頭の相対単語インデックスを返します。 |
ResultId |
このイベントに関連するテキスト分類子の結果の ID を返します。 (継承元 TextClassifierEvent) |
ThresholdClass |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 TextClassifierEvent) |
ThresholdType |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 TextClassifierEvent) |
メソッド
Clone() |
このオブジェクトのコピーを作成して返します。 (継承元 Object) |
DescribeContents() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 TextClassifierEvent) |
Dispose() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
Dispose(Boolean) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
Equals(Object) |
他のオブジェクトがこのオブジェクトと "等しい" かどうかを示します。 (継承元 Object) |
GetActionIndices() |
このイベントに関連するアクションのインデックスを返します。 (継承元 TextClassifierEvent) |
GetEntityTypes() |
エンティティ型の配列を返します。 (継承元 TextClassifierEvent) |
GetHashCode() |
オブジェクトのハッシュ コード値を返します。 (継承元 Object) |
GetScores() |
提案のスコアを返します。 (継承元 TextClassifierEvent) |
JavaFinalize() |
ガベージ コレクションがオブジェクトへの参照がなくなったと判断したときに、オブジェクトのガベージ コレクターによって呼び出されます。 (継承元 Object) |
Notify() |
このオブジェクトのモニターで待機している 1 つのスレッドをウェイクアップします。 (継承元 Object) |
NotifyAll() |
このオブジェクトのモニターで待機しているすべてのスレッドをウェイクアップします。 (継承元 Object) |
SetHandle(IntPtr, JniHandleOwnership) |
Handle プロパティを設定します。 (継承元 Object) |
ToArray<T>() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
ToString() |
オブジェクトの文字列形式を返します。 (継承元 Object) |
UnregisterFromRuntime() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
Wait() |
現在のスレッドが起動するまで待機します。通常<>は、通知</em> または <em>割り込み</em によって待機します>。 (継承元 Object) |
Wait(Int64) |
現在のスレッドが起動するまで待機します。通常<>は、通知</em> または>< em 割り込み</em>、または一定のリアルタイムが経過するまで待機します。 (継承元 Object) |
Wait(Int64, Int32) |
現在のスレッドが起動するまで待機します。通常<>は、通知</em> または>< em 割り込み</em>、または一定のリアルタイムが経過するまで待機します。 (継承元 Object) |
WriteToParcel(Parcel, ParcelableWriteFlags) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 TextClassifierEvent) |
明示的なインターフェイスの実装
IJavaPeerable.Disposed() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.DisposeUnlessReferenced() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.Finalized() |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.JniManagedPeerState |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 (継承元 Object) |
拡張メソッド
JavaCast<TResult>(IJavaObject) |
Android ランタイムチェック型変換を実行します。 |
JavaCast<TResult>(IJavaObject) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 |
GetJniTypeName(IJavaPeerable) |
このクラスは、スマート テキスト選択機能に関連するイベントを表します。 |