InputConnectionWrapper.GetSurroundingText(Int32, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets text around the selection from the target connection.
[Android.Runtime.Register("getSurroundingText", "(III)Landroid/view/inputmethod/SurroundingText;", "GetGetSurroundingText_IIIHandler", ApiSince=31)]
public virtual Android.Views.InputMethods.SurroundingText? GetSurroundingText(int beforeLength, int afterLength, int flags);
[<Android.Runtime.Register("getSurroundingText", "(III)Landroid/view/inputmethod/SurroundingText;", "GetGetSurroundingText_IIIHandler", ApiSince=31)>]
abstract member GetSurroundingText : int * int * int -> Android.Views.InputMethods.SurroundingText
override this.GetSurroundingText : int * int * int -> Android.Views.InputMethods.SurroundingText
Parameters
- beforeLength
- Int32
The expected length of the text before the cursor. Value is 0 or greater
- afterLength
- Int32
The expected length of the text after the cursor. Value is 0 or greater
- flags
- Int32
Options for the returned text: 0 or the integer value of WithStyles.
Returns
The surrounding text result returned by the target connection, or null.
Implements
- Attributes
Remarks
Requests up to beforeLength characters before the selection, up to afterLength characters after it, and the selected text. The lengths are UTF-16 code units, not glyphs.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.