語言

InputConnectionWrapper.SetComposingText 方法

定義

多載

SetComposingText(ICharSequence, Int32)

待補充

[Android.Runtime.Register("setComposingText", "(Ljava/lang/CharSequence;I)Z", "GetSetComposingText_Ljava_lang_CharSequence_IHandler")]
public virtual bool SetComposingText(Java.Lang.ICharSequence? text, int newCursorPosition);
[<Android.Runtime.Register("setComposingText", "(Ljava/lang/CharSequence;I)Z", "GetSetComposingText_Ljava_lang_CharSequence_IHandler")>]
abstract member SetComposingText : Java.Lang.ICharSequence * int -> bool
override this.SetComposingText : Java.Lang.ICharSequence * int -> bool

參數

text
ICharSequence

必要時,還有寫作風格。 若文字中沒有樣式物件,則使用預設的樣式來組合文字。 請參考 ISpanned 如何將樣式物件附加到文字上。 SpannableString 和 SpannableStringBuilder 是介面 ISpanned的兩個實作。

newCursorPosition
Int32

文字周圍的新游標位置。 若 > 0,則相對於文本結尾為 - 1;若 <= 0,則相對於文本開頭。 所以值為 1 時,你總是會跳到插入全文之後的位置。 請注意,這表示你無法將游標置於文字中,因為編輯器可能會修改你提供的文字,導致無法正確指定該位置。

傳回

實作

屬性

備註

待補充

Java 文件 android.view.inputmethod.InputConnectionWrapper.setComposingText(java.lang.CharSequence, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SetComposingText(String, Int32)

待補充

public bool SetComposingText(string? text, int newCursorPosition);
member this.SetComposingText : string * int -> bool

參數

text
String
newCursorPosition
Int32

傳回

備註

待補充

Java 文件 android.view.inputmethod.InputConnectionWrapper.setComposingText(java.lang.CharSequence, int)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SetComposingText(ICharSequence, Int32, TextAttribute)

待補充

[Android.Runtime.Register("setComposingText", "(Ljava/lang/CharSequence;ILandroid/view/inputmethod/TextAttribute;)Z", "GetSetComposingText_Ljava_lang_CharSequence_ILandroid_view_inputmethod_TextAttribute_Handler", ApiSince=33)]
public virtual bool SetComposingText(Java.Lang.ICharSequence text, int newCursorPosition, Android.Views.InputMethods.TextAttribute? textAttribute);
[<Android.Runtime.Register("setComposingText", "(Ljava/lang/CharSequence;ILandroid/view/inputmethod/TextAttribute;)Z", "GetSetComposingText_Ljava_lang_CharSequence_ILandroid_view_inputmethod_TextAttribute_Handler", ApiSince=33)>]
abstract member SetComposingText : Java.Lang.ICharSequence * int * Android.Views.InputMethods.TextAttribute -> bool
override this.SetComposingText : Java.Lang.ICharSequence * int * Android.Views.InputMethods.TextAttribute -> bool

參數

newCursorPosition
Int32
textAttribute
TextAttribute

傳回

實作

屬性

備註

待補充

Java 文件 android.view.inputmethod.InputConnectionWrapper.setComposingText(java.lang.CharSequence, int, android.view.inputmethod.TextAttribute)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

SetComposingText(String, Int32, TextAttribute)

待補充

public bool SetComposingText(string text, int newCursorPosition, Android.Views.InputMethods.TextAttribute? textAttribute);
abstract member SetComposingText : string * int * Android.Views.InputMethods.TextAttribute -> bool
override this.SetComposingText : string * int * Android.Views.InputMethods.TextAttribute -> bool

參數

text
String
newCursorPosition
Int32
textAttribute
TextAttribute

傳回

實作

備註

待補充

Java 文件 android.view.inputmethod.InputConnectionWrapper.setComposingText(java.lang.CharSequence, int, android.view.inputmethod.TextAttribute)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於