IInputConnection.CommitCompletion(CompletionInfo) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提交完成,用户已从以前报告的可能项 InputMethodSession#displayCompletions
InputMethodSession#displayCompletions(CompletionInfo[]) 中选择或 InputMethodManager#displayCompletions
InputMethodManager#displayCompletions(View, CompletionInfo[])。
[Android.Runtime.Register("commitCompletion", "(Landroid/view/inputmethod/CompletionInfo;)Z", "GetCommitCompletion_Landroid_view_inputmethod_CompletionInfo_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool CommitCompletion(Android.Views.InputMethods.CompletionInfo? text);
[<Android.Runtime.Register("commitCompletion", "(Landroid/view/inputmethod/CompletionInfo;)Z", "GetCommitCompletion_Landroid_view_inputmethod_CompletionInfo_Handler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member CommitCompletion : Android.Views.InputMethods.CompletionInfo -> bool
参数
- text
- CompletionInfo
提交的完成。
返回
如果输入连接不再有效,则为 true;如果输入连接不再有效,则为 true。
- 属性
注解
提交完成,用户已从以前报告的可能项 InputMethodSession#displayCompletions InputMethodSession#displayCompletions(CompletionInfo[]) 中选择或 InputMethodManager#displayCompletions InputMethodManager#displayCompletions(View, CompletionInfo[])。 这将导致与用户从实际 UI 中选择完成一样的行为。 在所有其他方面,这就像 #commitText(CharSequence, int)。
<强 IME 作者:</strong>> 请小心发送收到的android.inputmethodservice.InputMethodService#onDisplayCompletions(CompletionInfo[])相同对象。
<强>编辑器作者:</strong> 如果你从不调用 InputMethodSession#displayCompletions(CompletionInfo[]) 或 InputMethodManager#displayCompletions(View, CompletionInfo[]) 然后行为良好的 IME 不应该在输入连接上调用它,但准备处理行为不当的 IME 而不崩溃。
调用此方法(具有有效 CompletionInfo 对象)将导致编辑器在批处理输入结束之后调用 android.inputmethodservice.InputMethodService#onUpdateSelection(int, int, int, int, int, int) 当前 IME。
<强>编辑器作者</强>,若要执行此操作,需要通过调用 InputMethodManager#updateSelection(View, int, int, int, int)来更改输入法,但请小心等待,直到批处理编辑正在进行时结束。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。