语言

TextClassifierEvent.Builder.SetActionIndices(Int32[]) 方法

定义

设置此事件中涉及的操作的索引。

[Android.Runtime.Register("setActionIndices", "([I)Landroid/view/textclassifier/TextClassifierEvent$Builder;", "GetSetActionIndices_arrayIHandler", ApiSince=29)]
public virtual Java.Lang.Object SetActionIndices(params int[] actionIndices);
[<Android.Runtime.Register("setActionIndices", "([I)Landroid/view/textclassifier/TextClassifierEvent$Builder;", "GetSetActionIndices_arrayIHandler", ApiSince=29)>]
abstract member SetActionIndices : int[] -> Java.Lang.Object
override this.SetActionIndices : int[] -> Java.Lang.Object

参数

actionIndices
Int32[]

int:此值不能为 null。

返回

此值不能为 null。

特性

注解

设置此事件中涉及的操作的索引。 操作通常按优先级顺序由文本分类器返回,索引为 0 时首选操作。 这些索引指示所报告的操作的位置。 例如

// 3 smart actions are shown at index 0, 1, 2 respectively in response to a link click.
new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_ACTIONS_SHOWN)
    .setEventIndex(0, 1, 2)
    ...
    .build();

...

// Smart action at index 1 is activated.
new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_SMART_ACTION)
    .setEventIndex(1)
    ...
    .build();

Android 参考。android.view.textclassifier.TextClassifierEvent.Builder.setActionIndices

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于