android.text.method.TextInputMethod
This is the input method for typing normal text. It delegates to
other input methods appropriate to the current keyboard and language.
Nested Classes
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
TextInputMethod(Capitalize cap, boolean autotext)
Creates a new TextInputMethod with the specified capitalization
and correction properties.
Parameters
| cap
| when, if ever, to automatically capitalize. |
| autotext
| whether to automatically do spelling corrections.
|
Public Methods
public
static
void
clear(Editable e)
Clear all the input state (autotext, autocap, multitap, undo)
from the specified Editable, going beyond Editable.clear(), which
just clears the text but not the input state.
Parameters
| e
| the buffer whose text and state are to be cleared.
|
Returns a new or existing instance with the specified capitalization
and correction properties.
Parameters
| autotext
| whether to automatically do spelling corrections.
|
| cap
| when, if ever, to automatically capitalize. |
Returns a new or existing instance with no automatic capitalization
or correction.
public
boolean
onKeyDown(View view, Editable content, int keyCode, KeyEvent event)
Handles presses of the meta keys.
public
boolean
onKeyUp(View view, Editable content, int keyCode, KeyEvent event)
Handles release of the meta keys.
public
static
boolean
shouldCap(Capitalize cap, CharSequence cs, int off)
Returns whether it makes sense to automatically capitalize at the
specified position in the specified text, with the specified rules.
Parameters
| cap
| the capitalization rules to consider. |
| cs
| the text in which an insertion is being made. |
| off
| the offset into that text where the insertion is being made. |
Returns
- whether the character being inserted should be capitalized.