java.lang.Object | |
↳ | android.view.inputmethod.EditorInfo |
An EditorInfo describes several attributes of a text editing object that an input method is communicating with (typically an EditText), most importantly the type of text content it contains.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creator<EditorInfo> | CREATOR | Used to make this class parcelable. | |||||||||
int | IME_ACTION_DONE | Bits of IME_MASK_ACTION: the action key performs a "done" operation, typically meaning the IME will be closed. | |||||||||
int | IME_ACTION_GO | Bits of IME_MASK_ACTION: the action key performs a "go" operation to take the user to the target of the text they typed. | |||||||||
int | IME_ACTION_NEXT | Bits of IME_MASK_ACTION: the action key performs a "next" operation, taking the user to the next field that will accept text. | |||||||||
int | IME_ACTION_NONE | Bits of IME_MASK_ACTION: there is no available action. | |||||||||
int | IME_ACTION_SEARCH | Bits of IME_MASK_ACTION: the action key performs a "search" operation, taking the user to the results of searching for the text the have typed (in whatever context is appropriate). | |||||||||
int | IME_ACTION_SEND | Bits of IME_MASK_ACTION: the action key performs a "send" operation, delivering the text to its target. | |||||||||
int | IME_ACTION_UNSPECIFIED | Bits of IME_MASK_ACTION: no specific action has been associated with this editor, let the editor come up with its own if it can. | |||||||||
int | IME_FLAG_NO_ACCESSORY_ACTION | Flag of imeOptions: used in conjunction with IME_MASK_ACTION, this indicates that the action should not be available as an accessory button when the input method is full-screen. | |||||||||
int | IME_FLAG_NO_ENTER_ACTION | Flag of imeOptions: used in conjunction with IME_MASK_ACTION, this indicates that the action should not be available in-line as a replacement for "enter" key. | |||||||||
int | IME_FLAG_NO_EXTRACT_UI | Flag of imeOptions: used to specify that the IME does not need to show its extracted text UI. | |||||||||
int | IME_MASK_ACTION | Set of bits in imeOptions that provide alternative actions associated with the "enter" key. | |||||||||
int | IME_NULL | Generic unspecified type for imeOptions. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||
From interface
android.text.InputType
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
actionId | If actionLabel has been given, this is the id for that command when the user presses its button that is delivered back with InputConnection.performEditorAction(). | ||||||||||
actionLabel | In some cases an IME may be able to display an arbitrary label for a command the user can perform, which you can specify here. | ||||||||||
extras | Any extra data to supply to the input method. | ||||||||||
fieldId | Identifier for the editor's field. | ||||||||||
fieldName | Additional name for the editor's field. | ||||||||||
hintText | The "hint" text of the text view, typically shown in-line when the text is empty to tell the user what to enter. | ||||||||||
imeOptions | Extended type information for the editor, to help the IME better integrate with it. | ||||||||||
initialCapsMode | The capitalization mode of the first character being edited in the text. | ||||||||||
initialSelEnd | The text offset of the end of the selection at the time editing began; -1 if not known. | ||||||||||
initialSelStart | The text offset of the start of the selection at the time editing began; -1 if not known. | ||||||||||
inputType | The content type of the text box, whose bits are defined by InputType. | ||||||||||
label | A label to show to the user describing the text they are writing. | ||||||||||
packageName | Name of the package that owns this editor. | ||||||||||
privateImeOptions | A string supplying additional information options that are private to a particular IME implementation. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Describe the kinds of special objects contained in this Parcelable's
marshalled representation.
| |||||||||||
Write debug output of this object.
| |||||||||||
Used to package this object into a Parcel.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
| |||||||||||
From interface android.os.Parcelable
|
Used to make this class parcelable.
Bits of IME_MASK_ACTION: the action key performs a "done" operation, typically meaning the IME will be closed.
Bits of IME_MASK_ACTION: the action key performs a "go" operation to take the user to the target of the text they typed. Typically used, for example, when entering a URL.
Bits of IME_MASK_ACTION: the action key performs a "next" operation, taking the user to the next field that will accept text.
Bits of IME_MASK_ACTION: there is no available action.
Bits of IME_MASK_ACTION: the action key performs a "search" operation, taking the user to the results of searching for the text the have typed (in whatever context is appropriate).
Bits of IME_MASK_ACTION: the action key performs a "send" operation, delivering the text to its target. This is typically used when composing a message.
Bits of IME_MASK_ACTION: no specific action has been associated with this editor, let the editor come up with its own if it can.
Flag of imeOptions: used in conjunction with IME_MASK_ACTION, this indicates that the action should not be available as an accessory button when the input method is full-screen. Note that by setting this flag, there can be cases where the action is simply never available to the user. Setting this generally means that you think showing text being edited is more important than the action you have supplied.
Flag of imeOptions: used in conjunction with IME_MASK_ACTION, this indicates that the action should not be available in-line as a replacement for "enter" key. Typically this is because the action has such a significant impact or is not recoverable enough that accidentally hitting it should be avoided, such as sending a message. Note that TextView will automatically set this flag for you on multi-line text views.
Flag of imeOptions: used to specify that the IME does not need to show its extracted text UI. For input methods that may be fullscreen, often when in landscape mode, this allows them to be smaller and let part of the application be shown behind. Though there will likely be limited access to the application available from the user, it can make the experience of a (mostly) fullscreen IME less jarring. Note that when this flag is specified the IME may not be set up to be able to display text, so it should only be used in situations where this is not needed.
Set of bits in imeOptions that provide alternative actions associated with the "enter" key. This both helps the IME provide better feedback about what the enter key will do, and also allows it to provide alternative mechanisms for providing that command.
Generic unspecified type for imeOptions.
If actionLabel has been given, this is the id for that command when the user presses its button that is delivered back with InputConnection.performEditorAction().
In some cases an IME may be able to display an arbitrary label for a command the user can perform, which you can specify here. You can not count on this being used.
Any extra data to supply to the input method. This is for extended communication with specific input methods; the name fields in the bundle should be scoped (such as "com.mydomain.im.SOME_FIELD") so that they don't conflict with others. This field is can be filled in from the editorExtras attribute of a TextView.
Identifier for the editor's field. This is optional, and may be 0. By default it is filled in with the result of View.getId() on the View that is being edited.
Additional name for the editor's field. This can supply additional name information for the field. By default it is null. The actual contents have no meaning.
The "hint" text of the text view, typically shown in-line when the text is empty to tell the user what to enter.
Extended type information for the editor, to help the IME better integrate with it.
The capitalization mode of the first character being edited in the text. Values may be any combination of TextUtils.CAP_MODE_CHARACTERS, TextUtils.CAP_MODE_WORDS, and TextUtils.CAP_MODE_SENTENCES, though you should generally just take a non-zero value to mean start out in caps mode.
The text offset of the end of the selection at the time editing began; -1 if not known.
The text offset of the start of the selection at the time editing began; -1 if not known.
The content type of the text box, whose bits are defined by InputType.
A label to show to the user describing the text they are writing.
Name of the package that owns this editor.
A string supplying additional information options that are
private to a particular IME implementation. The string must be
scoped to a package owned by the implementation, to ensure there are
no conflicts between implementations, but other than that you can put
whatever you want in it to communicate with the IME. For example,
you could have a string that supplies an argument like
"com.example.myapp.SpecialMode=3"
. This field is can be
filled in from the privateImeOptions
attribute of a TextView.
Describe the kinds of special objects contained in this Parcelable's marshalled representation.