Android Edittext Inputtype

Edittext inputtype is used to set your input type for edittext.

Ex:- You can set your edittext inputtype as ‘Phone’. So that user can able to type only numbers. If it is ‘Time’ it will allow only time related characters to be entered.

Edittext Inputtypes are:-

  • text
  • textCapCharacters
  • textCapWords
  • textCapSentences
  • textAutoCorrect
  • textAutoComplete
  • textMultiLine
  • textImeMultiLine
  • textNoSuggestions
  • textUri
  • textEmailAddress
  • textEmailSubject
  • textShortMessage
  • textLongMessage
  • textPersonName
  • textPostalAddress
  • textPassword
  • textVisiblePassword
  • textWebEditText
  • textFilter
  • textPhonetic
  • number
  • numberSigned
  • numberDecimal
  • phone
  • datetime
  • date
  • time
1 <EditText android:id="@+id/EditText01"
2  android:layout_height="wrap_content"
3  android:layout_width="wrap_content"
4  android:inputType="number"
5  android:text="9944456789"/>

Here the inputType is ‘Number’. You can set one or more inputType to a edittext at a time.

The Output will look like

你可能感兴趣的:(android,user,layout,input,output)