語言

EditorInfo.GetInitialSelectedTextFormatted(Int32) 方法

定義

如果有的話,會取得所選的文字。

[Android.Runtime.Register("getInitialSelectedText", "(I)Ljava/lang/CharSequence;", "GetGetInitialSelectedText_IHandler", ApiSince=30)]
public virtual Java.Lang.ICharSequence? GetInitialSelectedTextFormatted(int flags);
[<Android.Runtime.Register("getInitialSelectedText", "(I)Ljava/lang/CharSequence;", "GetGetInitialSelectedText_IHandler", ApiSince=30)>]
abstract member GetInitialSelectedTextFormatted : int -> Java.Lang.ICharSequence
override this.GetInitialSelectedTextFormatted : int -> Java.Lang.ICharSequence

參數

flags
Int32

提供更多選項來控制文字回傳方式。 可能是 0 或 InputConnection#GET_TEXT_WITH_STYLES

傳回

目前選擇的文字(如果有的話)。 當沒有選取文字時,可能是空字串。 回傳時 null ,所選文字可能過長或不支援此協定。

屬性

備註

如果有的話,會取得所選的文字。 可能是 null 協定不支援,或是所選文字太長。

Java 文件 android.view.inputmethod.EditorInfo.getInitialSelectedText(int)

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

適用於