Android perception (18): edit the EditText box

Source: Internet
Author: User

Android perception (18): edit the EditText box

The EditText edit box is inherited from TextView. Most TextView methods are applicable and are used to accept user input.

The inputType attribute can be used to specify the input type. There are many acceptable parameters:

Android: inputType = "none" -- enter common characters

Android: inputType = "text" -- enter common characters

Android: inputType = "textCapCharacters" -- enter common characters

Android: inputType = "textCapWords" -- size of the first letter of a word

Android: inputType = "textCapSentences" -- only the size of the first letter

Android: inputType = "textAutoCorrect" -- the first two are automatically completed.

Android: inputType = "textAutoComplete" -- the first two are automatically completed.

Android: inputType = "textMultiLine" -- multiline Input

Android: inputType = "textImeMultiLine" -- multiple input methods (not necessarily supported)

Android: inputType = "textNoSuggestions" -- no prompt

Android: inputType = "textUri" -- URI format

Android: inputType = "textEmailAddress" -- email address format

Android: inputType = "textEmailSubject" -- Subject format

Android: inputType = "textreceivmessage" -- Short Message format

Android: inputType = "textLongMessage" -- long message format

Android: inputType = "textPersonName" -- name format

Android: inputType = "textPostalAddress" -- Postal format

Android: inputType = "textPassword" -- password format

Android: inputType = "textVisiblePassword" -- visible password format

Android: inputType = "textWebEditText" -- as the text format of a webpage form

Android: inputType = "textFilter" -- text filter format

Android: inputType = "textPhonetic" -- Pinyin input format

Android: inputType = "number" -- digit format

Android: inputType = "numberSigned" -- signed numeric format

Android: inputType = "numberDecimal" -- floating point format with decimal point

Android: inputType = "phone" -- dial-up keyboard

Android: inputType = "datetime"

Android: inputType = "date" -- date keyboard

Android: inputType = "time" -- time keyboard

The EditText component derives two subclasses:

AutoCompleteTextView: The EditText with auto-completion. Like the search bar of the browser, it must be used with the Adapter.

ExtractEditText: Not a UI component, it is the underlying service class of the EditText component and is responsible for providing full-screen input support.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.