| Attribute name |
Related methods |
|
| android:autoLink |
setAutoLinkMask(int)
|
Controls whether links such as urls and email addresses are
automatically found and converted to clickable links. |
| android:autoText |
setInputMethod(InputMethod)
|
If set, specifies that this TextView has a textual input method
and automatically corrects some common spelling errors. |
| android:bufferType |
setText(CharSequence,TextView.BufferType)
|
Determines what the minimum type that getText() will return. |
| android:capitalize |
setInputMethod(InputMethod)
|
If set, specifies that this TextView has a textual input method
and should automatically capitalize what the user types. |
| android:cursorVisible |
setCursorVisible(boolean)
|
Makes the cursor visible (the default) or invisible
Must be a boolean value, either "true" or "false". |
| android:digits |
setInputMethod(InputMethod)
|
If set, specifies that this TextView has a numeric input method
and that these specific characters are the ones that it will
accept. |
| android:editable |
|
If set, specifies that this TextView has an input method. |
| android:ems |
setEms(int)
|
Makes the TextView be exactly this many ems wide
Must be an integer value, such as "100". |
| android:freezesText |
setFreezesText(boolean)
|
If set, the text view will include its current complete text
inside of its frozen icicle in addition to meta-data such as
the current cursor position. |
| android:gravity |
setGravity(int)
|
Vertical gravity (top, center_vertical, bottom) when the text
is smaller than the view. |
| android:height |
setHeight(int)
|
Makes the TextView be exactly this many pixels tall. |
| android:hint |
setHint(int)
|
Hint text to display when the text is empty. |
| android:includeFontPadding |
setIncludeFontPadding(boolean)
|
Leave enough room for ascenders and descenders instead of
using the font ascent and descent strictly. |
| android:inputMethod |
setInputMethod(InputMethod)
|
If set, specifies that this TextView should use the specified
input method (specified by fully-qualified class name). |
| android:lines |
setLines(int)
|
Makes the TextView be exactly this many lines tall
Must be an integer value, such as "100". |
| android:maxEms |
setMaxEms(int)
|
Makes the TextView be at most this many ems wide
Must be an integer value, such as "100". |
| android:maxHeight |
setMaxHeight(int)
|
Makes the TextView be at most this many pixels tall
Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". |
| android:maxLength |
setFilters(InputFilter)
|
Set an input filter to constrain the text length to the
specified number. |
| android:maxLines |
setMaxLines(int)
|
Makes the TextView be at most this many lines tall
Must be an integer value, such as "100". |
| android:maxWidth |
setMaxWidth(int)
|
Makes the TextView be at most this many pixels wide
Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". |
| android:minEms |
setMinEms(int)
|
Makes the TextView be at least this many ems wide
Must be an integer value, such as "100". |
| android:minHeight |
setMinHeight(int)
|
Makes the TextView be at least this many pixels tall
Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". |
| android:minLines |
setMinLines(int)
|
Makes the TextView be at least this many lines tall
Must be an integer value, such as "100". |
| android:minWidth |
setMinWidth(int)
|
Makes the TextView be at least this many pixels wide
Must be a dimension value, which is a floating point number appended with a unit such as "14.5sp". |
| android:numeric |
setInputMethod(InputMethod)
|
If set, specifies that this TextView has a numeric input method. |
| android:password |
setTransformationMethod(TransformationMethod)
|
Whether the characters of the field are displayed as
password dots instead of themselves. |
| android:phoneNumber |
setInputMethod(InputMethod)
|
If set, specifies that this TextView has a phone number input
method. |
| android:scrollHorizontally |
setHorizontallyScrolling(boolean)
|
Whether the text is allowed to be wider than the view (and
therefore can be scrolled horizontally). |
| android:selectAllOnFocus |
setSelectAllOnFocus(boolean)
|
If the text is selectable, select it all when the view takes
focus instead of moving the cursor to the start or end. |
| android:shadowColor |
setShadowLayer(float,float,float,int)
|
Place a shadow of the specified color behind the text. |
| android:shadowDx |
setShadowLayer(float,float,float,int)
|
Horizontal offset of the shadow. |
| android:shadowDy |
setShadowLayer(float,float,float,int)
|
Vertical offset of the shadow. |
| android:shadowRadius |
setShadowLayer(float,float,float,int)
|
Radius of the shadow. |
| android:singleLine |
setTransformationMethod(TransformationMethod)
|
Constrains the text to a single horizontally scrolling line
instead of letting it wrap onto multiple lines, and advances
focus instead of inserting a newline when you press the
enter key. |
| android:text |
setText(CharSequence)
|
Text to display. |
| android:textAlign |
setAlignment(Layout.Alignment)
|
Horizontal text alignment: start (default), center, or end. |
| android:textColor |
setTextColor(ColorStateList)
|
Text color. |
| android:textColorHighlight |
setHiliteColor(int)
|
Color of the text selection highlight. |
| android:textColorHint |
setHintTextColor(int)
|
Color of the hint text. |
| android:textScaleX |
setTextScaleX(float)
|
Sets the horizontal scaling factor for the text
Must be a floating point value, such as "1.2". |
| android:textSize |
setTextSize(float)
|
Size of the text. |
| android:textStyle |
setTypeface(Typeface)
|
Style (bold, italic, bolditalic) for the text. |
| android:typeface |
setTypeface(Typeface)
|
Typeface (normal, sans, serif, monospace) for the text. |
| android:width |
setWidth(int)
|
Makes the TextView be exactly this many pixels wide. |