The ISingleCharWidgetApi type exposes the following members.
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 of ISingleCharWidgetApi by 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.