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
承諾的完成。
傳回
成功時為真;若輸入連線不再有效,則為假。
- 屬性
備註
提交使用者從先前回報的InputMethodSession#displayCompletions InputMethodSession#displayCompletions(CompletionInfo[])InputMethodManager#displayCompletions InputMethodManager#displayCompletions(View, CompletionInfo[])可能完成中選擇的完成。 這會導致使用者從實際介面選擇完成的行為。 在其他方面,這的行為就像 #commitText(CharSequence, int)。
<強烈>的IME作者:</strong> ,請務必寄送你收到 android.inputmethodservice.InputMethodService#onDisplayCompletions(CompletionInfo[])的同一個物品。
<強>Editor 作者們:</如果你> 從不呼叫 InputMethodSession#displayCompletions(CompletionInfo[]) ,或者 InputMethodManager#displayCompletions(View, CompletionInfo[]) 一個行為良好的 IME 不應該在你的輸入連線上呼叫這個,但要準備好面對不當反應的 IME 而不當機。
呼叫此方法(使用有效 CompletionInfo 物件)會在批次輸入結束後,編輯器在當前 IME 上呼叫 android.inputmethodservice.InputMethodService#onUpdateSelection(int, int, int, int, int, int) 。
<強編輯>作者<們/強者>,要做到這點,你需要透過呼叫 InputMethodManager#updateSelection(View, int, int, int, int)輸入法來告知這些變更,但如果批次編輯正在進行中,請小心等到批次編輯結束後再做。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。