InputTypes Enum
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.
Enumerates values returned by several types and taken as a parameter of the F:Android.Widget.SearchView.SetInputType, and F:Android.Widget.TextView.SetRawInputType members.
This enumeration supports a bitwise combination of its member values.
[System.Flags]
public enum InputTypes
[<System.Flags>]
type InputTypes =
- Inheritance
-
InputTypes
- Attributes
Fields
| Name | Value | Description |
|---|---|---|
| DatetimeVariationNormal | 0 | Default variation of TYPE_CLASS_DATETIME: allows entering both a date and time. Android reference for 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. |
| Null | 0 | Special content type for when no explicit type has been specified. This should be interpreted to mean that the target input connection is not rich, it can not process and show things like candidate text nor retrieve the current text, so the input method will need to run in a limited "generate key events" mode, if it supports it. Note that some input methods may not support it, for example a voice-based input method will likely not be able to generate key events even if this flag is set. Android reference for 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. |
| NumberVariationNormal | 0 | Default variation of TYPE_CLASS_NUMBER: plain normal numeric text. This was added in Build.VERSION_CODES.HONEYCOMB. An IME must target this API version or later to see this input type; if it doesn't, a request for this type will be dropped when passed through EditorInfo.makeCompatible(int). Android reference for 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. |
| TextVariationNormal | 0 | Default variation of TYPE_CLASS_TEXT: plain old normal text. Android reference for 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. |
| ClassText | 1 | Class for normal text. This class supports the following flags (only one of which should be set): TYPE_TEXT_FLAG_CAP_CHARACTERS, TYPE_TEXT_FLAG_CAP_WORDS, and. TYPE_TEXT_FLAG_CAP_SENTENCES. It also supports the following variations: TYPE_TEXT_VARIATION_NORMAL, and TYPE_TEXT_VARIATION_URI. If you do not recognize the variation, normal should be assumed. Android reference for 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. |
| ClassNumber | 2 | Class for numeric text. This class supports the following flags: TYPE_NUMBER_FLAG_SIGNED and TYPE_NUMBER_FLAG_DECIMAL. It also supports the following variations: TYPE_NUMBER_VARIATION_NORMAL and TYPE_NUMBER_VARIATION_PASSWORD. IME authors: If you do not recognize the variation, normal should be assumed. Android reference for 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. |
| ClassPhone | 3 | Class for a phone number. This class currently supports no variations or flags. Android reference for 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. |
| ClassDatetime | 4 | Class for dates and times. It supports the following variations: TYPE_DATETIME_VARIATION_NORMAL TYPE_DATETIME_VARIATION_DATE, and TYPE_DATETIME_VARIATION_TIME. Android reference for 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. |
| MaskClass | 15 | Mask of bits that determine the overall class of text being given. Currently supported classes are: TYPE_CLASS_TEXT, TYPE_CLASS_NUMBER, TYPE_CLASS_PHONE, TYPE_CLASS_DATETIME. IME authors: If the class is not one you understand, assume TYPE_CLASS_TEXT with NO variation or flags. Android reference for 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. |
| DatetimeVariationDate | 16 | Default variation of TYPE_CLASS_DATETIME: allows entering only a date. Android reference for 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. |
| NumberVariationPassword | 16 | Variation of TYPE_CLASS_NUMBER: entering a numeric password. This was added in Build.VERSION_CODES.HONEYCOMB. An IME must target this API version or later to see this input type; if it doesn't, a request for this type will be dropped when passed through EditorInfo.makeCompatible(int). Android reference for 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. |
| TextVariationUri | 16 | Variation of TYPE_CLASS_TEXT: entering a URI. Android reference for 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. |
| DatetimeVariationTime | 32 | Default variation of TYPE_CLASS_DATETIME: allows entering only a time. Android reference for 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. |
| TextVariationEmailAddress | 32 | Variation of TYPE_CLASS_TEXT: entering an e-mail address. Android reference for 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. |
| TextVariationEmailSubject | 48 | Variation of TYPE_CLASS_TEXT: entering the subject line of an e-mail. Android reference for 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. |
| TextVariationShortMessage | 64 | Variation of TYPE_CLASS_TEXT: entering a short, possibly informal message such as an instant message or a text message. Android reference for 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. |
| TextVariationLongMessage | 80 | Variation of TYPE_CLASS_TEXT: entering the content of a long, possibly formal message such as the body of an e-mail. Android reference for 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. |
| TextVariationPersonName | 96 | Variation of TYPE_CLASS_TEXT: entering the name of a person. Android reference for 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. |
| TextVariationPostalAddress | 112 | Variation of TYPE_CLASS_TEXT: entering a postal mailing address. Android reference for 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. |
| TextVariationPassword | 128 | Variation of TYPE_CLASS_TEXT: entering a password. Android reference for 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. |
| TextVariationVisiblePassword | 144 | Variation of TYPE_CLASS_TEXT: entering a password, which should be visible to the user. Android reference for 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. |
| TextVariationWebEditText | 160 | Variation of TYPE_CLASS_TEXT: entering text inside of a web form. Android reference for 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. |
| TextVariationFilter | 176 | Variation of TYPE_CLASS_TEXT: entering text to filter contents of a list etc. Android reference for 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. |
| TextVariationPhonetic | 192 | Variation of TYPE_CLASS_TEXT: entering text for phonetic pronunciation, such as a phonetic name field in contacts. This is mostly useful for languages where one spelling may have several phonetic readings, like Japanese. Android reference for 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. |
| TextVariationWebEmailAddress | 208 | Variation of TYPE_CLASS_TEXT: entering e-mail address inside of a web form. This was added in Build.VERSION_CODES.HONEYCOMB. An IME must target this API version or later to see this input type; if it doesn't, a request for this type will be seen as TYPE_TEXT_VARIATION_EMAIL_ADDRESS when passed through EditorInfo.makeCompatible(int). Android reference for 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. |
| TextVariationWebPassword | 224 | Variation of TYPE_CLASS_TEXT: entering password inside of a web form. This was added in Build.VERSION_CODES.HONEYCOMB. An IME must target this API version or later to see this input type; if it doesn't, a request for this type will be seen as TYPE_TEXT_VARIATION_PASSWORD when passed through EditorInfo.makeCompatible(int). Android reference for 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. |
| MaskVariation | 4080 | Mask of bits that determine the variation of the base content class. Android reference for 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. |
| NumberFlagSigned | 4096 | Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or negative sign at the start. Android reference for 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. |
| TextFlagCapCharacters | 4096 | Flag for TYPE_CLASS_TEXT: capitalize all characters. Overrides TYPE_TEXT_FLAG_CAP_WORDS and TYPE_TEXT_FLAG_CAP_SENTENCES. This value is explicitly defined to be the same as TextUtils.CAP_MODE_CHARACTERS. Of course, this only affects languages where there are upper-case and lower-case letters. Android reference for 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. |
| NumberFlagDecimal | 8192 | Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide fractional values. Android reference for 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. |
| TextFlagCapWords | 8192 | Flag for TYPE_CLASS_TEXT: capitalize the first character of every word. Overrides TYPE_TEXT_FLAG_CAP_SENTENCES. This value is explicitly defined to be the same as TextUtils.CAP_MODE_WORDS. Of course, this only affects languages where there are upper-case and lower-case letters. Android reference for 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. |
| TextFlagCapSentences | 16384 | Flag for TYPE_CLASS_TEXT: capitalize the first character of each sentence. This value is explicitly defined to be the same as TextUtils.CAP_MODE_SENTENCES. For example in English it means to capitalize after a period and a space (note that other languages may have different characters for period, or not use spaces, or use different grammatical rules). Of course, this only affects languages where there are upper-case and lower-case letters. Android reference for 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. |
| TextFlagAutoCorrect | 32768 | Flag for TYPE_CLASS_TEXT: the user is entering free-form text that should have auto-correction applied to it. Without this flag, the IME will not try to correct typos. You should always set this flag unless you really expect users to type non-words in this field, for example to choose a name for a character in a game. Contrast this with TYPE_TEXT_FLAG_AUTO_COMPLETE and TYPE_TEXT_FLAG_NO_SUGGESTIONS: TYPE_TEXT_FLAG_AUTO_CORRECT means that the IME will try to auto-correct typos as the user is typing, but does not define whether the IME offers an interface to show suggestions. Android reference for 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. |
| TextFlagAutoComplete | 65536 | Flag for TYPE_CLASS_TEXT: the text editor (which means the application) is performing auto-completion of the text being entered based on its own semantics, which it will present to the user as they type. This generally means that the input method should not be showing candidates itself, but can expect the editor to supply its own completions/candidates from InputMethodSession.displayCompletions() as a result of the editor calling InputMethodManager.displayCompletions(). Note the contrast with TYPE_TEXT_FLAG_AUTO_CORRECT and TYPE_TEXT_FLAG_NO_SUGGESTIONS: TYPE_TEXT_FLAG_AUTO_COMPLETE means the editor should show an interface for displaying suggestions, but instead of supplying its own it will rely on the Editor to pass completions/corrections. Android reference for 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. |
| TextFlagMultiLine | 131072 | Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field. If this flag is not set, the text field will be constrained to a single line. The IME may also choose not to display an enter key when this flag is not set, as there should be no need to create new lines. Android reference for 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. |
| TextFlagImeMultiLine | 262144 | Flag for TYPE_CLASS_TEXT: the regular text view associated with this should not be multi-line, but when a fullscreen input method is providing text it should use multiple lines if it can. Android reference for 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. |
| TextFlagNoSuggestions | 524288 | Flag for TYPE_CLASS_TEXT: the input method does not need to display any dictionary-based candidates. This is useful for text views that do not contain words from the language and do not benefit from any dictionary-based completions or corrections. It overrides the TYPE_TEXT_FLAG_AUTO_CORRECT value when set. Please avoid using this unless you are certain this is what you want. Many input methods need suggestions to work well, for example the ones based on gesture typing. Consider clearing TYPE_TEXT_FLAG_AUTO_CORRECT instead if you just do not want the IME to correct typos. Note the contrast with TYPE_TEXT_FLAG_AUTO_CORRECT and TYPE_TEXT_FLAG_AUTO_COMPLETE: TYPE_TEXT_FLAG_NO_SUGGESTIONS means the IME does not need to show an interface to display suggestions. Most IMEs will also take this to mean they do not need to try to auto-correct what the user is typing. Android reference for 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. |
| TextFlagEnableTextConversionSuggestions | 1048576 | Flag for TYPE_CLASS_TEXT: Let the IME know the text conversion suggestions are required by the application. Text conversion suggestion is for the transliteration languages which has pronunciation characters and target characters. When the user is typing the pronunciation charactes, the IME could provide the possible target characters to the user. When this flag is set, the IME should insert the text conversion suggestions through Builder.setTextConversionSuggestions(List) and the TextAttribute with initialized with the text conversion suggestions is provided by the IME to the application. To receive the additional information, the application needs to implement InputConnection.setComposingText(CharSequence,int,TextAttribute), InputConnection.setComposingRegion(int,int,TextAttribute), and InputConnection.commitText(CharSequence,int,TextAttribute). Android reference for 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. |
| MaskFlags | 16773120 | Mask of bits that provide addition bit flags of options. Android reference for 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. |
Remarks
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.