InputMethod.AccessibilityInputConnection.GetCursorCapsMode(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.
Retrieve the current capitalization mode in effect at the current cursor position in the text.
[Android.Runtime.Register("getCursorCapsMode", "(I)I", "", ApiSince=33)]
public int GetCursorCapsMode (int reqModes);
[<Android.Runtime.Register("getCursorCapsMode", "(I)I", "", ApiSince=33)>]
member this.GetCursorCapsMode : int -> int
Parameters
- reqModes
- Int32
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.
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.