語言

EditorInfo.GetInitialTextAfterCursor(Int32, Int32) 方法

定義

在當前游標位置後取得 <文字的 var>長度</var> 字元。

public string? GetInitialTextAfterCursor(int length, int flags);
member this.GetInitialTextAfterCursor : int * int -> string

參數

length
Int32

文字的預期長度。

flags
Int32

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

傳回

游標位置後的文字;回傳文字的長度可能小於 <var>長度</var>。 當游標後沒有文字時,會回傳一個空字串。 也可能是 null 當編輯器或系統無法支援此協定時。

備註

在當前游標位置後取得 <文字的 var>長度</var> 字元。 可能是 null 因為該協定不支援。

Java 文件 android.view.inputmethod.EditorInfo.getInitialTextAfterCursor(int, int)

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

適用於