public interface ISingleCharWidgetApi
Thetype exposes the following members.
Set the delay after which auto-commit is triggered.
Enable or disable auto-commit feature.
Set the delay after which auto-freeze is triggered.
Enable or disable auto-space feature.
maximum number of character candidates.
Return an error code describing the last configuration error.
Return a string describing the last configuration error.
Gets or sets the color of the ink.
Rendering effect applied to the ink.
Set the delay after which strokes start fading out.
Set the duration of the strokes fade-out animation.
Set the ink fade-out effect.
Set the amount of alpha faded out after each pen-up event.
Set the target alpha value of the strokes fade-out animation.
Gets or sets the width of the ink.
Set the index of the insertion point.
Set the delay after which long press event is triggered.
Set the handwriting recognition mode.
speed/quality compromise rating.
the text managed by this widget.
Enable or disable transliteration feature.
maximum number of word candidates.
maximum number of word completion candidates.
maximum number of word prediction candidates.
Add given directory to handwriting resources search path. Directory name can point to a folder in the file system, or to a directory in a zip file. Handwriting resources can be loaded directly from the assets folder of an apk file, as shown below.
widget.AddSearchDir("zip://" + getContext().getPackageCodePath() + "!/assets/conf/text");
Add a stroke to the widget.
Return alternate candidate info for the character at specified index. This method computes the character range of the character at specified index, and provides alternate candidates. Alternate candidates can be selected by calling the ReplaceCharacters(Int32, Int32, String) method with parameters from the candidate information object.
Clear ink and text contained in the widget.
Clear handwriting resources search path.
Commit the current writing session, optionally clear ink from the screen. This method commits the current writing session if not empty and starts a new one. If the current writing session is empty, the widget does not start a new one. The meaning of a writing session depends on the current handwriting recognition mode.
Configure handwriting recognition engine. This method is non-blocking and returns immediately. Configuration is a lengthy process that may take up to several seconds, depending on the handwriting resources to be configured. It is recommended to setup a configuration listener to detect the end of the configuration process. When the device is rotated, Android completely recreates the UI without restarting the process of the application. After the device has been rotated, you need to configure the new instance ofby calling this method again.
Disable detection of the specified gesture.
Enable detection of the specified gesture.
Return user lexicon (array of words).
Insert the given string at the insertion point. This method inserts the given string into the input stream of the handwriting recognizer without freezing strokes. This method is particularly useful when implementing space or any other button.
Return whether specified gesture is enabled.
Simulate a pen abort event.
Simulate a pen down event. This simulates a user that starts writing.
Simulate a pen move event. This simulates a user writing.
Simulate a pen up event. This simulates a user that ends writing.
Replace characters in the text. This method can be used to select an alternate handwriting recognition candidate for any word or character. The specified character range shall span a word or a single character, and the provided replacement text shall be one of the possible candidates to trigger a word or character candidate change. Characters may be inserted at any location in the text by calling this method with the same start and end character indices and a non-empty replacement string. Characters may be deleted from the text by calling this method with a non-empty characters range and an empty or
Register a callback to invoke when a backspace gesture is detected.
Register a callback to invoke when configuration ends.
Register a callback to invoke when a long press gesture is detected.
Register a callback to invoke when user aborts writing.
Register a callback to invoke when user starts writing.
Register a callback to invoke when user is writing.
Register a callback to invoke when user ends writing.
Register a callback to invoke when a return gesture is detected.
Register a callback to invoke when a single tap gesture is detected.
Register a callback to invoke when the text changes.
Set user lexicon (array of words).
Return alternate candidate info for the word at specified index. This method computes the character range of the word at specified index, and provides alternate candidates and possible completions. Alternate candidates can be selected by calling the ReplaceCharacters(Int32, Int32, String) method with parameters from the candidate information object.