Detailed introduction to Android TextView properties sharing _android
Source: Internet
Author: User
Android:autolink whether the text is displayed as a clickable link when the text is a URL link/email/phone number/map. Optional value (None/web/email/phone/map/all)
Android:autotext if set, the spelling correction for the input value is automatically performed. No effect here, it works when the input input is displayed.
ANDROID:BUFFERTYPE Specifies the type of text that the GetText () method obtains. The option editable is similar to StringBuilder can append characters, that is, GetText can invoke the Append method to set the text content. Spannable can use styles in a given character area, see here 1, here 2.
Android:capitalize sets the English letter capitalization type. No effect here, you need to eject the input method to see it, see editview this property description.
Android:cursorvisible set cursor for show/hide, default display.
The Android:digits setting allows you to enter which characters. such as "1234567890.+-*/% ()"
Android:drawablebottom prints a drawable below the text, such as a picture. If you specify a color, the text background is set to the color, and the latter is overwritten with background.
Android:drawableleft prints a drawable on the left side of the text, such as a picture.
Android:drawablepadding sets the spacing between text and drawable (picture), and is used in conjunction with Drawableleft, Drawableright, Drawabletop, Drawablebottom, Can be set to a negative number, with no effect alone.
Android:drawableright prints a drawable to the right of the text.
The android:drawabletop outputs a drawable above the text.
Whether the android:editable setting is editable.
Android:editorextras sets the additional input data for the text.
Android:ellipsize sets how the control should appear when the text is too long. The following values are set: "Start"-? ellipses appear at the beginning; End "--the ellipsis is displayed at the ending;" Middle "--the ellipsis is shown in the middle;" Marquee "--display in the way of a horse lamp (animation moving horizontally)
Android:freezestext sets the contents of the saved text and the position of the cursor.
Android:gravity sets the text position, as set to "center," and the text is centered.
Android:hinttext the text message displayed when the space is empty, you can set the color of the hint message by Textcolorhint. This property is used in EditView, but can also be used here.
Android:imeoptions additional function, set the lower right corner IME action related to the edit box action, such as Actiondone in the lower right corner will display a "finish" instead of setting the default is a carriage return symbol. This is explained in detail in the EditView, which is useless here.
Android:imeactionid Sets the IME action ID.
Android:imeactionlabel Sets the IME action label.
Android:includefontpadding sets whether the text contains extra white space at the top and bottom, and defaults to true.
ANDROID:INPUTMETHOD specifies the input method for text, requiring a fully qualified name (the full package name). For example: Com.google.android.inputmethod.pinyin, but here the error is not found.
Android:inputtype sets the type of text to help the input method display the appropriate keyboard type. In EditView, there is no effect.
Android:linksclickable set the link to click on the connection, even if setting the Autolink.
Android:marqueerepeatlimit sets the number of repeat scrolling when ellipsize specifies marquee, which is infinite when set to Marquee_forever.
Android:ems sets the width of the TextView to n characters. This test is for a character width of Chinese characters
Android:maxems sets the width of the textview to a maximum of n characters. Override the EMS option when used in conjunction with EMS.
Android:minems sets the width of the textview to a minimum of n characters. Override the EMS option when used in conjunction with EMS.
Android:maxlength limits the length of text that is displayed and is not displayed beyond the section.
Android:lines sets the number of lines of text, setting two lines to display two lines, even if there is no data in the second row.
Android:maxlines sets the maximum number of lines of text to display, in conjunction with the width or layout_width, which exceeds the number of wrapping lines, and does not show up.
Android:minlines sets the minimum number of lines of text, similar to lines.
Android:linespacingextra sets the line spacing.
Android:linespacingmultiplier sets the multiple of line spacing. such as "1.2"
Android:numeric if it is set, the TextView has a numeric input method. This is useless, the only effect after setting is TextView has a click Effect, this property will be detailed in Edtiview.
Android:password with a small dot "." Display text
Android:phonenumber is set to the way the phone number is entered.
Android:privateimeoptions setting Input method options, which are useless here, will be discussed further in EditText.
android:scrollhorizontally If the text is set to exceed the width of the TextView, the horizontal pull bar appears.
Android:selectallonfocus If the text is selectable, let him get focus instead of moving the cursor to the beginning or end of the text. No effect after setting in TextView.
ANDROID:SHADOWCOLOR Specifies the color of the text shadow, which needs to be used with Shadowradius.
ANDROID:SHADOWDX sets the position of the shadow's horizontal coordinates to begin.
Android:shadowdy sets the position of the shadow portrait coordinates to begin.
Android:shadowradius sets the radius of the shadow. Set to 0.1 to become the color of the font, the general set to 3.0 the effect is better.
Android:singleline set up a single-line display. If used with Layout_width, when the text cannot be all displayed, the following is indicated by "...". such as android:text= "Test_ Singleline"
Android:singleline= "true" android:layout_width= "20DP" will show only "t ...". If you do not set Singleline or false, the text wraps automatically.
Android:text sets the display text.
Android:textappearance sets the appearance of the text. Like "? Android:attr/textappearancelargeinverse" here refers to the system's own appearance,? Indicates whether the system has this appearance, otherwise the default appearance is used. The values you can set are as follows: textappearancebutton/textappearanceinverse/textappearancelarge/textappearancelargeinverse/ Textappearancemedium/textappearancemediuminverse/textappearancesmall/textappearancesmallinverse
Android:textcolor Set Text color
Android:textcolorhighlight the background of the selected text, the default is blue
Android:textcolorhint sets the color of the hint message text, which defaults to Gray. Used in conjunction with hint.
Android:textcolorlink the color of the text link.
Android:textscalex sets the spacing between text, which defaults to 1.0f.
Android:textsize set the text size, recommend the unit of measure "SP", such as "15SP"
Android:textstyle set glyph [Bold (bold) 0, Italic (italic) 1, bolditalic (Bold and oblique) 2] can be set one or more, with "|" Separated
Android:typeface sets the text font, which must be one of the following constant values: normal 0, sans 1, serif 2, monospace (equal width font) 3]
Android:height set the height of the text area, support unit of measure: px (pixel)/dp/sp/in/mm (mm)
Android:maxheight sets the maximum height of the text area
Android:minheight sets the minimum height of the text area
Android:width sets the width of the text area, which supports the unit of measure: px (pixel)/dp/sp/in/mm (mm), and layout_width difference look here.
Android:maxwidth sets the maximum width of the text area
Android:minwidth sets the minimum width of the text area
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