Android--textview attribute xml

Source: Internet
Author: User
Tags gettext

Android_textview attribute xml Blog Category:
    • Android
Java code
  1. Property name Description
  2. Android:autolink sets whether text is displayed as a clickable link when the text is a URL link/email/phone number/map. Selectable VALUES (None/web/email/phone/map/all)
  3. Android:autotext if set, the spelling correction of the input values will be performed automatically. There is no effect here, it works when the input method is displayed and entered.
  4. ANDROID:BUFFERTYPE Specifies the text category that is obtained by the GetText () method. The option editable is similar to the StringBuilder append character,
  5. That is, you can call the Append method to set the text content after gettext.  Spannable can use the style in a given character area, see here 1, here 2.
  6. Android:capitalize set the English letter capitalization type. There is no effect here, you need to pop up the input method to see, see EditView this property description.
  7. Android:cursorvisible set cursor to show/hide, default display.
  8. Android:digits sets which characters are allowed to be entered. such as "1234567890.+-*/%\n ()"
  9. Android:drawablebottom output a drawable, slice below the text. If you specify a color, the background of text is set to that color, and the latter is overridden when used with background.
  10. Android:drawableleft on the left side of the text output a drawable, slice.
  11. Android:drawablepadding sets the spacing between text and drawable (picture), used with Drawableleft, Drawableright, Drawabletop, Drawablebottom, Can be set to negative, no effect is used alone.
  12. Android:drawableright output a drawable on the right side of the text, a piece.
  13. The android:drawabletop outputs a drawable, a slice, directly above the text.
  14. Android:editable whether the settings are editable. There is no effect here, see EditView.
  15. Android:editorextras sets the additional input data for the text. discussed again in EditView.
  16. Android:ellipsize sets how the control is displayed when the text is too long. The following values are set: "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 (animation moves Sideways)
  17. Android:freezestext sets the contents of the saved text and the position of the cursor. See also: here.
  18. Android:gravity set the text position, as set to "center", the text will be centered.
  19. Android:hint text is displayed when empty, you can set the color of the hint information by Textcolorhint. This property is used in EditView, but can also be used here.
  20. Android:imeoptions additional functions, set the action associated with the edit box in the lower right corner of the IME action, such as the lower right corner of the Actiondone will display a "done" instead of the default is a carriage return symbol. This is explained in detail in EditView, which is useless here.
  21. Android:imeactionid Set the IME action ID. In EditView again to do the instructions, you can read this post: here.
  22. Android:imeactionlabel Set the IME action label. Explain it again in EditView.
  23. Android:includefontpadding sets whether the text contains extra white space at the top and bottom, which defaults to true.
  24. ANDROID:INPUTMETHOD specifies the input method for text and requires a fully qualified name (the full package name). For example: Com.google.android.inputmethod.pinyin, but the error is not found here.
  25. Android:inputtype sets the type of text that is used to help the input method display the appropriate keyboard type. Detailed in the EditView, there is no effect here.
  26. Android:marqueerepeatlimit sets the number of repetitions that are repeated when the ellipsize is specified marquee, when set to Marquee_forever.
  27. Android:ems sets the width of the TextView to n characters. Here the test is a Chinese character width,
  28. Android:maxems sets the width of the textview to a maximum of n characters. Overwrite EMS option when used with EMS.
  29. Android:minems sets the width of the textview to a minimum of n characters. Overwrite EMS option when used with EMS.
  30. Android:maxlength limits the length of text that is displayed, and the excess portion is not displayed.
  31. Android:lines sets the number of lines of text, two lines are displayed, even if the second row has no data.
  32. Android:maxlines sets the maximum number of lines of text to display, in combination with width or layout_width, beyond the partial wrap, and the number of lines beyond will not be displayed.
  33. Android:minlines sets the minimum number of lines of text, similar to lines.
  34. Android:linksclickable sets whether the link clicks the connection, even if Autolink is set.
  35. Android:linespacingextra sets the line spacing.
  36. Android:linespacingmultiplier sets the multiple of line spacing. such as "1.2"
  37. Android:numeric if set, the TextView has a digital input method. It is useless here, the only effect after setting is TextView has the click Effect, this property will be explained in detail in Edtiview.
  38. Android:password with a small dot "." Display text
  39. Android:phonenumber is set as the input for the phone number.
  40. Android:privateimeoptions setting IME options is useless here, and will be discussed further in EditText.
  41. android:scrollhorizontally if the text exceeds the width of the TextView, the horizontal pull bar appears.
  42. Android:selectallonfocus If the text is selectable, let him get the focus instead of moving the cursor to the beginning or end of the text. No effect after setting in TextView.
  43. ANDROID:SHADOWCOLOR Specifies the color of the text shadow, which needs to be used with Shadowradius. Effect:
  44. ANDROID:SHADOWDX sets the start position of the shadow horizontal coordinates.
  45. Android:shadowdy sets the start position of the shadow vertical coordinates.
  46. Android:shadowradius sets the radius of the shadow.  Set to 0.1 to become the color of the font, generally set to 3.0 effect is better.
  47. Android:singleline sets the single-line display. If used with Layout_width, when the text cannot be displayed in its entirety, it is followed 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 set to false, the text wraps automatically
  48. Android:text sets the display text.
  49. Android:textappearance to set the appearance of text. such as "? Android:attr/textappearancelargeinverse
  50. "Here is a reference to the system comes with an 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
  51. Android:textcolor Setting text color
  52. Android:textcolorhighlight the background of the selected text, the default is blue
  53. Android:textcolorhint sets the color of the hint text, which is grayed out by default. Used in conjunction with hint.
  54. Android:textcolorlink the color of the text link.
  55. Android:textscalex set the spacing between text, which defaults to 1.0f. The 0.5f/1.0f/1.5f/2.0f effects are set separately:
  56. Android:textsize set text size, recommended unit of measure "SP", such as "15SP"
  57. Android:textstyle set glyph [Bold (bold) 0, Italic (italic) 1, bolditalic (coarse and oblique) 2] You can set one or more, with "|" Separated
  58. Android:typeface Set the text font, must be one of the following constant values: normal 0, sans 1, serif 2, monospace (equal width font) 3]
  59. Android:height Setting the height of the text area, support measurement: px (pixels)/dp/sp/in/mm (mm)
  60. Android:maxheight Setting the maximum height of the text area
  61. Android:minheight Setting the minimum height of the text area
  62. Android:width sets the width of the text area, supported by the measurement: px (pixels)/dp/sp/in/mm (mm), and the difference between layout_width look here.
  63. Android:maxwidth Setting the maximum width of the text area
  64. Android:minwidth Setting the minimum width of the text area

Android--textview attribute xml

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.