Attribute settings and textview attributes of Android textappearance

Source: Internet
Author: User

Textappearance attribute settings

Android: textappearance = "? Android: ATTR/textappearancesmall"
Android: textappearance = "? Android: ATTR/textappearancemedium"

Android: textappearance = "? Android: ATTR/textappearancelarge"

Android: textappearance = "? Android: ATTR/textappearancelarge"

 

Details about textview attributes

Android: autolink: determines whether the text is displayed as a clickable link when the text is URL link, email, phone number, or map. Optional values (None/web/email/phone/MAP/All)
Android: AutoText if set, the spelling of the input value is automatically corrected. There is no effect here. It works when the input method is displayed and entered.
Android: buffertype specifies the text category obtained by gettext. The editable option is similar to the append character of stringbuilder. That is to say, after gettext, you can use the append method to set the text content. Spannable can use styles in a given character area. For more information, see 1. 2.
Android: capitalize. There is no effect here. The input method needs to be popped up to see it. For details, see editview this attribute description.
Android: cursorvisible: sets the cursor to show/hide, which is displayed by default.
Android: digits specifies the characters that can be entered. For example, "1234567890. +-*/% ()"
Android: drawablebottom outputs a drawable under text. If a color is specified, the background of the text is set to this color, and the latter is overwritten with the background.
Android: drawableleft outputs a drawable on the left of text.
Android: drawablepadding sets the interval between text and drawable (image). It can be used with drawableleft, drawableright, drawabletop, and drawablebottom. It can be set to a negative number, but it has no effect.
Android: drawableright outputs a drawable on the Right of text.
Android: drawabletop outputs a drawable on the top of the text.
Android: sets whether the Editable can be edited.
Android: editorextras sets additional text input data.
Android: ellipsize: Set how to display the control when the text is too long. Set the following values: "Start "-? The ellipsis is displayed at the beginning; "end" -- The ellipsis is displayed at the end; "Middle" -- The ellipsis is displayed in the middle; "marquee" -- displayed in the form of a marquee (horizontal animation Movement)
Android: freezestext sets the content of the saved text and the position of the cursor.
Android: gravity sets the text position. For example, if it is set to "center", the text is displayed in the center.
Android: Text prompt information displayed when hinttext is empty. You can use textcolorhint to set the color of the prompt information. This attribute is used in editview, but it can also be used here.
Android: imeoptions additional function, set the ime action in the lower-right corner to the action related to the edit box. For example, the lower-right corner of actiondone will display a "finish", without setting a carriage return symbol by default. This is described in detail in 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 additional white space at the top and bottom. The default value is true.
Android: inputmethod specifies the Input Method for text and requires a fully qualified name (complete package name ). For example, Com. Google. Android. inputmethod. Pinyin, but the error cannot be found.
Android: inputtype sets the text type to help the input method display the appropriate keyboard type. Detailed description in editview, no effect here.
Android: linksclickable sets whether the link is connected even if autolink is set.
Android: marqueerepeatlimit: When ellipsize specifies marquee, it sets the number of repeated scrolling times. When it is set to marquee_forever, it indicates unlimited times.
Android: EMS sets the textview width to n characters. The test here is a Chinese character width.
Android: maxems sets the textview width to a maximum of n characters. Overwrite the EMS option when used with EMS.
Android: minems sets the textview width to a minimum of n characters. Overwrite the EMS option when used with EMS.
Android: maxlength limits the length of the displayed text. The excess part is not displayed.
Android: lines sets the number of lines of text. If two lines are set, two lines are displayed, even if the second row has no data.
Android: maxlines sets the maximum number of lines displayed in text. It is used in combination with width or layout_width. If the line exceeded is automatically wrapped, the line exceeded is not displayed.
Android: minlines sets the minimum number of lines of text, similar to lines.
Android: linespacingextra.
Android: linespacingmultiplier. For example, "1.2"
Android: If numeric is set, the textview has a digital input method. This is useless. The only effect after setting is that textview has a click effect. This attribute is described in detail in edtiview.
Android: the password is displayed as a small dot ".".
Android: Set phonenumber to the phone number input method.
Android: privateimeoptions: it is useless to set the input method options. It will be further discussed in edittext.
Android: scrollhorizontally: Specifies whether to display strip if the text exceeds the textview width.
Android: selectallonfocus: if the text is selectable, let him get the focus instead of moving the cursor to the start or end of the text. After being set in textview, there is no effect.
Android: shadowcolor specifies the color of text shadow, which must be used with shadowradius.
Android: shadowdx sets the start position of the horizontal shadow coordinate.
Android: shadowdy sets the start position of the Shadow vertical coordinate.
Android: shadowradius: Set the shadowradius. If it is set to 0.1, it becomes the font color. Generally, it is better to set it to 3.0.
Android: singleline sets single row display. If it is used with layout_width, when the text cannot be fully displayed, "…" is used later. . For example, Android: text = "test _ singleline"
Android: singleline = "true" Android: layout_width = "20dp" only "T…" is displayed ...". If singleline is not set or is set to false, the text will wrap automatically.
Android: text sets the display text.
Android: textappearance. Such as "? Android: ATTR/textappearancelargeinverse "refers to the appearance of the system ,? Indicates whether the system has this appearance. Otherwise, the default appearance is used. Configurable values: textappearancebutton/textappearanceinverse/textappearancelarge/textappearancelargeinverse/textappearancemedium/combine/textappearancesmall/textappearancesmallinverse
Android: textcolor set text color
Android: the background color of the selected text in textcolorhighlight. The default value is blue.
Android: textcolorhint sets the text color of the prompt message. The default value is gray. Used with hint.
Android: The color of textcolorlink text link.
Android: textscalex sets the interval between texts. The default value is 1.0f.
Android: textsize: Specifies the text size. The recommended measurement unit is "SP", for example, "15sp"
Android: textstyle [bold (BOLD) 0, italic (italic) 1, bolditalic (bold and oblique) 2] can be set to one or more, separated by "|"
Android: Typeface text font, which must be one of the following constant values: normal 0, sans 1, Serif 2, monospace (same width font) 3]
Android: Height: sets the height of the text area. supported measurement units: Px (pixels)/DP/SP/In/mm (millimeters)
Android: maxheight sets the maximum height of the text area
Android: minheight: sets the minimum height of the text area.
Android: width: Set the width of the text area. The measurement unit is PX (pixel)/DP/SP/In/mm (mm). The difference between the measurement unit and layout_width is shown here.
Android: maxwidth: sets the maximum width of the text area.
Android: minwidth: sets the minimum width of the text area.

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.