Added in API level 3

InputType


public interface InputType

android.text.InputType


Bit definitions for an integer defining the basic content type of text held in an Editable object. Supported classes may be combined with variations and flags to indicate desired behaviors.

Examples

A password field with the password visible to the user:
inputType = TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
A multi-line postal address with automatic capitalization:
inputType = TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_POSTAL_ADDRESS | TYPE_TEXT_FLAG_MULTI_LINE
A time field:
inputType = TYPE_CLASS_DATETIME | TYPE_DATETIME_VARIATION_TIME

Summary

Constants

int TYPE_CLASS_DATETIME

Class for dates and times.

int TYPE_CLASS_NUMBER

Class for numeric text.

int TYPE_CLASS_PHONE

Class for a phone number.

int TYPE_CLASS_TEXT

Class for normal text.

int TYPE_DATETIME_VARIATION_DATE

Default variation of TYPE_CLASS_DATETIME: allows entering only a date.

int TYPE_DATETIME_VARIATION_NORMAL

Default variation of TYPE_CLASS_DATETIME: allows entering both a date and time.

int TYPE_DATETIME_VARIATION_TIME

Default variation of TYPE_CLASS_DATETIME: allows entering only a time.

int TYPE_MASK_CLASS

Mask of bits that determine the overall class of text being given.

int TYPE_MASK_FLAGS

Mask of bits that provide addition bit flags of options.

int TYPE_MASK_VARIATION

Mask of bits that determine the variation of the base content class.

int TYPE_NULL

Special content type for when no explicit type has been specified.

int TYPE_NUMBER_FLAG_DECIMAL

Flag of TYPE_CLASS_NUMBER: the number is decimal, allowing a decimal point to provide fractional values.

int TYPE_NUMBER_FLAG_SIGNED

Flag of TYPE_CLASS_NUMBER: the number is signed, allowing a positive or n