EditText Properties of Android

Source: Internet
Author: User

1, the input text is the password form the setting

Android:password= "true"

2, enter the text for the telephone number

Android:phonenumber= "true"

3, single-line input, once set to True, the text will not wrap, enter is left the text box

Android:singleline= "true"

4, input can only be integer, set to Integer, if it is decimal, set to: Decimal

Android:numeric= "Integer"

Pure numbers: Input method automatically becomes digital input keyboard, while only 0-9 of digital input is allowed

Android:numeric= "true"

5. Input in uppercase letters

Android:capitalize = "Characters"

6. Set the information displayed on the space

Android:hint= "Please enter a number! "

7, set the color of the message text, the default is gray

Android:textcolorhint= "#ffff00"

8. Whether it can be edited

Android:editable

9. Control the spacing between words and words

android:textscalex= "1.5"

10, the space background, here is not, refers to transparent

Android:background= "@null"

11, automatically hide the tail overflow data, generally used for text content too long line can not display all

Android:ellipsize= "End"

12, only accept input cwj1987, generally used for password authentication

Android:capitalize= "cwj1987"

13. set the width of the textview width to n characters

Android:ems= "10"

14, set the number of lines of text, set two lines to display two lines, even if the second row has no data

Android:lines

15. Set to accept only certain numbers

Android:digits

16. Whether it can be edited

Android:editable

EditText Properties of Android

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.