IInputConnection.GetCursorCapsMode(CapitalizationMode) Method

Definition

Retrieve the current capitalization mode in effect at the current cursor position in the text.

[Android.Runtime.Register("getCursorCapsMode", "(I)I", "GetGetCursorCapsMode_IHandler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Text.CapitalizationMode GetCursorCapsMode (Android.Text.CapitalizationMode reqModes);
[<Android.Runtime.Register("getCursorCapsMode", "(I)I", "GetGetCursorCapsMode_IHandler:Android.Views.InputMethods.IInputConnectionInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetCursorCapsMode : Android.Text.CapitalizationMode -> Android.Text.CapitalizationMode

Parameters

reqModes
CapitalizationMode

The desired modes to retrieve, as defined by android.text.TextUtils#getCapsMode TextUtils.getCapsMode. These constants are defined so that you can simply pass the current EditorInfo#inputType TextBoxAttribute.contentType value directly in to here.

Returns

the caps mode flags that are in effect at the current cursor position. See TYPE_TEXT_FLAG_CAPS_* in android.text.InputType.

Attributes

Remarks

Retrieve the current capitalization mode in effect at the current cursor position in the text. See android.text.TextUtils#getCapsMode TextUtils.getCapsMode for more information.

This method may fail either if the input connection has become invalid (such as its process crashing) or the client is taking too long to respond with the text (it is given a couple seconds to return). In either case, 0 is returned.

This method does not affect the text in the editor in any way, nor does it affect the selection or composing spans.

<strong>Editor authors:</strong> please be careful of race conditions in implementing this call. An IME can change the cursor position and use this method right away; you need to make sure the returned value is consistent with the results of the latest edits and changes to the cursor position.

Java documentation for android.view.inputmethod.InputConnection.getCursorCapsMode(int).

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.

Applies to