InputMethodService.SendDefaultEditorAction(Boolean) 方法

定义

要求输入目标通过 InputConnection#performEditorAction InputConnection.performEditorAction().. 执行其默认操作。

[Android.Runtime.Register("sendDefaultEditorAction", "(Z)Z", "GetSendDefaultEditorAction_ZHandler")]
public virtual bool SendDefaultEditorAction (bool fromEnterKey);
[<Android.Runtime.Register("sendDefaultEditorAction", "(Z)Z", "GetSendDefaultEditorAction_ZHandler")>]
abstract member SendDefaultEditorAction : bool -> bool
override this.SendDefaultEditorAction : bool -> bool

参数

fromEnterKey
Boolean

如果为 true,将执行此操作,就像用户按下键盘上的 Enter 键一样,也就是说,如果编辑器已设置,则<不会</>em>。EditorInfo#IME_FLAG_NO_ENTER_ACTION EditorInfo.IME_FLAG_NO_ENTER_ACTION 如果为 false,则无论编辑器如何设置该标志,都将发送该操作。

返回

返回一个布尔值,该值指示是否已发送操作。 如果为 false,则编辑器未指定默认操作,或者不希望输入键中的操作。 如果为 true,则发送操作(或者根本没有输入连接)。

属性

注解

要求输入目标通过 InputConnection#performEditorAction InputConnection.performEditorAction().. 执行其默认操作。

为了兼容,即使 EditorInfo#actionLabel EditorInfo.actionLabel 已设置此方法,此方法也不会执行自定义操作。 如果实现者想要执行自定义操作,应直接调用InputConnection#performEditorAction InputConnection.performEditorAction()EditorInfo#actionId EditorInfo.actionId它。

适用于 . 的 android.inputmethodservice.InputMethodService.sendDefaultEditorAction(boolean)Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于