Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/widget/TextView#nestedclasses) \| [XML Attrs](https://developer.android.com/reference/android/widget/TextView#lattrs) \| [Inherited XML Attrs](https://developer.android.com/reference/android/widget/TextView#inhattrs) \| [Constants](https://developer.android.com/reference/android/widget/TextView#constants) \| [Inherited Constants](https://developer.android.com/reference/android/widget/TextView#inhconstants) \| [Inherited Fields](https://developer.android.com/reference/android/widget/TextView#inhfields) \| [Ctors](https://developer.android.com/reference/android/widget/TextView#pubctors) \| [Methods](https://developer.android.com/reference/android/widget/TextView#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/widget/TextView#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/widget/TextView#inhmethods)

# TextView

*** ** * ** ***


`
public


class
TextView
`


`


`

`

extends https://developer.android.com/reference/android/view/View


`

`


implements

https://developer.android.com/reference/android/view/ViewTreeObserver.OnPreDrawListener


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.view.View](https://developer.android.com/reference/android/view/View) ||
|   | ↳ | android.widget.TextView |

Known direct subclasses [Button](https://developer.android.com/reference/android/widget/Button), [CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView), [Chronometer](https://developer.android.com/reference/android/widget/Chronometer), [DigitalClock](https://developer.android.com/reference/android/widget/DigitalClock), [EditText](https://developer.android.com/reference/android/widget/EditText), [TextClock](https://developer.android.com/reference/android/widget/TextClock) [Button](https://developer.android.com/reference/android/widget/Button) A user interface element the user can tap or click to perform an action. [CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView) An extension to `https://developer.android.com/reference/android/widget/TextView` that supports the `https://developer.android.com/reference/android/widget/Checkable` interface and displays. [Chronometer](https://developer.android.com/reference/android/widget/Chronometer) Class that implements a simple timer. [DigitalClock](https://developer.android.com/reference/android/widget/DigitalClock) *This class was deprecated
in API level 17.
It is recommended you use `https://developer.android.com/reference/android/widget/TextClock` instead.* [EditText](https://developer.android.com/reference/android/widget/EditText) A user interface element for entering and modifying text. [TextClock](https://developer.android.com/reference/android/widget/TextClock) `TextClock` can display the current date and/or time as
a formatted string.


Known indirect subclasses [AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView), [CheckBox](https://developer.android.com/reference/android/widget/CheckBox), [CompoundButton](https://developer.android.com/reference/android/widget/CompoundButton), [ExtractEditText](https://developer.android.com/reference/android/inputmethodservice/ExtractEditText), [MultiAutoCompleteTextView](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView), [RadioButton](https://developer.android.com/reference/android/widget/RadioButton), [Switch](https://developer.android.com/reference/android/widget/Switch), [ToggleButton](https://developer.android.com/reference/android/widget/ToggleButton) [AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView) An editable text view that shows completion suggestions automatically
while the user is typing.


[CheckBox](https://developer.android.com/reference/android/widget/CheckBox)
A checkbox is a specific type of two-states button that can be either
checked or unchecked.


[CompoundButton](https://developer.android.com/reference/android/widget/CompoundButton)
A button with two states, checked and unchecked.


[ExtractEditText](https://developer.android.com/reference/android/inputmethodservice/ExtractEditText) \* Specialization of `https://developer.android.com/reference/android/widget/EditText` for showing and interacting with the extracted text in a full-screen input method. [MultiAutoCompleteTextView](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView) An editable text view, extending `https://developer.android.com/reference/android/widget/AutoCompleteTextView`, that can show completion suggestions for the substring of the text where the user is typing instead of necessarily for the entire thing. [RadioButton](https://developer.android.com/reference/android/widget/RadioButton)
A radio button is a two-states button that can be either checked or
unchecked.


[Switch](https://developer.android.com/reference/android/widget/Switch) A Switch is a two-state toggle widget. [ToggleButton](https://developer.android.com/reference/android/widget/ToggleButton) Displays checked/unchecked states as a button with a "light" indicator and by default accompanied with the text "ON" or "OFF".   

*** ** * ** ***

A user interface element that displays text to the user.
To provide user-editable text, see `https://developer.android.com/reference/android/widget/EditText`.


The following code sample shows a typical use, with an XML layout
and code to modify the contents of the text view:

```
<LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
   <TextView
       android:id="@+id/text_view_id"
       android:layout_height="wrap_content"
       android:layout_width="wrap_content"
       android:text="@string/hello" />
</LinearLayout>
```


This code sample demonstrates how to modify the contents of the text view
defined in the previous XML layout:

```
public class MainActivity extends Activity {

   protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final TextView helloTextView = (TextView) findViewById(R.id.text_view_id);
        helloTextView.setText(R.string.user_greeting);
    }
}
```


To customize the appearance of TextView, see [Styles and Themes](https://developer.android.com/guide/topics/ui/themes.html).


**XML attributes**


See `https://developer.android.com/reference/android/R.styleable#TextView`,
`https://developer.android.com/reference/android/R.styleable#View`

## Summary

| ### Nested classes ||
|---|---|
| ` interface` | `https://developer.android.com/reference/android/widget/TextView.OnEditorActionListener` Interface definition for a callback to be invoked when an action is performed on the editor. |
| ` class` | `https://developer.android.com/reference/android/widget/TextView.SavedState` User interface state that is stored by TextView for implementing `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`. |

### XML attributes

[`android:allowUndo`](https://developer.android.com/reference/android/widget/TextView#attr_android:allowUndo) Whether undo should be allowed for editable text. [`android:autoLink`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoLink) Controls whether links such as urls and email addresses are automatically found and converted to clickable links. [`android:autoSizeMaxTextSize`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMaxTextSize) The maximum text size constraint to be used when auto-sizing text. [`android:autoSizeMinTextSize`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMinTextSize) The minimum text size constraint to be used when auto-sizing text. [`android:autoSizePresetSizes`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizePresetSizes) Resource array of dimensions to be used in conjunction with `autoSizeTextType` set to `uniform`. [`android:autoSizeStepGranularity`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeStepGranularity) Specify the auto-size step size if `autoSizeTextType` is set to `uniform`. [`android:autoSizeTextType`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeTextType) Specify the type of auto-size. [`android:autoText`](https://developer.android.com/reference/android/widget/TextView#attr_android:autoText) *This is deprecated.
Use inputType instead.*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:breakStrategy`](https://developer.android.com/reference/android/widget/TextView#attr_android:breakStrategy) Break strategy (control over paragraph layout). [`android:bufferType`](https://developer.android.com/reference/android/widget/TextView#attr_android:bufferType) Determines the minimum type that getText() will return. [`android:capitalize`](https://developer.android.com/reference/android/widget/TextView#attr_android:capitalize) *This is deprecated.
Use inputType instead.
Must be one of the following constant values.
ConstantValueDescription characters3Capitalize every character. none0Don't automatically capitalize anything. sentences1Capitalize the first word of each sentence. words2Capitalize the first letter of every word.* [`android:cursorVisible`](https://developer.android.com/reference/android/widget/TextView#attr_android:cursorVisible) Makes the cursor visible (the default) or invisible. [`android:digits`](https://developer.android.com/reference/android/widget/TextView#attr_android:digits) If set, specifies that this TextView has a numeric input method and that these specific characters are the ones that it will accept. [`android:drawableBottom`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom) The drawable to be drawn below the text. [`android:drawableEnd`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableEnd) The drawable to be drawn to the end of the text. [`android:drawableLeft`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableLeft) The drawable to be drawn to the left of the text. [`android:drawablePadding`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawablePadding) The padding between the drawables and the text. [`android:drawableRight`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableRight) The drawable to be drawn to the right of the text. [`android:drawableStart`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableStart) The drawable to be drawn to the start of the text. [`android:drawableTint`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTint) Tint to apply to the compound (left, top, etc.) drawables. [`android:drawableTintMode`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTintMode) Blending mode used to apply the compound (left, top, etc.) drawables tint. [`android:drawableTop`](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop) The drawable to be drawn above the text. [`android:editable`](https://developer.android.com/reference/android/widget/TextView#attr_android:editable) *This is deprecated.
Use inputType instead.*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:editorExtras`](https://developer.android.com/reference/android/widget/TextView#attr_android:editorExtras) Reference to an `https://developer.android.com/reference/android/R.styleable#InputExtras` XML resource containing additional data to supply to an input method, which is private to the implementation of the input method. [`android:elegantTextHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:elegantTextHeight) Elegant text height, especially for less compacted complex script text. [`android:ellipsize`](https://developer.android.com/reference/android/widget/TextView#attr_android:ellipsize) If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle. [`android:ems`](https://developer.android.com/reference/android/widget/TextView#attr_android:ems) Makes the TextView be exactly this many ems wide. [`android:enabled`](https://developer.android.com/reference/android/widget/TextView#attr_android:enabled) Specifies whether the widget is enabled. [`android:fallbackLineSpacing`](https://developer.android.com/reference/android/widget/TextView#attr_android:fallbackLineSpacing) Whether to respect the ascent and descent of the fallback fonts that are used in displaying the text. [`android:firstBaselineToTopHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:firstBaselineToTopHeight) Distance from the top of the TextView to the first text baseline. [`android:focusedSearchResultHighlightColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor) Color of focused search result highlight. [`android:focusedSearchResultHighlightColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor) Color of focused search result highlight. [`android:fontFamily`](https://developer.android.com/reference/android/widget/TextView#attr_android:fontFamily) Font family (named by string or as a font resource reference) for the text. [`android:fontFeatureSettings`](https://developer.android.com/reference/android/widget/TextView#attr_android:fontFeatureSettings) Font feature settings. [`android:fontVariationSettings`](https://developer.android.com/reference/android/widget/TextView#attr_android:fontVariationSettings) Font variation settings. [`android:freezesText`](https://developer.android.com/reference/android/widget/TextView#attr_android:freezesText) 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`](https://developer.android.com/reference/android/widget/TextView#attr_android:gravity) Specifies how to align the text by the view's x- and/or y-axis when the text is smaller than the view. [`android:height`](https://developer.android.com/reference/android/widget/TextView#attr_android:height) Makes the TextView be exactly this tall. [`android:hint`](https://developer.android.com/reference/android/widget/TextView#attr_android:hint) Hint text to display when the text is empty. [`android:hyphenationFrequency`](https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency) Frequency of automatic hyphenation. [`android:imeActionId`](https://developer.android.com/reference/android/widget/TextView#attr_android:imeActionId) Supply a value for `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionId` used when an input method is connected to the text view. [`android:imeActionLabel`](https://developer.android.com/reference/android/widget/TextView#attr_android:imeActionLabel) Supply a value for `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionLabel` used when an input method is connected to the text view. [`android:imeOptions`](https://developer.android.com/reference/android/widget/TextView#attr_android:imeOptions) Additional features you can enable in an IME associated with an editor to improve the integration with your application. [`android:includeFontPadding`](https://developer.android.com/reference/android/widget/TextView#attr_android:includeFontPadding) Leave enough room for ascenders and descenders instead of using the font ascent and descent strictly. [`android:inputMethod`](https://developer.android.com/reference/android/widget/TextView#attr_android:inputMethod) *This is deprecated.
Use inputType instead.*

*May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;*


[`android:inputType`](https://developer.android.com/reference/android/widget/TextView#attr_android:inputType) The type of data being placed in a text field, used to help an input method decide how to let the user enter text. [`android:justificationMode`](https://developer.android.com/reference/android/widget/TextView#attr_android:justificationMode) Mode for justification. [`android:lastBaselineToBottomHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:lastBaselineToBottomHeight) Distance from the bottom of the TextView to the last text baseline. [`android:letterSpacing`](https://developer.android.com/reference/android/widget/TextView#attr_android:letterSpacing) Text letter-spacing. [`android:lineBreakStyle`](https://developer.android.com/reference/android/widget/TextView#attr_android:lineBreakStyle) Specifies the line-break strategies for text wrapping. [`android:lineBreakWordStyle`](https://developer.android.com/reference/android/widget/TextView#attr_android:lineBreakWordStyle) Specifies the line-break word strategies for text wrapping. [`android:lineHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:lineHeight) Explicit height between lines of text. [`android:lineSpacingExtra`](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingExtra) Extra spacing between lines of text. [`android:lineSpacingMultiplier`](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingMultiplier) Extra spacing between lines of text, as a multiplier. [`android:lines`](https://developer.android.com/reference/android/widget/TextView#attr_android:lines) Makes the TextView be exactly this many lines tall. [`android:linksClickable`](https://developer.android.com/reference/android/widget/TextView#attr_android:linksClickable) If set to false, keeps the movement method from being set to the link movement method even if autoLink causes links to be found. [`android:marqueeRepeatLimit`](https://developer.android.com/reference/android/widget/TextView#attr_android:marqueeRepeatLimit) The number of times to repeat the marquee animation. [`android:maxEms`](https://developer.android.com/reference/android/widget/TextView#attr_android:maxEms) Makes the TextView be at most this many ems wide. [`android:maxHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:maxHeight) Makes the TextView be at most this many pixels tall. [`android:maxLength`](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLength) Set an input filter to constrain the text length to the specified number. [`android:maxLines`](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLines) Makes the TextView be at most this many lines tall. [`android:maxWidth`](https://developer.android.com/reference/android/widget/TextView#attr_android:maxWidth) Makes the TextView be at most this many pixels wide. [`android:minEms`](https://developer.android.com/reference/android/widget/TextView#attr_android:minEms) Makes the TextView be at least this many ems wide. [`android:minHeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:minHeight) Makes the TextView be at least this many pixels tall. [`android:minLines`](https://developer.android.com/reference/android/widget/TextView#attr_android:minLines) Makes the TextView be at least this many lines tall. [`android:minWidth`](https://developer.android.com/reference/android/widget/TextView#attr_android:minWidth) Makes the TextView be at least this many pixels wide. [`android:numeric`](https://developer.android.com/reference/android/widget/TextView#attr_android:numeric) *This is deprecated.
Use inputType instead.
Must be one or more (separated by '\|') of the following constant values.
ConstantValueDescription decimal5Input is numeric, with decimals allowed. integer1Input is numeric. signed3Input is numeric, with sign allowed.* [`android:password`](https://developer.android.com/reference/android/widget/TextView#attr_android:password) *This is deprecated.
Use inputType instead.*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:phoneNumber`](https://developer.android.com/reference/android/widget/TextView#attr_android:phoneNumber) *This is deprecated.
Use inputType instead.*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:privateImeOptions`](https://developer.android.com/reference/android/widget/TextView#attr_android:privateImeOptions) An addition content type description to supply to the input method attached to the text view, which is private to the implementation of the input method. [`android:scrollHorizontally`](https://developer.android.com/reference/android/widget/TextView#attr_android:scrollHorizontally) Whether the text is allowed to be wider than the view (and therefore can be scrolled horizontally). [`android:searchResultHighlightColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor) Color of search results highlight. [`android:searchResultHighlightColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor) Color of search results highlight. [`android:selectAllOnFocus`](https://developer.android.com/reference/android/widget/TextView#attr_android:selectAllOnFocus) If the text is selectable, select it all when the view takes focus. [`android:shadowColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowColor) Place a blurred shadow of text underneath the text, drawn with the specified color. [`android:shadowDx`](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDx) Horizontal offset of the text shadow. [`android:shadowDy`](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDy) Vertical offset of the text shadow. [`android:shadowRadius`](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowRadius) Blur radius of the text shadow. [`android:singleLine`](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine) *This is deprecated.
This attribute is deprecated. Use `maxLines` instead to change
the layout of a static text, and use the `textMultiLine` flag in the
inputType attribute instead for editable text views (if both singleLine and inputType
are supplied, the inputType flags will override the value of singleLine).*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:text`](https://developer.android.com/reference/android/widget/TextView#attr_android:text) Text to display. [`android:textAllCaps`](https://developer.android.com/reference/android/widget/TextView#attr_android:textAllCaps) Present the text in ALL CAPS. [`android:textAppearance`](https://developer.android.com/reference/android/widget/TextView#attr_android:textAppearance) Base text color, typeface, size, and style. [`android:textColor`](https://developer.android.com/reference/android/widget/TextView#attr_android:textColor) Text color. [`android:textColorHighlight`](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHighlight) Color of the text selection highlight. [`android:textColorHint`](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHint) Color of the hint text. [`android:textColorLink`](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorLink) Text color for links. [`android:textCursorDrawable`](https://developer.android.com/reference/android/widget/TextView#attr_android:textCursorDrawable) Reference to a drawable that will be drawn under the insertion cursor. [`android:textFontWeight`](https://developer.android.com/reference/android/widget/TextView#attr_android:textFontWeight) Weight for the font used in the TextView. [`android:textIsSelectable`](https://developer.android.com/reference/android/widget/TextView#attr_android:textIsSelectable) Indicates that the content of a non-editable text can be selected. [`android:textScaleX`](https://developer.android.com/reference/android/widget/TextView#attr_android:textScaleX) Sets the horizontal scaling factor for the text. [`android:textSelectHandle`](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandle) Reference to a drawable that will be used to display a text selection anchor for positioning the cursor within text. [`android:textSelectHandleLeft`](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleLeft) Reference to a drawable that will be used to display a text selection anchor on the left side of a selection region. [`android:textSelectHandleRight`](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleRight) Reference to a drawable that will be used to display a text selection anchor on the right side of a selection region. [`android:textSize`](https://developer.android.com/reference/android/widget/TextView#attr_android:textSize) Size of the text. [`android:textStyle`](https://developer.android.com/reference/android/widget/TextView#attr_android:textStyle) Style (normal, bold, italic, bold\|italic) for the text. [`android:typeface`](https://developer.android.com/reference/android/widget/TextView#attr_android:typeface) Typeface (normal, sans, serif, monospace) for the text. [`android:width`](https://developer.android.com/reference/android/widget/TextView#attr_android:width) Makes the TextView be exactly this wide.

### Inherited XML attributes

From class `https://developer.android.com/reference/android/view/View` [`android:accessibilityHeading`](https://developer.android.com/reference/android/view/View#attr_android:accessibilityHeading) Whether or not this view is a heading for accessibility purposes. [`android:accessibilityLiveRegion`](https://developer.android.com/reference/android/view/View#attr_android:accessibilityLiveRegion) Indicates to accessibility services whether the user should be notified when this view changes. [`android:accessibilityPaneTitle`](https://developer.android.com/reference/android/view/View#attr_android:accessibilityPaneTitle) The title this view should present to accessibility as a pane title. [`android:accessibilityTraversalAfter`](https://developer.android.com/reference/android/view/View#attr_android:accessibilityTraversalAfter) Sets the id of a view that screen readers are requested to visit before this view. [`android:accessibilityTraversalBefore`](https://developer.android.com/reference/android/view/View#attr_android:accessibilityTraversalBefore) Sets the id of a view that screen readers are requested to visit after this view. [`android:allowClickWhenDisabled`](https://developer.android.com/reference/android/view/View#attr_android:allowClickWhenDisabled) Whether or not allow clicks on disabled view. [`android:alpha`](https://developer.android.com/reference/android/view/View#attr_android:alpha) alpha property of the view, as a value between 0 (completely transparent) and 1 (completely opaque). [`android:autoHandwritingEnabled`](https://developer.android.com/reference/android/view/View#attr_android:autoHandwritingEnabled) Whether or not the auto handwriting initiation is enabled in this View.


[`android:autofillHints`](https://developer.android.com/reference/android/view/View#attr_android:autofillHints) Describes the content of a view so that a autofill service can fill in the appropriate data. [`android:autofilledHighlight`](https://developer.android.com/reference/android/view/View#attr_android:autofilledHighlight) Drawable to be drawn over the view to mark it as autofilled

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".


[`android:background`](https://developer.android.com/reference/android/view/View#attr_android:background) A drawable to use as the background. [`android:backgroundTint`](https://developer.android.com/reference/android/view/View#attr_android:backgroundTint) Tint to apply to the background. [`android:backgroundTintMode`](https://developer.android.com/reference/android/view/View#attr_android:backgroundTintMode) Blending mode used to apply the background tint. [`android:clickable`](https://developer.android.com/reference/android/view/View#attr_android:clickable) Defines whether this view reacts to click events. [`android:clipToOutline`](https://developer.android.com/reference/android/view/View#attr_android:clipToOutline) Whether the View's Outline should be used to clip the contents of the View.


[`android:contentDescription`](https://developer.android.com/reference/android/view/View#attr_android:contentDescription) Defines text that briefly describes content of the view. [`android:contextClickable`](https://developer.android.com/reference/android/view/View#attr_android:contextClickable) Defines whether this view reacts to context click events. [`android:defaultFocusHighlightEnabled`](https://developer.android.com/reference/android/view/View#attr_android:defaultFocusHighlightEnabled) Whether this View should use a default focus highlight when it gets focused but doesn't have `https://developer.android.com/reference/android/R.attr#state_focused` defined in its background. [`android:drawingCacheQuality`](https://developer.android.com/reference/android/view/View#attr_android:drawingCacheQuality) Defines the quality of translucent drawing caches. [`android:duplicateParentState`](https://developer.android.com/reference/android/view/View#attr_android:duplicateParentState) When this attribute is set to true, the view gets its drawable state (focused, pressed, etc.) from its direct parent rather than from itself. [`android:elevation`](https://developer.android.com/reference/android/view/View#attr_android:elevation) base z depth of the view. [`android:fadeScrollbars`](https://developer.android.com/reference/android/view/View#attr_android:fadeScrollbars) Defines whether to fade out scrollbars when they are not in use. [`android:fadingEdgeLength`](https://developer.android.com/reference/android/view/View#attr_android:fadingEdgeLength) Defines the length of the fading edges. [`android:filterTouchesWhenObscured`](https://developer.android.com/reference/android/view/View#attr_android:filterTouchesWhenObscured) Specifies whether to filter touches when the view's window is obscured by another visible window. [`android:fitsSystemWindows`](https://developer.android.com/reference/android/view/View#attr_android:fitsSystemWindows) Boolean internal attribute to adjust view layout based on system windows such as the status bar. [`android:focusable`](https://developer.android.com/reference/android/view/View#attr_android:focusable) Controls whether a view can take focus. [`android:focusableInTouchMode`](https://developer.android.com/reference/android/view/View#attr_android:focusableInTouchMode) Boolean that controls whether a view can take focus while in touch mode. [`android:focusedByDefault`](https://developer.android.com/reference/android/view/View#attr_android:focusedByDefault) Whether this view is a default-focus view. [`android:forceHasOverlappingRendering`](https://developer.android.com/reference/android/view/View#attr_android:forceHasOverlappingRendering) Whether this view has elements that may overlap when drawn. [`android:foreground`](https://developer.android.com/reference/android/view/View#attr_android:foreground) Defines the drawable to draw over the content. [`android:foregroundGravity`](https://developer.android.com/reference/android/view/View#attr_android:foregroundGravity) Defines the gravity to apply to the foreground drawable. [`android:foregroundTint`](https://developer.android.com/reference/android/view/View#attr_android:foregroundTint) Tint to apply to the foreground. [`android:foregroundTintMode`](https://developer.android.com/reference/android/view/View#attr_android:foregroundTintMode) Blending mode used to apply the foreground tint. [`android:hapticFeedbackEnabled`](https://developer.android.com/reference/android/view/View#attr_android:hapticFeedbackEnabled) Boolean that controls whether a view should have haptic feedback enabled for events such as long presses. [`android:id`](https://developer.android.com/reference/android/view/View#attr_android:id) Supply an identifier name for this view, to later retrieve it with `https://developer.android.com/reference/android/view/View#findViewById(int)` or `https://developer.android.com/reference/android/app/Activity#findViewById(int)`. [`android:importantForAccessibility`](https://developer.android.com/reference/android/view/View#attr_android:importantForAccessibility) Describes whether or not this view is important for accessibility. [`android:importantForAutofill`](https://developer.android.com/reference/android/view/View#attr_android:importantForAutofill) Hints the Android System whether the view node associated with this View should be included in a view structure used for autofill purposes. [`android:importantForContentCapture`](https://developer.android.com/reference/android/view/View#attr_android:importantForContentCapture) Hints the Android System whether the view node associated with this View should be use for content capture purposes. [`android:isCredential`](https://developer.android.com/reference/android/view/View#attr_android:isCredential) *This is deprecated.
The isCredential attr is no longer needed.*

*May be a boolean value, such as "`true`" or
"`false`".*


[`android:isScrollContainer`](https://developer.android.com/reference/android/view/View#attr_android:isScrollContainer) Set this if the view will serve as a scrolling container, meaning that it can be resized to shrink its overall window so that there will be space for an input method. [`android:keepScreenOn`](https://developer.android.com/reference/android/view/View#attr_android:keepScreenOn) Controls whether the view's window should keep the screen on while visible. [`android:keyboardNavigationCluster`](https://developer.android.com/reference/android/view/View#attr_android:keyboardNavigationCluster) Whether this view is a root of a keyboard navigation cluster. [`android:layerType`](https://developer.android.com/reference/android/view/View#attr_android:layerType) Specifies the type of layer backing this view. [`android:layoutDirection`](https://developer.android.com/reference/android/view/View#attr_android:layoutDirection) Defines the direction of layout drawing. [`android:longClickable`](https://developer.android.com/reference/android/view/View#attr_android:longClickable) Defines whether this view reacts to long click events. [`android:minHeight`](https://developer.android.com/reference/android/view/View#attr_android:minHeight) Defines the minimum height of the view. [`android:minWidth`](https://developer.android.com/reference/android/view/View#attr_android:minWidth) Defines the minimum width of the view. [`android:nextClusterForward`](https://developer.android.com/reference/android/view/View#attr_android:nextClusterForward) Defines the next keyboard navigation cluster. [`android:nextFocusDown`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusDown) Defines the next view to give focus to when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_DOWN` If the reference refers to a view that does not exist or is part of a hierarchy that is invisible, a `https://developer.android.com/reference/java/lang/RuntimeException` will result when the reference is accessed. [`android:nextFocusForward`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusForward) Defines the next view to give focus to when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD` If the reference refers to a view that does not exist or is part of a hierarchy that is invisible, a `https://developer.android.com/reference/java/lang/RuntimeException` will result when the reference is accessed. [`android:nextFocusLeft`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusLeft) Defines the next view to give focus to when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`. [`android:nextFocusRight`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusRight) Defines the next view to give focus to when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT` If the reference refers to a view that does not exist or is part of a hierarchy that is invisible, a `https://developer.android.com/reference/java/lang/RuntimeException` will result when the reference is accessed. [`android:nextFocusUp`](https://developer.android.com/reference/android/view/View#attr_android:nextFocusUp) Defines the next view to give focus to when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_UP` If the reference refers to a view that does not exist or is part of a hierarchy that is invisible, a `https://developer.android.com/reference/java/lang/RuntimeException` will result when the reference is accessed. [`android:onClick`](https://developer.android.com/reference/android/view/View#attr_android:onClick) *This is deprecated.
View actually traverses the Context
hierarchy looking for the relevant method, which is fragile (an intermediate
ContextWrapper adding a same-named method would change behavior) and restricts
bytecode optimizers such as R8. Instead, use View.setOnClickListener.*

*May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;*


[`android:outlineAmbientShadowColor`](https://developer.android.com/reference/android/view/View#attr_android:outlineAmbientShadowColor) Sets the color of the ambient shadow that is drawn when the view has a positive Z or elevation value. [`android:outlineSpotShadowColor`](https://developer.android.com/reference/android/view/View#attr_android:outlineSpotShadowColor) Sets the color of the spot shadow that is drawn when the view has a positive Z or elevation value. [`android:padding`](https://developer.android.com/reference/android/view/View#attr_android:padding) Sets the padding, in pixels, of all four edges. [`android:paddingBottom`](https://developer.android.com/reference/android/view/View#attr_android:paddingBottom) Sets the padding, in pixels, of the bottom edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingEnd`](https://developer.android.com/reference/android/view/View#attr_android:paddingEnd) Sets the padding, in pixels, of the end edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingHorizontal`](https://developer.android.com/reference/android/view/View#attr_android:paddingHorizontal) Sets the padding, in pixels, of the left and right edges; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingLeft`](https://developer.android.com/reference/android/view/View#attr_android:paddingLeft) Sets the padding, in pixels, of the left edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingRight`](https://developer.android.com/reference/android/view/View#attr_android:paddingRight) Sets the padding, in pixels, of the right edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingStart`](https://developer.android.com/reference/android/view/View#attr_android:paddingStart) Sets the padding, in pixels, of the start edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingTop`](https://developer.android.com/reference/android/view/View#attr_android:paddingTop) Sets the padding, in pixels, of the top edge; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:paddingVertical`](https://developer.android.com/reference/android/view/View#attr_android:paddingVertical) Sets the padding, in pixels, of the top and bottom edges; see `https://developer.android.com/reference/android/R.attr#padding`. [`android:preferKeepClear`](https://developer.android.com/reference/android/view/View#attr_android:preferKeepClear) Sets a preference to keep the bounds of this view clear from floating windows
above this view's window.


[`android:requiresFadingEdge`](https://developer.android.com/reference/android/view/View#attr_android:requiresFadingEdge) Defines which edges should be faded on scrolling. [`android:rotation`](https://developer.android.com/reference/android/view/View#attr_android:rotation) rotation of the view, in degrees. [`android:rotationX`](https://developer.android.com/reference/android/view/View#attr_android:rotationX) rotation of the view around the x axis, in degrees. [`android:rotationY`](https://developer.android.com/reference/android/view/View#attr_android:rotationY) rotation of the view around the y axis, in degrees. [`android:saveEnabled`](https://developer.android.com/reference/android/view/View#attr_android:saveEnabled) If false, no state will be saved for this view when it is being frozen. [`android:scaleX`](https://developer.android.com/reference/android/view/View#attr_android:scaleX) scale of the view in the x direction. [`android:scaleY`](https://developer.android.com/reference/android/view/View#attr_android:scaleY) scale of the view in the y direction. [`android:screenReaderFocusable`](https://developer.android.com/reference/android/view/View#attr_android:screenReaderFocusable) Whether this view should be treated as a focusable unit by screen reader accessibility tools. [`android:scrollIndicators`](https://developer.android.com/reference/android/view/View#attr_android:scrollIndicators) Defines which scroll indicators should be displayed when the view can be scrolled. [`android:scrollX`](https://developer.android.com/reference/android/view/View#attr_android:scrollX) The initial horizontal scroll offset, in pixels. [`android:scrollY`](https://developer.android.com/reference/android/view/View#attr_android:scrollY) The initial vertical scroll offset, in pixels. [`android:scrollbarAlwaysDrawHorizontalTrack`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarAlwaysDrawHorizontalTrack) Defines whether the horizontal scrollbar track should always be drawn. [`android:scrollbarAlwaysDrawVerticalTrack`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarAlwaysDrawVerticalTrack) Defines whether the vertical scrollbar track should always be drawn. [`android:scrollbarDefaultDelayBeforeFade`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarDefaultDelayBeforeFade) Defines the delay in milliseconds that a scrollbar waits before fade out. [`android:scrollbarFadeDuration`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarFadeDuration) Defines the delay in milliseconds that a scrollbar takes to fade out. [`android:scrollbarSize`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarSize) Sets the width of vertical scrollbars and height of horizontal scrollbars. [`android:scrollbarStyle`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarStyle) Controls the scrollbar style and position. [`android:scrollbarThumbHorizontal`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarThumbHorizontal) Defines the horizontal scrollbar thumb drawable. [`android:scrollbarThumbVertical`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarThumbVertical) Defines the vertical scrollbar thumb drawable. [`android:scrollbarTrackHorizontal`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarTrackHorizontal) Defines the horizontal scrollbar track drawable. [`android:scrollbarTrackVertical`](https://developer.android.com/reference/android/view/View#attr_android:scrollbarTrackVertical) Defines the vertical scrollbar track drawable. [`android:scrollbars`](https://developer.android.com/reference/android/view/View#attr_android:scrollbars) Defines which scrollbars should be displayed on scrolling or not. [`android:soundEffectsEnabled`](https://developer.android.com/reference/android/view/View#attr_android:soundEffectsEnabled) Boolean that controls whether a view should have sound effects enabled for events such as clicking and touching. [`android:stateListAnimator`](https://developer.android.com/reference/android/view/View#attr_android:stateListAnimator) Sets the state-based animator for the View. [`android:supplementalDescription`](https://developer.android.com/reference/android/view/View#attr_android:supplementalDescription) Provides brief supplemental information for the view, such as the purpose of the view when that purpose is not conveyed within its textual representation. [`android:tag`](https://developer.android.com/reference/android/view/View#attr_android:tag) Supply a tag for this view containing a String, to be retrieved later with `https://developer.android.com/reference/android/view/View#getTag()` or searched for with `https://developer.android.com/reference/android/view/View#findViewWithTag(java.lang.Object)`. [`android:textAlignment`](https://developer.android.com/reference/android/view/View#attr_android:textAlignment) Defines the alignment of the text. [`android:textDirection`](https://developer.android.com/reference/android/view/View#attr_android:textDirection) Defines the direction of the text. [`android:theme`](https://developer.android.com/reference/android/view/View#attr_android:theme) Specifies a theme override for a view. [`android:tooltipText`](https://developer.android.com/reference/android/view/View#attr_android:tooltipText) Defines text displayed in a small popup window on hover or long press. [`android:transformPivotX`](https://developer.android.com/reference/android/view/View#attr_android:transformPivotX) x location of the pivot point around which the view will rotate and scale. [`android:transformPivotY`](https://developer.android.com/reference/android/view/View#attr_android:transformPivotY) y location of the pivot point around which the view will rotate and scale. [`android:transitionName`](https://developer.android.com/reference/android/view/View#attr_android:transitionName) Names a View such that it can be identified for Transitions. [`android:translationX`](https://developer.android.com/reference/android/view/View#attr_android:translationX) translation in x of the view. [`android:translationY`](https://developer.android.com/reference/android/view/View#attr_android:translationY) translation in y of the view. [`android:translationZ`](https://developer.android.com/reference/android/view/View#attr_android:translationZ) translation in z of the view. [`android:visibility`](https://developer.android.com/reference/android/view/View#attr_android:visibility) Controls the initial visibility of the view.

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_NONE` The TextView does not auto-size text (default). |
| `int` | `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM` The TextView scales text size both horizontally and vertically to fit within the container. |
| `int` | `https://developer.android.com/reference/android/widget/TextView#FOCUSED_SEARCH_RESULT_INDEX_NONE` A special index used for `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)` and `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()` inidicating there is no focused search result. |

### Inherited constants

From class `https://developer.android.com/reference/android/view/View` `int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_AUTO`

Automatically determine whether the view should only allow interactions from
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s with the
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property
set to true.


`int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_NO`

Allow interactions from all `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s,
regardless of their
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property.


`int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_YES`

Only allow interactions from `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s
with the `https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()`
property set to true.


`int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_ASSERTIVE`

Live region mode specifying that accessibility services should immediately notify users of
changes to this view.


`int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_NONE`

Live region mode specifying that accessibility services should not
automatically announce changes to this view.


`int` `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_POLITE`

Live region mode specifying that accessibility services should notify users of changes to
this view.


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS`

Flag requesting you to add views that are marked as not important for autofill
(see `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`) to a `https://developer.android.com/reference/android/view/ViewStructure`.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE`

Hint indicating that this view can be autofilled with a credit card expiration date.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY`

Hint indicating that this view can be autofilled with a credit card expiration day.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH`

Hint indicating that this view can be autofilled with a credit card expiration month.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR`

Hint indicating that this view can be autofilled with a credit card expiration year.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_NUMBER`

Hint indicating that this view can be autofilled with a credit card number.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE`

Hint indicating that this view can be autofilled with a credit card security code.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_EMAIL_ADDRESS`

Hint indicating that this view can be autofilled with an email address.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_NAME`

Hint indicating that this view can be autofilled with a user's real name.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PASSWORD`

Hint indicating that this view can be autofilled with a password.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PHONE`

Hint indicating that this view can be autofilled with a phone number.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_ADDRESS`

Hint indicating that this view can be autofilled with a postal address.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_CODE`

Hint indicating that this view can be autofilled with a postal code.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_USERNAME`

Hint indicating that this view can be autofilled with a username.


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_DATE`

Autofill type for a field that contains a date, which is represented by a long representing
the number of milliseconds since the standard base time known as "the epoch", namely
January 1, 1970, 00:00:00 GMT (see `https://developer.android.com/reference/java/util/Date#getTime()`.


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_LIST`

Autofill type for a selection list field, which is filled by an `int`
representing the element index inside the list (starting at `0`).


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_NONE`

Autofill type for views that cannot be autofilled.


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TEXT`

Autofill type for a text field, which is filled by a `https://developer.android.com/reference/java/lang/CharSequence`.


`int` `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TOGGLE`

Autofill type for a togglable field, which is filled by a `boolean`.


`int` `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO`

Content sensitivity is determined by the framework.


`int` `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_NOT_SENSITIVE`

The view doesn't display sensitive content.


`int` `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_SENSITIVE`

The view displays sensitive content.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_ACCESSIBILITY_ACTION`

Flag indicating that the drag was initiated with
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.AccessibilityAction#ACTION_DRAG_START`.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL`

Flag indicating that a drag can cross window boundaries.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION`

When this flag is used with `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_READ` and/or `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_WRITE`, the URI permission grant can be persisted across device
reboots until explicitly revoked with
`https://developer.android.com/reference/android/content/Context#revokeUriPermission(android.net.Uri,%20int)` Context.revokeUriPermission}.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION`

When this flag is used with `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_READ` and/or `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_WRITE`, the URI permission grant applies to any URI that is a prefix
match against the original granted URI.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_SAME_APPLICATION`

Flag indicating that a drag can cross window boundaries (within the same application).


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_READ`

When this flag is used with `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL`, the drag recipient will be able to
request read access to the content URI(s) contained in the `https://developer.android.com/reference/android/content/ClipData` object.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_WRITE`

When this flag is used with `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL`, the drag recipient will be able to
request write access to the content URI(s) contained in the `https://developer.android.com/reference/android/content/ClipData` object.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START`

Flag indicating that this drag will result in the caller activity's task to be hidden for the
duration of the drag, which means that the source activity will not receive drag events for
the current drag gesture.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_OPAQUE`

Flag indicating that the drag shadow will be opaque.


`int` `https://developer.android.com/reference/android/view/View#DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG`

Flag indicating that an unhandled drag should be delegated to the system to be started if no
visible window wishes to handle the drop.


`int` `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_AUTO`

*This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`int` `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_HIGH`

*This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`int` `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_LOW`

*This constant was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`int` `https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_CONTENT_DESCRIPTION`

Find find views that contain the specified content description.


`int` `https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_TEXT`

Find views that render the specified text.


`int` `https://developer.android.com/reference/android/view/View#FOCUSABLE`

This view wants keystrokes.


`int` `https://developer.android.com/reference/android/view/View#FOCUSABLES_ALL`

View flag indicating whether `https://developer.android.com/reference/android/view/View#addFocusables(java.util.ArrayList<android.view.View>,%20int,%20int)`
should add all focusable Views regardless if they are focusable in touch mode.


`int` `https://developer.android.com/reference/android/view/View#FOCUSABLES_TOUCH_MODE`

View flag indicating whether `https://developer.android.com/reference/android/view/View#addFocusables(java.util.ArrayList<android.view.View>,%20int,%20int)`
should add only Views focusable in touch mode.


`int` `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO`

This view determines focusability automatically.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_BACKWARD`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_DOWN`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#FOCUS_UP`

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`.


`int` `https://developer.android.com/reference/android/view/View#GONE`

This view is invisible, and it doesn't take any space for layout
purposes.


`int` `https://developer.android.com/reference/android/view/View#HAPTIC_FEEDBACK_ENABLED`

View flag indicating whether this view should have haptic feedback
enabled for events such as long presses.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_AUTO`

Automatically determine whether a view is important for accessibility.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO`

The view is not important for accessibility.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`

The view is not important for accessibility, nor are any of its
descendant views.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_YES`

The view is important for accessibility.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO`

Automatically determine whether a view is important for autofill.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO`

The view is not important for autofill, but its children (if any) will be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS`

The view is not important for autofill, and its children (if any) will not be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES`

The view is important for autofill, and its children (if any) will be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`

The view is important for autofill, but its children (if any) will not be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO`

Automatically determine whether a view is important for content capture.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO`

The view is not important for content capture, but its children (if any) will be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS`

The view is not important for content capture, and its children (if any) will not be
traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES`

The view is important for content capture, and its children (if any) will be traversed.


`int` `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS`

The view is important for content capture, but its children (if any) will not be traversed.


`int` `https://developer.android.com/reference/android/view/View#INVISIBLE`

This view is invisible, but it still takes up space for layout purposes.


`int` `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`

View flag indicating that the screen should remain on while the
window containing this view is visible to the user.


`int` `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`

<br />

Indicates that the view has a hardware layer.


`int` `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`

Indicates that the view does not have a layer.


`int` `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`

<br />

Indicates that the view has a software layer.


`int` `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_INHERIT`

Horizontal layout direction of this view is inherited from its parent.


`int` `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LOCALE`

Horizontal layout direction of this view is from deduced from the default language
script for the locale.


`int` `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`

Horizontal layout direction of this view is from Left to Right.


`int` `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL`

Horizontal layout direction of this view is from Right to Left.


`int` `https://developer.android.com/reference/android/view/View#MEASURED_HEIGHT_STATE_SHIFT`

Bit shift of `https://developer.android.com/reference/android/view/View#MEASURED_STATE_MASK` to get to the height bits
for functions that combine both width and height into a single int,
such as `https://developer.android.com/reference/android/view/View#getMeasuredState()` and the childState argument of
`https://developer.android.com/reference/android/view/View#resolveSizeAndState(int,%20int,%20int)`.


`int` `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK`

Bits of `https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` and
`https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` that provide the actual measured size.


`int` `https://developer.android.com/reference/android/view/View#MEASURED_STATE_MASK`

Bits of `https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` and
`https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` that provide the additional state bits.


`int` `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`

Bit of `https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` and
`https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()` that indicates the measured size
is smaller that the space the view would like to have.


`int` `https://developer.android.com/reference/android/view/View#NOT_FOCUSABLE`

This view does not want keystrokes.


`int` `https://developer.android.com/reference/android/view/View#NO_ID`

Used to mark a View that has no ID.


`int` `https://developer.android.com/reference/android/view/View#OVER_SCROLL_ALWAYS`

Always allow a user to over-scroll this view, provided it is a
view that can scroll.


`int` `https://developer.android.com/reference/android/view/View#OVER_SCROLL_IF_CONTENT_SCROLLS`

Allow a user to over-scroll this view only if the content is large
enough to meaningfully scroll, provided it is a view that can scroll.


`int` `https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER`

Never allow a user to over-scroll this view.


`int` `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_ABSOLUTE`

A pointer capture mode in which touchpads report absolute finger locations.


`int` `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_RELATIVE`

A pointer capture mode in which touchpad gestures are recognized and reported like mouse
movements.


`int` `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_UNCAPTURED`

A "pointer capture mode" in which the pointer is not captured.


`int` `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_INPUT_FOCUS`

Represents that the user interaction that is requesting a rectangle on screen is
doing so because the View has input/keyboard focus.


`int` `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_SCROLL_ONLY`

Represents that the user interaction that is requesting a rectangle on screen is doing so
only to scroll the View on screen, and the rectangle is not associated with a text cursor or
keyboard focus.


`int` `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_TEXT_CURSOR`

Represents that the user interaction that is requesting a rectangle on screen is
doing so because the View contains a text cursor (caret).


`int` `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_UNDEFINED`

Represents that the user interaction that is requesting a rectangle on screen is
doing so via the original `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect)` or
`https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean)` APIs that do not define the source.


`float` `https://developer.android.com/reference/android/view/View#REQUESTED_FRAME_RATE_CATEGORY_DEFAULT`


`float` `https://developer.android.com/reference/android/view/View#REQUESTED_FRAME_RATE_CATEGORY_HIGH`


`float` `https://developer.android.com/reference/android/view/View#REQUESTED_FRAME_RATE_CATEGORY_LOW`


`float` `https://developer.android.com/reference/android/view/View#REQUESTED_FRAME_RATE_CATEGORY_NORMAL`


`float` `https://developer.android.com/reference/android/view/View#REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE`


`int` `https://developer.android.com/reference/android/view/View#SCREEN_STATE_OFF`

Indicates that the screen has changed state and is now off.


`int` `https://developer.android.com/reference/android/view/View#SCREEN_STATE_ON`

Indicates that the screen has changed state and is now on.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_INSET`

The scrollbar style to display the scrollbars inside the padded area,
increasing the padding of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_OVERLAY`

The scrollbar style to display the scrollbars inside the content area,
without increasing the padding.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_INSET`

The scrollbar style to display the scrollbars at the edge of the view,
increasing the padding of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_OVERLAY`

The scrollbar style to display the scrollbars at the edge of the view,
without increasing the padding.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_DEFAULT`

Position the scroll bar at the default position as determined by the system.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_LEFT`

Position the scroll bar along the left edge.


`int` `https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_RIGHT`

Position the scroll bar along the right edge.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_HORIZONTAL`

Indicates scrolling along the horizontal axis.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_NONE`

Indicates no axis of view scrolling.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_VERTICAL`

Indicates scrolling along the vertical axis.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_AUTO`

The content of this view will be considered for scroll capture if scrolling is possible.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE`

Explicitly exclude this view as a potential scroll capture target.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS`

Explicitly exclude all children of this view as potential scroll capture targets.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE`

Explicitly include this view as a potential scroll capture target.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM`

Scroll indicator direction for the bottom edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END`

Scroll indicator direction for the ending edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT`

Scroll indicator direction for the left edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT`

Scroll indicator direction for the right edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START`

Scroll indicator direction for the starting edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP`

Scroll indicator direction for the top edge of the view.


`int` `https://developer.android.com/reference/android/view/View#SOUND_EFFECTS_ENABLED`

View flag indicating whether this view should have sound effects enabled
for events such as clicking and touching.


`int` `https://developer.android.com/reference/android/view/View#STATUS_BAR_HIDDEN`

*This constant was deprecated
in API level 15.
Use `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE` instead.*


`int` `https://developer.android.com/reference/android/view/View#STATUS_BAR_VISIBLE`

*This constant was deprecated
in API level 15.
Use `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_VISIBLE` instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#hide(int)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()`
instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#hide(int)` with `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()`
instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#BEHAVIOR_DEFAULT` instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE_STICKY`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE` instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`

*This constant was deprecated
in API level 30.
For floating windows, use `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setFitInsetsTypes(int)` with
`https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()` ()}. For non-floating windows that fill the screen, call
`https://developer.android.com/reference/android/view/Window#setDecorFitsSystemWindows(boolean)` with `false`.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`

*This constant was deprecated
in API level 30.
For floating windows, use `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setFitInsetsTypes(int)` with
`https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()`. For non-floating windows that fill the screen, call
`https://developer.android.com/reference/android/view/Window#setDecorFitsSystemWindows(boolean)` with `false`.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsets#getInsetsIgnoringVisibility(int)` instead to retrieve
insets that don't change when system bars change visibility state.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_LIGHT_NAVIGATION_BARS` instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LIGHT_STATUS_BAR`

*This constant was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_LIGHT_STATUS_BARS` instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE`

*This constant was deprecated
in API level 30.
Low profile mode is deprecated. Hide the system bars instead if the application
needs to be in a unobtrusive mode. Use `https://developer.android.com/reference/android/view/WindowInsetsController#hide(int)` with
`https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()`.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_VISIBLE`

*This constant was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`int` `https://developer.android.com/reference/android/view/View#SYSTEM_UI_LAYOUT_FLAGS`

*This constant was deprecated
in API level 30.
System UI layout flags are deprecated.*


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_CENTER`

Center the paragraph, e.g. ALIGN_CENTER.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY`

Default for the root view.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_INHERIT`

Default text alignment.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_END`

Align to the end of the paragraph, e.g. ALIGN_OPPOSITE.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_START`

Align to the start of the paragraph, e.g. ALIGN_NORMAL.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_END`

Align to the end of the view, which is ALIGN_RIGHT if the view's resolved
layoutDirection is LTR, and ALIGN_LEFT otherwise.


`int` `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_START`

Align to the start of the view, which is ALIGN_LEFT if the view's resolved
layoutDirection is LTR, and ALIGN_RIGHT otherwise.


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_ANY_RTL`

Text direction is using "any-RTL" algorithm.


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG`

Text direction is using "first strong algorithm".


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_LTR`

Text direction is using "first strong algorithm".


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_RTL`

Text direction is using "first strong algorithm".


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_INHERIT`

Text direction is inherited through `https://developer.android.com/reference/android/view/ViewGroup`


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LOCALE`

Text direction is coming from the system Locale.


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LTR`

Text direction is forced to LTR.


`int` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_RTL`

Text direction is forced to RTL.


`https://developer.android.com/reference/java/lang/String` `https://developer.android.com/reference/android/view/View#VIEW_LOG_TAG`

The logging tag used by this class with android.util.Log.


`int` `https://developer.android.com/reference/android/view/View#VISIBLE`

This view is visible.


### Inherited fields

From class `https://developer.android.com/reference/android/view/View` `
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#ALPHA`

A Property wrapper around the `alpha` functionality handled by the
`https://developer.android.com/reference/android/view/View#setAlpha(float)` and `https://developer.android.com/reference/android/view/View#getAlpha()` methods.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#EMPTY_STATE_SET`

Indicates the view has no states set.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_FOCUSED_SELECTED_STATE_SET`

Indicates the view is enabled, focused and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is enabled, focused, selected and its window
has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_FOCUSED_STATE_SET`

Indicates the view is enabled and has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is enabled, focused and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_SELECTED_STATE_SET`

Indicates the view is enabled and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is enabled, selected and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`

Indicates the view is enabled.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#ENABLED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is enabled and that its window has focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#FOCUSED_SELECTED_STATE_SET`

Indicates the view is focused and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is focused, selected and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

Indicates the view is focused.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#FOCUSED_WINDOW_FOCUSED_STATE_SET`

Indicates the view has the focus and that its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET`

Indicates the view is pressed, enabled, focused and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, enabled, focused, selected and its window
has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_FOCUSED_STATE_SET`

Indicates the view is pressed, enabled and focused.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, enabled, focused and its window has the
focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_SELECTED_STATE_SET`

Indicates the view is pressed, enabled and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, enabled, selected and its window has the
focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_STATE_SET`

Indicates the view is pressed and enabled.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, enabled and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_FOCUSED_SELECTED_STATE_SET`

Indicates the view is pressed, focused and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, focused, selected and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_FOCUSED_STATE_SET`

Indicates the view is pressed and focused.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, focused and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_SELECTED_STATE_SET`

Indicates the view is pressed and selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed, selected and its window has the focus.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`

Indicates the view is pressed.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#PRESSED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is pressed and its window has the focus.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#ROTATION`

A Property wrapper around the `rotation` functionality handled by the
`https://developer.android.com/reference/android/view/View#setRotation(float)` and `https://developer.android.com/reference/android/view/View#getRotation()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#ROTATION_X`

A Property wrapper around the `rotationX` functionality handled by the
`https://developer.android.com/reference/android/view/View#setRotationX(float)` and `https://developer.android.com/reference/android/view/View#getRotationX()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#ROTATION_Y`

A Property wrapper around the `rotationY` functionality handled by the
`https://developer.android.com/reference/android/view/View#setRotationY(float)` and `https://developer.android.com/reference/android/view/View#getRotationY()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#SCALE_X`

A Property wrapper around the `scaleX` functionality handled by the
`https://developer.android.com/reference/android/view/View#setScaleX(float)` and `https://developer.android.com/reference/android/view/View#getScaleX()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#SCALE_Y`

A Property wrapper around the `scaleY` functionality handled by the
`https://developer.android.com/reference/android/view/View#setScaleY(float)` and `https://developer.android.com/reference/android/view/View#getScaleY()` methods.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

Indicates the view is selected.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#SELECTED_WINDOW_FOCUSED_STATE_SET`

Indicates the view is selected and that its window has the focus.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#TRANSLATION_X`

A Property wrapper around the `translationX` functionality handled by the
`https://developer.android.com/reference/android/view/View#setTranslationX(float)` and `https://developer.android.com/reference/android/view/View#getTranslationX()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#TRANSLATION_Y`

A Property wrapper around the `translationY` functionality handled by the
`https://developer.android.com/reference/android/view/View#setTranslationY(float)` and `https://developer.android.com/reference/android/view/View#getTranslationY()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#TRANSLATION_Z`

A Property wrapper around the `translationZ` functionality handled by the
`https://developer.android.com/reference/android/view/View#setTranslationZ(float)` and `https://developer.android.com/reference/android/view/View#getTranslationZ()` methods.


`
protected
static
final
int[]` `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

Indicates the view's window has focus.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#X`

A Property wrapper around the `x` functionality handled by the
`https://developer.android.com/reference/android/view/View#setX(float)` and `https://developer.android.com/reference/android/view/View#getX()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#Y`

A Property wrapper around the `y` functionality handled by the
`https://developer.android.com/reference/android/view/View#setY(float)` and `https://developer.android.com/reference/android/view/View#getY()` methods.


`
public
static
final
https://developer.android.com/reference/android/util/Property<https://developer.android.com/reference/android/view/View, https://developer.android.com/reference/java/lang/Float>` `https://developer.android.com/reference/android/view/View#Z`

A Property wrapper around the `z` functionality handled by the
`https://developer.android.com/reference/android/view/View#setZ(float)` and `https://developer.android.com/reference/android/view/View#getZ()` methods.


| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/widget/TextView#TextView(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` |
| ` https://developer.android.com/reference/android/widget/TextView#TextView(android.content.Context,%20android.util.AttributeSet)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs) ` |
| ` https://developer.android.com/reference/android/widget/TextView#TextView(android.content.Context,%20android.util.AttributeSet,%20int)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs, int defStyleAttr) ` |
| ` https://developer.android.com/reference/android/widget/TextView#TextView(android.content.Context,%20android.util.AttributeSet,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs, int defStyleAttr, int defStyleRes) ` |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#addExtraDataToAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo info, https://developer.android.com/reference/java/lang/String extraDataKey, https://developer.android.com/reference/android/os/Bundle arguments) ` Adds extra data to an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` based on an explicit request for the additional data. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#addTextChangedListener(android.text.TextWatcher)(https://developer.android.com/reference/android/text/TextWatcher watcher) ` Adds a TextWatcher to the list of those whose methods are called whenever this TextView's text changes. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#append(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text) ` Convenience method to append the specified text to the TextView's display buffer, upgrading it to `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE` if it was not already editable. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#append(java.lang.CharSequence,%20int,%20int)(https://developer.android.com/reference/java/lang/CharSequence text, int start, int end) ` Convenience method to append the specified text slice to the TextView's display buffer, upgrading it to `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE` if it was not already editable. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#autofill(android.view.autofill.AutofillValue)(https://developer.android.com/reference/android/view/autofill/AutofillValue value) ` Automatically fills the content of this view with the `value`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#beginBatchEdit()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#bringPointIntoView(int)(int offset) ` Move the point, specified by the offset, into the view if it is needed. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#bringPointIntoView(int,%20boolean)(int offset, boolean requestRectWithoutFocus) ` Move the insertion position of the given offset into visible area of the View. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#cancelLongPress()() ` Cancels a pending long press. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#clearComposingText()() ` Use `https://developer.android.com/reference/android/view/inputmethod/BaseInputConnection#removeComposingSpans(android.text.Spannable)` to remove any IME composing state from this text view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#computeScroll()() ` Called by a parent to request that a child update its values for mScrollX and mScrollY if necessary. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#debug(int)(int depth) ` |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#didTouchFocusSelect()() ` Returns true, only while processing a touch gesture, if the initial touch down event caused focus to move to the text view and as a result its selection changed. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#drawableHotspotChanged(float,%20float)(float x, float y) ` This function is called whenever the view hotspot changes and needs to be propagated to drawables or child views managed by the view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#endBatchEdit()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#extractText(android.view.inputmethod.ExtractedTextRequest,%20android.view.inputmethod.ExtractedText)(https://developer.android.com/reference/android/view/inputmethod/ExtractedTextRequest request, https://developer.android.com/reference/android/view/inputmethod/ExtractedText outText) ` If this TextView contains editable content, extract a portion of it based on the information in <var translate="no">request</var> in to <var translate="no">outText</var>. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#findViewsWithText(java.util.ArrayList<android.view.View>,%20java.lang.CharSequence,%20int)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> outViews, https://developer.android.com/reference/java/lang/CharSequence searched, int flags) ` Finds the Views that contain given text. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/TextView#getAccessibilityClassName()() ` Return the class name of this object to be used for accessibility purposes. |
| ` final int` | ` https://developer.android.com/reference/android/widget/TextView#getAutoLinkMask()() ` Gets the autolink mask of the text. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getAutoSizeMaxTextSize()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getAutoSizeMinTextSize()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getAutoSizeStepGranularity()() ` |
| ` int[]` | ` https://developer.android.com/reference/android/widget/TextView#getAutoSizeTextAvailableSizes()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getAutoSizeTextType()() ` Returns the type of auto-size set for this widget. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/widget/TextView#getAutofillHints()() ` Gets the hints that help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how to autofill the view with the user's data. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getAutofillType()() ` Describes the autofill type of this view, so an `https://developer.android.com/reference/android/service/autofill/AutofillService` can create the proper `https://developer.android.com/reference/android/view/autofill/AutofillValue` when autofilling the view. |
| ` https://developer.android.com/reference/android/view/autofill/AutofillValue` | ` https://developer.android.com/reference/android/widget/TextView#getAutofillValue()() ` Gets the `https://developer.android.com/reference/android/widget/TextView`'s current text for AutoFill. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getBaseline()() ` <br /> Return the offset of the widget's text baseline from the widget's top boundary. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getBreakStrategy()() ` Gets the current strategy for breaking paragraphs into lines. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawablePadding()() ` Returns the padding between the compound drawables and the text. |
| ` https://developer.android.com/reference/android/graphics/BlendMode` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawableTintBlendMode()() ` Returns the blending mode used to apply the tint to the compound drawables, if specified. |
| ` https://developer.android.com/reference/android/content/res/ColorStateList` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawableTintList()() ` |
| ` https://developer.android.com/reference/android/graphics/PorterDuff.Mode` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawableTintMode()() ` Returns the blending mode used to apply the tint to the compound drawables, if specified. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawables()() ` Returns drawables for the left, top, right, and bottom borders. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundDrawablesRelative()() ` Returns drawables for the start, top, end, and bottom borders. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingBottom()() ` Returns the bottom padding of the view, plus space for the bottom Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingEnd()() ` Returns the end padding of the view, plus space for the end Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingLeft()() ` Returns the left padding of the view, plus space for the left Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingRight()() ` Returns the right padding of the view, plus space for the right Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingStart()() ` Returns the start padding of the view, plus space for the start Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getCompoundPaddingTop()() ` Returns the top padding of the view, plus space for the top Drawable if any. |
| ` final int` | ` https://developer.android.com/reference/android/widget/TextView#getCurrentHintTextColor()() ` <br /> Return the current color selected to paint the hint text. |
| ` final int` | ` https://developer.android.com/reference/android/widget/TextView#getCurrentTextColor()() ` Return the current color selected for normal text. |
| ` https://developer.android.com/reference/android/view/ActionMode.Callback` | ` https://developer.android.com/reference/android/widget/TextView#getCustomInsertionActionModeCallback()() ` Retrieves the value set in `https://developer.android.com/reference/android/widget/TextView#setCustomInsertionActionModeCallback(android.view.ActionMode.Callback)`. |
| ` https://developer.android.com/reference/android/view/ActionMode.Callback` | ` https://developer.android.com/reference/android/widget/TextView#getCustomSelectionActionModeCallback()() ` Retrieves the value set in `https://developer.android.com/reference/android/widget/TextView#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback)`. |
| ` https://developer.android.com/reference/android/text/Editable` | ` https://developer.android.com/reference/android/widget/TextView#getEditableText()() ` Return the text that TextView is displaying as an Editable object. |
| ` https://developer.android.com/reference/android/text/TextUtils.TruncateAt` | ` https://developer.android.com/reference/android/widget/TextView#getEllipsize()() ` Returns where, if anywhere, words that are longer than the view is wide should be ellipsized. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/TextView#getError()() ` Returns the error message that was set to be displayed with `https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence)`, or `null` if no error was set or if it the error was cleared by the widget after user input. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getExtendedPaddingBottom()() ` Returns the extended bottom padding of the view, including both the bottom Drawable if any and any extra space to keep more than maxLines of text from showing. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getExtendedPaddingTop()() ` Returns the extended top padding of the view, including both the top Drawable if any and any extra space to keep more than maxLines of text from showing. |
| ` https://developer.android.com/reference/android/text/InputFilter` | ` https://developer.android.com/reference/android/widget/TextView#getFilters()() ` Returns the current list of input filters. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getFirstBaselineToTopHeight()() ` Returns the distance between the first text baseline and the top of this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#getFocusedRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect r) ` When a view has focus and the user navigates away from it, the next view is searched for starting from the rectangle filled in by this method. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()() ` Gets focused search result highlight color. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()() ` Gets the focused search result index. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/widget/TextView#getFontFeatureSettings()() ` Returns the font feature settings. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/widget/TextView#getFontVariationSettings()() ` Returns the font variation settings. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#getFreezesText()() ` Return whether this text view is including its entire text contents in frozen icicles. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getGravity()() ` Returns the horizontal and vertical alignment of this TextView. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getHighlightColor()() ` |
| ` https://developer.android.com/reference/android/text/Highlights` | ` https://developer.android.com/reference/android/widget/TextView#getHighlights()() ` Returns highlights |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/TextView#getHint()() ` Returns the hint that is displayed when the text of the TextView is empty. |
| ` final https://developer.android.com/reference/android/content/res/ColorStateList` | ` https://developer.android.com/reference/android/widget/TextView#getHintTextColors()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getHyphenationFrequency()() ` Gets the current frequency of automatic hyphenation to be used when determining word breaks. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getImeActionId()() ` Get the IME action ID previous set with `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/TextView#getImeActionLabel()() ` Get the IME action label previous set with `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`. |
| ` https://developer.android.com/reference/android/os/LocaleList` | ` https://developer.android.com/reference/android/widget/TextView#getImeHintLocales()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getImeOptions()() ` Get the type of the Input Method Editor (IME). |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#getIncludeFontPadding()() ` Gets whether the TextView includes extra top and bottom padding to make room for accents that go above the normal ascent and descent. |
| ` https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/widget/TextView#getInputExtras(boolean)(boolean create) ` Retrieve the input extras currently associated with the text view, which can be viewed as well as modified. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getInputType()() ` Get the type of the editable content. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getJustificationMode()() ` |
| ` final https://developer.android.com/reference/android/text/method/KeyListener` | ` https://developer.android.com/reference/android/widget/TextView#getKeyListener()() ` Gets the current `https://developer.android.com/reference/android/text/method/KeyListener` for the TextView. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLastBaselineToBottomHeight()() ` Returns the distance between the last text baseline and the bottom of this TextView. |
| ` final https://developer.android.com/reference/android/text/Layout` | ` https://developer.android.com/reference/android/widget/TextView#getLayout()() ` Gets the `https://developer.android.com/reference/android/text/Layout` that is currently being used to display the text. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getLetterSpacing()() ` Gets the text letter-space value, which determines the spacing between characters. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLineBounds(int,%20android.graphics.Rect)(int line, https://developer.android.com/reference/android/graphics/Rect bounds) ` Return the baseline for the specified line (0...getLineCount() - 1) If bounds is not null, return the top, left, right, bottom extents of the specified line in it. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLineBreakStyle()() ` Gets the current line-break style for text wrapping. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLineBreakWordStyle()() ` Gets the current line-break word style for text wrapping. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLineCount()() ` Return the number of lines of text, or 0 if the internal Layout has not been built. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLineHeight()() ` Gets the vertical distance between lines of text, in pixels. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getLineSpacingExtra()() ` Gets the line spacing extra space |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getLineSpacingMultiplier()() ` Gets the line spacing multiplier |
| ` final https://developer.android.com/reference/android/content/res/ColorStateList` | ` https://developer.android.com/reference/android/widget/TextView#getLinkTextColors()() ` |
| ` final boolean` | ` https://developer.android.com/reference/android/widget/TextView#getLinksClickable()() ` Returns whether the movement method will automatically be set to `https://developer.android.com/reference/android/text/method/LinkMovementMethod` if `https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)` has been set to nonzero and links are detected in `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMarqueeRepeatLimit()() ` Gets the number of times the marquee animation is repeated. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMaxEms()() ` Returns the maximum width of TextView in terms of ems or -1 if the maximum width was set using `https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMaxHeight()() ` Returns the maximum height of TextView in terms of pixels or -1 if the maximum height was set using `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMaxLines()() ` Returns the maximum height of TextView in terms of number of lines or -1 if the maximum height was set using `https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMaxWidth()() ` Returns the maximum width of TextView in terms of pixels or -1 if the maximum width was set using `https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMinEms()() ` Returns the minimum width of TextView in terms of ems or -1 if the minimum width was set using `https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMinHeight()() ` Returns the minimum height of TextView in terms of pixels or -1 if the minimum height was set using `https://developer.android.com/reference/android/widget/TextView#setMinLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMinLines()() ` Returns the minimum height of TextView in terms of number of lines or -1 if the minimum height was set using `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getMinWidth()() ` Returns the minimum width of TextView in terms of pixels or -1 if the minimum width was set using `https://developer.android.com/reference/android/widget/TextView#setMinEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`. |
| ` https://developer.android.com/reference/android/graphics/Paint.FontMetrics` | ` https://developer.android.com/reference/android/widget/TextView#getMinimumFontMetrics()() ` Get the minimum font metrics used for line spacing. |
| ` final https://developer.android.com/reference/android/text/method/MovementMethod` | ` https://developer.android.com/reference/android/widget/TextView#getMovementMethod()() ` Gets the `https://developer.android.com/reference/android/text/method/MovementMethod` being used for this TextView, which provides positioning, scrolling, and text selection functionality. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getOffsetForPosition(float,%20float)(float x, float y) ` Get the character offset closest to the specified absolute position. |
| ` https://developer.android.com/reference/android/text/TextPaint` | ` https://developer.android.com/reference/android/widget/TextView#getPaint()() ` Gets the `https://developer.android.com/reference/android/text/TextPaint` used for the text. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getPaintFlags()() ` Gets the flags on the Paint being used to display the text. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/widget/TextView#getPrivateImeOptions()() ` Get the private type of the content. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()() ` Gets the search result highlight color. |
| ` int[]` | ` https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()() ` Gets the current search result ranges. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getSelectionEnd()() ` Convenience for `https://developer.android.com/reference/android/text/Selection#getSelectionEnd(java.lang.CharSequence)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getSelectionStart()() ` Convenience for `https://developer.android.com/reference/android/text/Selection#getSelectionStart(java.lang.CharSequence)`. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getShadowColor()() ` Gets the color of the shadow layer. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getShadowDx()() ` |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getShadowDy()() ` Gets the vertical offset of the shadow layer. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getShadowRadius()() ` Gets the radius of the shadow layer. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#getShiftDrawingOffsetForStartOverhang()() ` Returns true if shifting the drawing x offset for start overhang. |
| ` final boolean` | ` https://developer.android.com/reference/android/widget/TextView#getShowSoftInputOnFocus()() ` Returns whether the soft input method will be made visible when this TextView gets focused. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/widget/TextView#getText()() ` Return the text that TextView is displaying. |
| ` https://developer.android.com/reference/android/view/textclassifier/TextClassifier` | ` https://developer.android.com/reference/android/widget/TextView#getTextClassifier()() ` Returns the `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` used by this TextView. |
| ` final https://developer.android.com/reference/android/content/res/ColorStateList` | ` https://developer.android.com/reference/android/widget/TextView#getTextColors()() ` Gets the text colors for the different states (normal, selected, focused) of the TextView. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getTextCursorDrawable()() ` Returns the Drawable corresponding to the text cursor. |
| ` https://developer.android.com/reference/android/text/TextDirectionHeuristic` | ` https://developer.android.com/reference/android/widget/TextView#getTextDirectionHeuristic()() ` Returns resolved `https://developer.android.com/reference/android/text/TextDirectionHeuristic` that will be used for text layout. |
| ` https://developer.android.com/reference/java/util/Locale` | ` https://developer.android.com/reference/android/widget/TextView#getTextLocale()() ` Get the default primary `https://developer.android.com/reference/java/util/Locale` of the text in this TextView. |
| ` https://developer.android.com/reference/android/os/LocaleList` | ` https://developer.android.com/reference/android/widget/TextView#getTextLocales()() ` Get the default `https://developer.android.com/reference/android/os/LocaleList` of the text in this TextView. |
| ` https://developer.android.com/reference/android/text/PrecomputedText.Params` | ` https://developer.android.com/reference/android/widget/TextView#getTextMetricsParams()() ` Gets the parameters for text layout precomputation, for use with `https://developer.android.com/reference/android/text/PrecomputedText`. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getTextScaleX()() ` Gets the extent by which text should be stretched horizontally. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getTextSelectHandle()() ` Returns the Drawable corresponding to the selection handle used for positioning the cursor within text. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getTextSelectHandleLeft()() ` Returns the Drawable corresponding to the left handle used for selecting text. |
| ` https://developer.android.com/reference/android/graphics/drawable/Drawable` | ` https://developer.android.com/reference/android/widget/TextView#getTextSelectHandleRight()() ` Returns the Drawable corresponding to the right handle used for selecting text. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getTextSize()() ` |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTextSizeUnit()() ` Gets the text size unit defined by the developer. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingBottom()() ` Returns the total bottom padding of the view, including the bottom Drawable if any, the extra space to keep more than maxLines from showing, and the vertical offset for gravity, if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingEnd()() ` Returns the total end padding of the view, including the end Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingLeft()() ` Returns the total left padding of the view, including the left Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingRight()() ` Returns the total right padding of the view, including the right Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingStart()() ` Returns the total start padding of the view, including the start Drawable if any. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTotalPaddingTop()() ` Returns the total top padding of the view, including the top Drawable if any, the extra space to keep more than maxLines from showing, and the vertical offset for gravity, if any. |
| ` final https://developer.android.com/reference/android/text/method/TransformationMethod` | ` https://developer.android.com/reference/android/widget/TextView#getTransformationMethod()() ` Gets the current `https://developer.android.com/reference/android/text/method/TransformationMethod` for the TextView. |
| ` https://developer.android.com/reference/android/graphics/Typeface` | ` https://developer.android.com/reference/android/widget/TextView#getTypeface()() ` Gets the current `https://developer.android.com/reference/android/graphics/Typeface` that is used to style the text. |
| ` https://developer.android.com/reference/android/text/style/URLSpan` | ` https://developer.android.com/reference/android/widget/TextView#getUrls()() ` Returns the list of `https://developer.android.com/reference/android/text/style/URLSpan` attached to the text (by `https://developer.android.com/reference/android/text/util/Linkify` or otherwise) if any. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()() ` Returns true if using bounding box as a width, false for using advance as a width. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#hasOverlappingRendering()() ` Returns whether this View has content which overlaps. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#hasSelection()() ` Return true iff there is a selection of nonzero length inside this text view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable) ` Invalidates the specified Drawable. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isAllCaps()() ` Checks whether the transformation method applied to this TextView is set to ALL CAPS. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isAutoHandwritingEnabled()() ` Return whether the View allows automatic handwriting initiation. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isCursorVisible()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isElegantTextHeight()() ` Get the value of the TextView's elegant height metrics flag. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isFallbackLineSpacing()() ` |
| ` final boolean` | ` https://developer.android.com/reference/android/widget/TextView#isHorizontallyScrollable()() ` Returns whether the text is allowed to be wider than the View. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isInputMethodTarget()() ` Returns whether this text view is a current input method target. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isLocalePreferredLineHeightForMinimumUsed()() ` Returns true if the locale preferred line height is used for the minimum line height. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isSingleLine()() ` Returns if the text is constrained to a single horizontally scrolling line ignoring new line characters instead of letting it wrap onto multiple lines. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isSuggestionsEnabled()() ` Return whether or not suggestions are enabled on this TextView. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isTextSelectable()() ` Returns the state of the `textIsSelectable` flag (See `https://developer.android.com/reference/android/widget/TextView#setTextIsSelectable(boolean)`). |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#jumpDrawablesToCurrentState()() ` Call `https://developer.android.com/reference/android/graphics/drawable/Drawable#jumpToCurrentState()` on all Drawable objects associated with this view. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#length()() ` Returns the length, in characters, of the text managed by this TextView |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#moveCursorToVisibleOffset()() ` Move the cursor, if needed, so that it is at an offset that is visible to the user. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onBeginBatchEdit()() ` Called by the framework in response to a request to begin a batch of edit operations through a call to link `https://developer.android.com/reference/android/widget/TextView#beginBatchEdit()`. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onCheckIsTextEditor()() ` Check whether the called view is a text editor, in which case it would make sense to automatically display a soft input window for it. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onCommitCompletion(android.view.inputmethod.CompletionInfo)(https://developer.android.com/reference/android/view/inputmethod/CompletionInfo text) ` Called by the framework in response to a text completion from the current input method, provided by it calling `https://developer.android.com/reference/android/view/inputmethod/InputConnection#commitCompletion(android.view.inputmethod.CompletionInfo)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onCommitCorrection(android.view.inputmethod.CorrectionInfo)(https://developer.android.com/reference/android/view/inputmethod/CorrectionInfo info) ` Called by the framework in response to a text auto-correction (such as fixing a typo using a dictionary) from the current input method, provided by it calling `https://developer.android.com/reference/android/view/inputmethod/InputConnection#commitCorrection(android.view.inputmethod.CorrectionInfo)`. |
| ` https://developer.android.com/reference/android/view/inputmethod/InputConnection` | ` https://developer.android.com/reference/android/widget/TextView#onCreateInputConnection(android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/EditorInfo outAttrs) ` Create a new InputConnection for an InputMethod to interact with the view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)(int[] supportedFormats, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requestsCollector) ` Collects a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` which represents the content to be translated in the view. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onDragEvent(android.view.DragEvent)(https://developer.android.com/reference/android/view/DragEvent event) ` Handles drag events sent by the system following a call to `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onEditorAction(int)(int actionCode) ` Called when an attached input method calls `https://developer.android.com/reference/android/view/inputmethod/InputConnection#performEditorAction(int)` for this text view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onEndBatchEdit()() ` Called by the framework in response to a request to end a batch of edit operations through a call to link `https://developer.android.com/reference/android/widget/TextView#endBatchEdit()`. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle generic motion events. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)`: perform press of the view when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER` or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER` is released, if the view is enabled and clickable. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int repeatCount, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)`: always returns false (doesn't handle the event). |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onKeyPreIme(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Handle a key event before it is processed by any input method associated with the view hierarchy. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onKeyShortcut(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Called on the focused view when a key shortcut event is not handled. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)`: perform clicking of the view when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER` or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SPACE` is released. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onPreDraw()() ` Callback method to be invoked when the view tree is about to be drawn. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onPrivateIMECommand(java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String action, https://developer.android.com/reference/android/os/Bundle data) ` Called by the framework in response to a private command from the current method, provided by it calling `https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand(java.lang.String,%20android.os.Bundle)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onProvideContentCaptureNodeProperties(android.view.contentcapture.ContentCaptureNodeProperties)(https://developer.android.com/reference/android/view/contentcapture/ContentCaptureNodeProperties properties) ` Populates the properties of this `https://developer.android.com/reference/android/view/View` for Content Capture version 2. |
| ` https://developer.android.com/reference/android/view/ContentInfo` | ` https://developer.android.com/reference/android/widget/TextView#onReceiveContent(android.view.ContentInfo)(https://developer.android.com/reference/android/view/ContentInfo payload) ` Default `https://developer.android.com/reference/android/widget/TextView` implementation for receiving content. |
| ` https://developer.android.com/reference/android/view/PointerIcon` | ` https://developer.android.com/reference/android/widget/TextView#onResolvePointerIcon(android.view.MotionEvent,%20int)(https://developer.android.com/reference/android/view/MotionEvent event, int pointerIndex) ` Resolve the pointer icon that should be used for specified pointer in the motion event. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onRestoreInstanceState(android.os.Parcelable)(https://developer.android.com/reference/android/os/Parcelable state) ` Hook allowing a view to re-apply a representation of its internal state that had previously been generated by `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onRtlPropertiesChanged(int)(int layoutDirection) ` Called when any RTL property (layout direction or text direction or text alignment) has been changed. |
| ` https://developer.android.com/reference/android/os/Parcelable` | ` https://developer.android.com/reference/android/widget/TextView#onSaveInstanceState()() ` Hook allowing a view to generate a representation of its internal state that can later be used to create a new instance with that same state. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onScreenStateChanged(int)(int screenState) ` This method is called whenever the state of the screen this view is attached to changes. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onTextContextMenuItem(int)(int id) ` Called when a context menu option for the text view is selected. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle pointer events. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#onTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to handle trackball motion events. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onVisibilityAggregated(boolean)(boolean isVisible) ` Called when the user-visibility of this View is potentially affected by a change to this view itself, an ancestor view or the window this view is attached to. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onWindowFocusChanged(boolean)(boolean hasWindowFocus) ` Called when the window containing this view gains or loses focus. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#performLongClick()() ` Calls this view's OnLongClickListener, if it is defined. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#removeTextChangedListener(android.text.TextWatcher)(https://developer.android.com/reference/android/text/TextWatcher watcher) ` Removes the specified TextWatcher from the list of those whose methods are called whenever this TextView's text changes. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event) ` This method behaves exactly as `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)` but takes as an argument an empty `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and does not perform a check whether accessibility is enabled. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setAllCaps(boolean)(boolean allCaps) ` Sets the properties of this field to transform input to ALL CAPS display. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)(int mask) ` Sets the autolink mask of the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)(int autoSizeMinTextSize, int autoSizeMaxTextSize, int autoSizeStepGranularity, int unit) ` Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)(int[] presetSizes, int unit) ` Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeWithDefaults(int)(int autoSizeTextType) ` Specify whether this widget should automatically scale the text to try to perfectly fit within the layout bounds by using the default auto-size configuration. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setBreakStrategy(int)(int breakStrategy) ` Sets the break strategy for breaking paragraphs into lines. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablePadding(int)(int pad) ` Sets the size of the padding between the compound drawables and the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode blendMode) ` Specifies the blending mode used to apply the tint specified by `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)` to the compound drawables. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList tint) ` Applies a tint to the compound drawables. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode tintMode) ` Specifies the blending mode used to apply the tint specified by `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)` to the compound drawables. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawables(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable left, https://developer.android.com/reference/android/graphics/drawable/Drawable top, https://developer.android.com/reference/android/graphics/drawable/Drawable right, https://developer.android.com/reference/android/graphics/drawable/Drawable bottom) ` Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelative(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable start, https://developer.android.com/reference/android/graphics/drawable/Drawable top, https://developer.android.com/reference/android/graphics/drawable/Drawable end, https://developer.android.com/reference/android/graphics/drawable/Drawable bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable start, https://developer.android.com/reference/android/graphics/drawable/Drawable top, https://developer.android.com/reference/android/graphics/drawable/Drawable end, https://developer.android.com/reference/android/graphics/drawable/Drawable bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int,%20int,%20int,%20int)(int start, int top, int end, int bottom) ` Sets the Drawables (if any) to appear to the start of, above, to the end of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable left, https://developer.android.com/reference/android/graphics/drawable/Drawable top, https://developer.android.com/reference/android/graphics/drawable/Drawable right, https://developer.android.com/reference/android/graphics/drawable/Drawable bottom) ` Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)(int left, int top, int right, int bottom) ` Sets the Drawables (if any) to appear to the left of, above, to the right of, and below the text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCursorVisible(boolean)(boolean visible) ` Set whether the cursor is visible. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCustomInsertionActionModeCallback(android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/ActionMode.Callback actionModeCallback) ` If provided, this ActionMode.Callback will be used to create the ActionMode when text insertion is initiated in this View. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/ActionMode.Callback actionModeCallback) ` If provided, this ActionMode.Callback will be used to create the ActionMode when text selection is initiated in this View. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setEditableFactory(android.text.Editable.Factory)(https://developer.android.com/reference/android/text/Editable.Factory factory) ` Sets the Factory used to create new `https://developer.android.com/reference/android/text/Editable`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setElegantTextHeight(boolean)(boolean elegant) ` Set the TextView's elegant height metrics flag. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setEllipsize(android.text.TextUtils.TruncateAt)(https://developer.android.com/reference/android/text/TextUtils.TruncateAt where) ` Causes words in the text that are longer than the view's width to be ellipsized instead of broken in the middle. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setEms(int)(int ems) ` Sets the width of the TextView to be exactly `ems` wide. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setEnabled(boolean)(boolean enabled) ` Set the enabled state of this view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence error) ` Sets the right-hand compound drawable of the TextView to the "error" icon and sets an error message that will be displayed in a popup when the TextView has focus. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence,%20android.graphics.drawable.Drawable)(https://developer.android.com/reference/java/lang/CharSequence error, https://developer.android.com/reference/android/graphics/drawable/Drawable icon) ` Sets the right-hand compound drawable of the TextView to the specified icon and sets an error message that will be displayed in a popup when the TextView has focus. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setExtractedText(android.view.inputmethod.ExtractedText)(https://developer.android.com/reference/android/view/inputmethod/ExtractedText text) ` Apply to this text view the given extracted text, as previously returned by `https://developer.android.com/reference/android/widget/TextView#extractText(android.view.inputmethod.ExtractedTextRequest,%20android.view.inputmethod.ExtractedText)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFallbackLineSpacing(boolean)(boolean enabled) ` Set whether to respect the ascent and descent of the fallback fonts that are used in displaying the text (which is needed to avoid text from consecutive lines running into each other). |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFilters(android.text.InputFilter[])(https://developer.android.com/reference/android/text/InputFilter filters) ` Sets the list of input filters that will be used if the buffer is Editable. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)(int firstBaselineToTopHeight) ` Updates the top padding of the TextView so that `firstBaselineToTopHeight` is the distance between the top of the TextView and first line's baseline. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)(int color) ` Sets focused search result highlight color. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)(int index) ` Sets the focused search result index. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String)(https://developer.android.com/reference/java/lang/String fontFeatureSettings) ` Sets font feature settings. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#setFontVariationSettings(java.lang.String)(https://developer.android.com/reference/java/lang/String fontVariationSettings) ` Sets TrueType or OpenType font variation settings. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setFreezesText(boolean)(boolean freezesText) ` Control whether this text view saves its entire text contents when freezing to an icicle, in addition to dynamic state such as cursor position. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setGravity(int)(int gravity) ` Sets the horizontal alignment of the text and the vertical gravity that will be used when there is extra space in the TextView beyond what is required for the text itself. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setHeight(int)(int pixels) ` Sets the height of the TextView to be exactly `pixels` tall. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setHighlightColor(int)(int color) ` Sets the color used to display the selection highlight. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setHighlights(android.text.Highlights)(https://developer.android.com/reference/android/text/Highlights highlights) ` Set Highlights |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setHint(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence hint) ` Sets the text to be displayed when the text of the TextView is empty. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setHint(int)(int resid) ` Sets the text to be displayed when the text of the TextView is empty, from a resource. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setHintTextColor(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList colors) ` Sets the color of the hint text. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setHintTextColor(int)(int color) ` Sets the color of the hint text for all the states (disabled, focussed, selected...) of this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setHorizontallyScrolling(boolean)(boolean whether) ` Sets whether the text should be allowed to be wider than the View is. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setHyphenationFrequency(int)(int hyphenationFrequency) ` Sets the frequency of automatic hyphenation to use when determining word breaks. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)(https://developer.android.com/reference/java/lang/CharSequence label, int actionId) ` Change the custom IME action associated with the text view, which will be reported to an IME with `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionLabel` and `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionId` when it has focus. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setImeHintLocales(android.os.LocaleList)(https://developer.android.com/reference/android/os/LocaleList hintLocales) ` Change "hint" locales associated with the text view, which will be reported to an IME with `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#hintLocales` when it has focus. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setImeOptions(int)(int imeOptions) ` Change the editor type integer associated with the text view, which is reported to an Input Method Editor (IME) with `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#imeOptions` when it has focus. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setIncludeFontPadding(boolean)(boolean includepad) ` Set whether the TextView includes extra top and bottom padding to make room for accents that go above the normal ascent and descent. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setInputExtras(int)(int xmlResId) ` Set the extra input data of the text, which is the `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#extras` Bundle that will be filled in when creating an input connection. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setInputType(int)(int type) ` Set the type of the content with a constant as defined for `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#inputType`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setJustificationMode(int)(int justificationMode) ` Set justification mode. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)(https://developer.android.com/reference/android/text/method/KeyListener input) ` Sets the key listener to be used with this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)(int lastBaselineToBottomHeight) ` Updates the bottom padding of the TextView so that `lastBaselineToBottomHeight` is the distance between the bottom of the TextView and the last line's baseline. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLetterSpacing(float)(float letterSpacing) ` Sets text letter-spacing in em units. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLineBreakStyle(int)(int lineBreakStyle) ` Sets the line-break style for text wrapping. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLineBreakWordStyle(int)(int lineBreakWordStyle) ` Sets the line-break word style for text wrapping. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLineHeight(int,%20float)(int unit, float lineHeight) ` Sets an explicit line height to a given unit and value for this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLineHeight(int)(int lineHeight) ` Sets an explicit line height for this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)(float add, float mult) ` Sets line spacing for this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLines(int)(int lines) ` Sets the height of the TextView to be exactly `lines` tall. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList colors) ` Sets the color of links in the text. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(int)(int color) ` Sets the color of links in the text. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setLinksClickable(boolean)(boolean whether) ` Sets whether the movement method will automatically be set to `https://developer.android.com/reference/android/text/method/LinkMovementMethod` if `https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)` has been set to nonzero and links are detected in `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setLocalePreferredLineHeightForMinimumUsed(boolean)(boolean flag) ` Set true if the locale preferred line height is used for the minimum line height. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMarqueeRepeatLimit(int)(int marqueeLimit) ` Sets how many times to repeat the marquee animation. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)(int maxEms) ` Sets the width of the TextView to be at most `maxEms` wide. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)(int maxPixels) ` Sets the height of the TextView to be at most `maxPixels` tall. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)(int maxLines) ` Sets the height of the TextView to be at most `maxLines` tall. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)(int maxPixels) ` Sets the width of the TextView to be at most `maxPixels` wide. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMinEms(int)(int minEms) ` Sets the width of the TextView to be at least `minEms` wide. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)(int minPixels) ` Sets the height of the TextView to be at least `minPixels` tall. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMinLines(int)(int minLines) ` Sets the height of the TextView to be at least `minLines` tall. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)(int minPixels) ` Sets the width of the TextView to be at least `minPixels` wide. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)(https://developer.android.com/reference/android/graphics/Paint.FontMetrics minimumFontMetrics) ` Set the minimum font metrics used for line spacing. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setMovementMethod(android.text.method.MovementMethod)(https://developer.android.com/reference/android/text/method/MovementMethod movement) ` Sets the `https://developer.android.com/reference/android/text/method/MovementMethod` for handling arrow key movement for this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setOnEditorActionListener(android.widget.TextView.OnEditorActionListener)(https://developer.android.com/reference/android/widget/TextView.OnEditorActionListener l) ` Set a special listener to be called when an action is performed on the text view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setPadding(int,%20int,%20int,%20int)(int left, int top, int right, int bottom) ` Sets the padding. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setPaddingRelative(int,%20int,%20int,%20int)(int start, int top, int end, int bottom) ` Sets the relative padding. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setPaintFlags(int)(int flags) ` Sets flags on the Paint being used to display the text and reflows the text if they are different from the old flags. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setPrivateImeOptions(java.lang.String)(https://developer.android.com/reference/java/lang/String type) ` Set the private content type of the text, which is the `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#privateImeOptions` field that will be filled in when creating an input connection. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setRawInputType(int)(int type) ` Directly change the content type integer of the text view, without modifying any other state. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setScroller(android.widget.Scroller)(https://developer.android.com/reference/android/widget/Scroller s) ` Sets the Scroller used for producing a scrolling animation |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)(int color) ` Sets the search result highlight color. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])(int... ranges) ` Sets the search result ranges with flatten range representation. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSelectAllOnFocus(boolean)(boolean selectAllOnFocus) ` Set the TextView so that when it takes focus, all the text is selected. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSelected(boolean)(boolean selected) ` Changes the selection state of this view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)(float radius, float dx, float dy, int color) ` Gives the text a shadow of the specified blur radius and color, the specified distance from its drawn position. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setShiftDrawingOffsetForStartOverhang(boolean)(boolean shiftDrawingOffsetForStartOverhang) ` Set true for shifting the drawing x offset for showing overhang at the start position. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setShowSoftInputOnFocus(boolean)(boolean show) ` Sets whether the soft input method will be made visible when this TextView gets focused. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSingleLine(boolean)(boolean singleLine) ` If true, sets the properties of this field (number of lines, horizontally scrolling, transformation method) to be for a single-line input; if false, restores these to the default conditions. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setSingleLine()() ` Sets the properties of this field (lines, horizontally scrolling, transformation method) to be for a single-line input. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setSpannableFactory(android.text.Spannable.Factory)(https://developer.android.com/reference/android/text/Spannable.Factory factory) ` Sets the Factory used to create new `https://developer.android.com/reference/android/text/Spannable`. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setText(int)(int resid) ` Sets the text to be displayed using a string resource identifier. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text) ` Sets the text to be displayed. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence,%20android.widget.TextView.BufferType)(https://developer.android.com/reference/java/lang/CharSequence text, https://developer.android.com/reference/android/widget/TextView.BufferType type) ` Sets the text to be displayed and the `https://developer.android.com/reference/android/widget/TextView.BufferType`. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setText(int,%20android.widget.TextView.BufferType)(int resid, https://developer.android.com/reference/android/widget/TextView.BufferType type) ` Sets the text to be displayed using a string resource identifier and the `https://developer.android.com/reference/android/widget/TextView.BufferType`. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)(char[] text, int start, int len) ` Sets the TextView to display the specified slice of the specified char array. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextAppearance(android.content.Context,%20int)(https://developer.android.com/reference/android/content/Context context, int resId) ` *This method was deprecated in API level 23. Use `https://developer.android.com/reference/android/widget/TextView#setTextAppearance(int)` instead.* |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextAppearance(int)(int resId) ` Sets the text appearance from the specified style resource. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextClassifier(android.view.textclassifier.TextClassifier)(https://developer.android.com/reference/android/view/textclassifier/TextClassifier textClassifier) ` Sets the `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` for this TextView. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextColor(int)(int color) ` Sets the text color for all the states (normal, selected, focused) to be this color. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList colors) ` Sets the text color. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable textCursorDrawable) ` Sets the Drawable corresponding to the text cursor. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(int)(int textCursorDrawable) ` Sets the Drawable corresponding to the text cursor. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextIsSelectable(boolean)(boolean selectable) ` Sets whether the content of this view is selectable by the user. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setTextKeepState(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text) ` Sets the text to be displayed but retains the cursor position. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setTextKeepState(java.lang.CharSequence,%20android.widget.TextView.BufferType)(https://developer.android.com/reference/java/lang/CharSequence text, https://developer.android.com/reference/android/widget/TextView.BufferType type) ` Sets the text to be displayed and the `https://developer.android.com/reference/android/widget/TextView.BufferType` but retains the cursor position. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextLocale(java.util.Locale)(https://developer.android.com/reference/java/util/Locale locale) ` Set the default `https://developer.android.com/reference/java/util/Locale` of the text in this TextView to a one-member `https://developer.android.com/reference/android/os/LocaleList` containing just the given Locale. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextLocales(android.os.LocaleList)(https://developer.android.com/reference/android/os/LocaleList locales) ` Set the default `https://developer.android.com/reference/android/os/LocaleList` of the text in this TextView to the given value. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextMetricsParams(android.text.PrecomputedText.Params)(https://developer.android.com/reference/android/text/PrecomputedText.Params params) ` Apply the text layout parameter. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextScaleX(float)(float size) ` Sets the horizontal scale factor for text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(int)(int textSelectHandle) ` Sets the Drawable corresponding to the selection handle used for positioning the cursor within text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable textSelectHandle) ` Sets the Drawable corresponding to the selection handle used for positioning the cursor within text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(int)(int textSelectHandleLeft) ` Sets the Drawable corresponding to the left handle used for selecting text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable textSelectHandleLeft) ` Sets the Drawable corresponding to the left handle used for selecting text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable textSelectHandleRight) ` Sets the Drawable corresponding to the right handle used for selecting text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(int)(int textSelectHandleRight) ` Sets the Drawable corresponding to the right handle used for selecting text. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSize(int,%20float)(int unit, float size) ` Set the default text size to a given unit and value. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTextSize(float)(float size) ` Set the default text size to the given value, interpreted as "scaled pixel" units. |
| ` final void` | ` https://developer.android.com/reference/android/widget/TextView#setTransformationMethod(android.text.method.TransformationMethod)(https://developer.android.com/reference/android/text/method/TransformationMethod method) ` Sets the transformation that is applied to the text that this TextView is displaying. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface)(https://developer.android.com/reference/android/graphics/Typeface tf) ` Sets the typeface and style in which the text should be displayed. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface,%20int)(https://developer.android.com/reference/android/graphics/Typeface tf, int style) ` Sets the typeface and style in which the text should be displayed, and turns on the fake bold and italic bits in the Paint if the Typeface that you provided does not have all the bits in the style that you specified. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setUseBoundsForWidth(boolean)(boolean useBoundsForWidth) ` Set true for using width of bounding box as a source of automatic line breaking and drawing. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#setWidth(int)(int pixels) ` Sets the width of the TextView to be exactly `pixels` wide. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#showContextMenu()() ` Shows the context menu for this view. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#showContextMenu(float,%20float)(float x, float y) ` Shows the context menu for this view anchored to the specified view-relative coordinate. |

| ### Protected methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#computeHorizontalScrollRange()() ` <br /> Compute the horizontal range that the horizontal scrollbar represents. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#computeVerticalScrollExtent()() ` <br /> Compute the vertical extent of the vertical scrollbar's thumb within the vertical range. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#computeVerticalScrollRange()() ` <br /> Compute the vertical range that the vertical scrollbar represents. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#drawableStateChanged()() ` This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getBottomPaddingOffset()() ` Amount by which to extend the bottom fading region. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#getDefaultEditable()() ` Subclasses override this to specify that they have a KeyListener by default even if not specifically called for in the XML options. |
| ` https://developer.android.com/reference/android/text/method/MovementMethod` | ` https://developer.android.com/reference/android/widget/TextView#getDefaultMovementMethod()() ` Subclasses override this to specify a default movement method. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getLeftFadingEdgeStrength()() ` Returns the strength, or intensity, of the left faded edge. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getLeftPaddingOffset()() ` Amount by which to extend the left fading region. |
| ` float` | ` https://developer.android.com/reference/android/widget/TextView#getRightFadingEdgeStrength()() ` Returns the strength, or intensity, of the right faded edge. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getRightPaddingOffset()() ` Amount by which to extend the right fading region. |
| ` int` | ` https://developer.android.com/reference/android/widget/TextView#getTopPaddingOffset()() ` Amount by which to extend the top fading region. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#isPaddingOffsetRequired()() ` If the View draws content inside its padding and enables fading edges, it needs to support padding offsets. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onAttachedToWindow()() ` This is called when the view is attached to a window. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig) ` Called when the current configuration of the resources being used by the application have changed. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onCreateContextMenu(android.view.ContextMenu)(https://developer.android.com/reference/android/view/ContextMenu menu) ` Views should implement this if the view itself is going to add items to the context menu. |
| ` int[]` | ` https://developer.android.com/reference/android/widget/TextView#onCreateDrawableState(int)(int extraSpace) ` Generate the new `https://developer.android.com/reference/android/graphics/drawable/Drawable` state for this view. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onDraw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas) ` Implement this to do your drawing. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onFocusChanged(boolean,%20int,%20android.graphics.Rect)(boolean focused, int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect) ` Called by the view system when the focus state of this view changes. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onLayout(boolean,%20int,%20int,%20int,%20int)(boolean changed, int left, int top, int right, int bottom) ` Called from layout when this view should assign a size and position to each of its children. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onMeasure(int,%20int)(int widthMeasureSpec, int heightMeasureSpec) ` <br /> Measure the view and its content to determine the measured width and the measured height. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onScrollChanged(int,%20int,%20int,%20int)(int horiz, int vert, int oldHoriz, int oldVert) ` This is called in response to an internal scroll in this view (i.e., the view scrolled its own contents). |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onSelectionChanged(int,%20int)(int selStart, int selEnd) ` This method is called when the selection has changed, in case any subclasses would like to know. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onTextChanged(java.lang.CharSequence,%20int,%20int,%20int)(https://developer.android.com/reference/java/lang/CharSequence text, int start, int lengthBefore, int lengthAfter) ` This method is called when the text is changed, in case any subclasses would like to know. |
| ` void` | ` https://developer.android.com/reference/android/widget/TextView#onVisibilityChanged(android.view.View,%20int)(https://developer.android.com/reference/android/view/View changedView, int visibility) ` Called when the visibility of the view or an ancestor of the view has changed. |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#setFrame(int,%20int,%20int,%20int)(int l, int t, int r, int b) ` |
| ` boolean` | ` https://developer.android.com/reference/android/widget/TextView#verifyDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who) ` If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying. |

### Inherited methods

From class `

https://developer.android.com/reference/android/view/View

` `


void` `
https://developer.android.com/reference/android/view/View#addChildrenForAccessibility(java.util.ArrayList<android.view.View>)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> outChildren)
`

Adds the children of this View relevant for accessibility to the given list
as output.


`


void` `
https://developer.android.com/reference/android/view/View#addExtraDataToAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo,%20java.lang.String,%20android.os.Bundle)(https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo info, https://developer.android.com/reference/java/lang/String extraDataKey, https://developer.android.com/reference/android/os/Bundle arguments)
`

Adds extra data to an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` based on an explicit request for the
additional data.


`


void` `
https://developer.android.com/reference/android/view/View#addFocusables(java.util.ArrayList<android.view.View>,%20int)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> views, int direction)
`

Add any focusable views that are descendants of this view (possibly
including this view if it is focusable itself) to views.


`


void` `
https://developer.android.com/reference/android/view/View#addFocusables(java.util.ArrayList<android.view.View>,%20int,%20int)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> views, int direction, int focusableMode)
`

Adds any focusable views that are descendants of this view (possibly
including this view if it is focusable itself) to views.


`


void` `
https://developer.android.com/reference/android/view/View#addKeyboardNavigationClusters(java.util.Collection<android.view.View>,%20int)(https://developer.android.com/reference/java/util/Collection<https://developer.android.com/reference/android/view/View> views, int direction)
`

Adds any keyboard navigation cluster roots that are descendants of this view (possibly
including this view if it is a cluster root itself) to views.


`


void` `
https://developer.android.com/reference/android/view/View#addOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener)(https://developer.android.com/reference/android/view/View.OnAttachStateChangeListener listener)
`

Add a listener for attach state changes.


`


void` `
https://developer.android.com/reference/android/view/View#addOnLayoutChangeListener(android.view.View.OnLayoutChangeListener)(https://developer.android.com/reference/android/view/View.OnLayoutChangeListener listener)
`

Add a listener that will be called when the bounds of the view change due to
layout processing.


`


void` `
https://developer.android.com/reference/android/view/View#addOnUnhandledKeyEventListener(android.view.View.OnUnhandledKeyEventListener)(https://developer.android.com/reference/android/view/View.OnUnhandledKeyEventListener listener)
`

Adds a listener which will receive unhandled `https://developer.android.com/reference/android/view/KeyEvent`s.


`


void` `
https://developer.android.com/reference/android/view/View#addTouchables(java.util.ArrayList<android.view.View>)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> views)
`

Add any touchable views that are descendants of this view (possibly
including this view if it is touchable itself) to views.


`


https://developer.android.com/reference/android/view/ViewPropertyAnimator` `
https://developer.android.com/reference/android/view/View#animate()()
`

This method returns a ViewPropertyAnimator object, which can be used to animate
specific properties on this View.


`


void` `
https://developer.android.com/reference/android/view/View#announceForAccessibility(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence text)
`

*This method was deprecated
in API level 36.
Use one of the methods described in the documentation above to semantically
describe UI instead of using an announcement, as accessibility services may choose to
ignore events dispatched with this method.*


`


void` `
https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)(https://developer.android.com/reference/android/view/autofill/AutofillValue value)
`

Automatically fills the content of this view with the `value`.


`


void` `
https://developer.android.com/reference/android/view/View#autofill(android.util.SparseArray<android.view.autofill.AutofillValue>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/view/autofill/AutofillValue> values)
`

Automatically fills the content of the virtual children within this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#awakenScrollBars(int,%20boolean)(int startDelay, boolean invalidate)
`

<br />


Trigger the scrollbars to draw.


`


boolean` `
https://developer.android.com/reference/android/view/View#awakenScrollBars(int)(int startDelay)
`

<br />


Trigger the scrollbars to draw.


`


boolean` `
https://developer.android.com/reference/android/view/View#awakenScrollBars()()
`

<br />

Trigger the scrollbars to draw.


`


void` `
https://developer.android.com/reference/android/view/View#bringToFront()()
`

Change the view's z order in the tree, so it's on top of other sibling
views.


`


void` `
https://developer.android.com/reference/android/view/View#buildDrawingCache(boolean)(boolean autoScale)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#buildDrawingCache()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#buildLayer()()
`

Forces this view's layer to be created and this view to be rendered
into its layer.


`


boolean` `
https://developer.android.com/reference/android/view/View#callOnClick()()
`

Directly call any attached OnClickListener.


`


boolean` `
https://developer.android.com/reference/android/view/View#canResolveLayoutDirection()()
`

Check if layout direction resolution can be done.


`


boolean` `
https://developer.android.com/reference/android/view/View#canResolveTextAlignment()()
`

Check if text alignment resolution can be done.


`


boolean` `
https://developer.android.com/reference/android/view/View#canResolveTextDirection()()
`

Check if text direction resolution can be done.


`


boolean` `
https://developer.android.com/reference/android/view/View#canScrollHorizontally(int)(int direction)
`

Check if this view can be scrolled horizontally in a certain direction.


`


boolean` `
https://developer.android.com/reference/android/view/View#canScrollVertically(int)(int direction)
`

Check if this view can be scrolled vertically in a certain direction.


`


final

void` `
https://developer.android.com/reference/android/view/View#cancelDragAndDrop()()
`

Cancels an ongoing drag and drop operation.


`


void` `
https://developer.android.com/reference/android/view/View#cancelLongPress()()
`

Cancels a pending long press.


`


final

void` `
https://developer.android.com/reference/android/view/View#cancelPendingInputEvents()()
`

Cancel any deferred high-level input events that were previously posted to the event queue.


`


boolean` `
https://developer.android.com/reference/android/view/View#checkInputConnectionProxy(android.view.View)(https://developer.android.com/reference/android/view/View view)
`

Called by the `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager`
when a view who is not the current
input connection target is trying to make a call on the manager.


`


void` `
https://developer.android.com/reference/android/view/View#clearAnimation()()
`

Cancels any animations for this view.


`


void` `
https://developer.android.com/reference/android/view/View#clearFocus()()
`

Called when this view wants to give up focus.


`


void` `
https://developer.android.com/reference/android/view/View#clearPendingCredentialRequest()()
`

Clears the request and callback previously set
through `https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)`.


`


void` `
https://developer.android.com/reference/android/view/View#clearViewTranslationCallback()()
`

Clear the `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` from this view.


`


static


int` `
https://developer.android.com/reference/android/view/View#combineMeasuredStates(int,%20int)(int curState, int newState)
`

Merge two states as returned by `https://developer.android.com/reference/android/view/View#getMeasuredState()`.


`


int` `
https://developer.android.com/reference/android/view/View#computeHorizontalScrollExtent()()
`

<br />

Compute the horizontal extent of the horizontal scrollbar's thumb
within the horizontal range.


`


int` `
https://developer.android.com/reference/android/view/View#computeHorizontalScrollOffset()()
`

<br />

Compute the horizontal offset of the horizontal scrollbar's thumb
within the horizontal range.


`


int` `
https://developer.android.com/reference/android/view/View#computeHorizontalScrollRange()()
`

<br />

Compute the horizontal range that the horizontal scrollbar
represents.


`


void` `
https://developer.android.com/reference/android/view/View#computeScroll()()
`

Called by a parent to request that a child update its values for mScrollX
and mScrollY if necessary.


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#computeSystemWindowInsets(android.view.WindowInsets,%20android.graphics.Rect)(https://developer.android.com/reference/android/view/WindowInsets in, https://developer.android.com/reference/android/graphics/Rect outLocalInsets)
`

Compute insets that should be consumed by this view and the ones that should propagate
to those under it.


`


int` `
https://developer.android.com/reference/android/view/View#computeVerticalScrollExtent()()
`

<br />

Compute the vertical extent of the vertical scrollbar's thumb
within the vertical range.


`


int` `
https://developer.android.com/reference/android/view/View#computeVerticalScrollOffset()()
`

<br />

Compute the vertical offset of the vertical scrollbar's thumb
within the horizontal range.


`


int` `
https://developer.android.com/reference/android/view/View#computeVerticalScrollRange()()
`

<br />

Compute the vertical range that the vertical scrollbar represents.


`


https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` `
https://developer.android.com/reference/android/view/View#createAccessibilityNodeInfo()()
`

Returns an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` representing this view from the
point of view of an `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`.


`


void` `
https://developer.android.com/reference/android/view/View#createContextMenu(android.view.ContextMenu)(https://developer.android.com/reference/android/view/ContextMenu menu)
`

Show the context menu for this view.


`


void` `
https://developer.android.com/reference/android/view/View#destroyDrawingCache()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#dispatchApplyWindowInsets(android.view.WindowInsets)(https://developer.android.com/reference/android/view/WindowInsets insets)
`

Request to apply the given window insets to this view or another view in its subtree.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchCapturedPointerEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Pass a captured pointer event down to the focused view.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig)
`

Dispatch a notification about a resource configuration change down
the view hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchCreateViewTranslationRequest(java.util.Map<android.view.autofill.AutofillId,long[]>,%20int[],%20android.view.translation.TranslationCapability,%20java.util.List<android.view.translation.ViewTranslationRequest>)(https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/android/view/autofill/AutofillId, long[]> viewIds, int[] supportedFormats, https://developer.android.com/reference/android/view/translation/TranslationCapability capability, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requests)
`

Dispatch to collect the `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s for translation purpose by traversing
the hierarchy when the app requests ui translation.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchDisplayHint(int)(int hint)
`

Dispatch a hint about whether this view is displayed.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchDragEvent(android.view.DragEvent)(https://developer.android.com/reference/android/view/DragEvent event)
`

Detects if this View is enabled and has a drag event listener.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchDraw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Called by draw to draw the child views.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchDrawableHotspotChanged(float,%20float)(float x, float y)
`

Dispatches drawableHotspotChanged to all of this View's children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchFinishTemporaryDetach()()
`

Dispatch `https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()` to this View and its direct children if this is
a container View.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchGenericFocusedEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Dispatch a generic motion event to the currently focused view.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Dispatch a generic motion event.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchGenericPointerEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Dispatch a generic motion event to the view under the first pointer.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchHoverEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Dispatch a hover event.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchKeyEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event)
`

Dispatch a key event to the next view on the focus path.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchKeyEventPreIme(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event)
`

Dispatch a key event before it is processed by any input method
associated with the view hierarchy.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchKeyShortcutEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event)
`

Dispatches a key shortcut event.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchNestedFling(float,%20float,%20boolean)(float velocityX, float velocityY, boolean consumed)
`

Dispatch a fling to a nested scrolling parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchNestedPreFling(float,%20float)(float velocityX, float velocityY)
`

Dispatch a fling to a nested scrolling parent before it is processed by this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchNestedPrePerformAccessibilityAction(int,%20android.os.Bundle)(int action, https://developer.android.com/reference/android/os/Bundle arguments)
`

Report an accessibility action to this view's parents for delegated processing.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])(int dx, int dy, int[] consumed, int[] offsetInWindow)
`

Dispatch one step of a nested scroll in progress before this view consumes any portion of it.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchNestedScroll(int,%20int,%20int,%20int,%20int[])(int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed, int[] offsetInWindow)
`

Dispatch one step of a nested scroll in progress.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchPointerCaptureChanged(boolean)(boolean hasCapture)
` `


boolean` `
https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Dispatches an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` to the `https://developer.android.com/reference/android/view/View` to add the text content of the
view and its children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchProvideAutofillStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Dispatches creation of a `https://developer.android.com/reference/android/view/ViewStructure`s for autofill purposes down the hierarchy,
when an Assist structure is being created as part of an autofill request.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchProvideStructure(android.view.ViewStructure)(https://developer.android.com/reference/android/view/ViewStructure structure)
`

Dispatch creation of `https://developer.android.com/reference/android/view/ViewStructure` down the hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Called by `https://developer.android.com/reference/android/view/View#restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>)` to retrieve the
state for this view and its children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Called by `https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)` to store the state for
this view and its children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchScrollCaptureSearch(android.graphics.Rect,%20android.graphics.Point,%20java.util.function.Consumer<android.view.ScrollCaptureTarget>)(https://developer.android.com/reference/android/graphics/Rect localVisibleRect, https://developer.android.com/reference/android/graphics/Point windowOffset, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/ScrollCaptureTarget> targets)
`

Dispatch a scroll capture search request down the view hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchSetActivated(boolean)(boolean activated)
`

Dispatch setActivated to all of this View's children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchSetPressed(boolean)(boolean pressed)
`

Dispatch setPressed to all of this View's children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchSetSelected(boolean)(boolean selected)
`

Dispatch setSelected to all of this View's children.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchStartTemporaryDetach()()
`

Dispatch `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()` to this View and its direct children if this is
a container View.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchSystemUiVisibilityChanged(int)(int visibility)
`

*This method was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsets#isVisible(int)` to find out about system bar visibilities
by setting a `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` on this view.*


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Pass the touch screen motion event down to the target view, or this
view if it is the target.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Pass a trackball motion event down to the focused view.


`


boolean` `
https://developer.android.com/reference/android/view/View#dispatchUnhandledMove(android.view.View,%20int)(https://developer.android.com/reference/android/view/View focused, int direction)
`

This method is the last chance for the focused view and its ancestors to
respond to an arrow key.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchVisibilityChanged(android.view.View,%20int)(https://developer.android.com/reference/android/view/View changedView, int visibility)
`

Dispatch a view visibility change down the view hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchWindowFocusChanged(boolean)(boolean hasFocus)
`

Called when the window containing this view gains or loses window focus.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchWindowInsetsAnimationEnd(android.view.WindowInsetsAnimation)(https://developer.android.com/reference/android/view/WindowInsetsAnimation animation)
`

Dispatches `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onEnd(android.view.WindowInsetsAnimation)`
when Window Insets animation ends.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchWindowInsetsAnimationPrepare(android.view.WindowInsetsAnimation)(https://developer.android.com/reference/android/view/WindowInsetsAnimation animation)
`

Dispatches `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onPrepare(android.view.WindowInsetsAnimation)`
when Window Insets animation is being prepared.


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#dispatchWindowInsetsAnimationProgress(android.view.WindowInsets,%20java.util.List<android.view.WindowInsetsAnimation>)(https://developer.android.com/reference/android/view/WindowInsets insets, https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/view/WindowInsetsAnimation> runningAnimations)
`

Dispatches `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onProgress(android.view.WindowInsets,%20java.util.List<android.view.WindowInsetsAnimation>)`
when Window Insets animation makes progress.


`


https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds` `
https://developer.android.com/reference/android/view/View#dispatchWindowInsetsAnimationStart(android.view.WindowInsetsAnimation,%20android.view.WindowInsetsAnimation.Bounds)(https://developer.android.com/reference/android/view/WindowInsetsAnimation animation, https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds bounds)
`

Dispatches `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onStart(android.view.WindowInsetsAnimation,%20android.view.WindowInsetsAnimation.Bounds)`
when Window Insets animation is started.


`


void` `
https://developer.android.com/reference/android/view/View#dispatchWindowSystemUiVisiblityChanged(int)(int visible)
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


void` `
https://developer.android.com/reference/android/view/View#dispatchWindowVisibilityChanged(int)(int visibility)
`

Dispatch a window visibility change down the view hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Manually render this view (and all of its children) to the given Canvas.


`


void` `
https://developer.android.com/reference/android/view/View#drawableHotspotChanged(float,%20float)(float x, float y)
`

This function is called whenever the view hotspot changes and needs to
be propagated to drawables or child views managed by the view.


`


void` `
https://developer.android.com/reference/android/view/View#drawableStateChanged()()
`

This function is called whenever the state of the view changes in such
a way that it impacts the state of drawables being shown.


`


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#findFocus()()
`

Find the view in the hierarchy rooted at this view that currently has
focus.


`


final

https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` `
https://developer.android.com/reference/android/view/View#findOnBackInvokedDispatcher()()
`

Walk up the View hierarchy to find the nearest `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`.


`


final
<T extends https://developer.android.com/reference/android/view/View>
T` `
https://developer.android.com/reference/android/view/View#findViewById(int)(int id)
`

Finds the first descendant view with the given ID, the view itself if
the ID matches `https://developer.android.com/reference/android/view/View#getId()`, or `null` if the ID is invalid
(\< 0) or there is no matching view in the hierarchy.


`


final
<T extends https://developer.android.com/reference/android/view/View>
T` `
https://developer.android.com/reference/android/view/View#findViewWithTag(java.lang.Object)(https://developer.android.com/reference/java/lang/Object tag)
`

Look for a child view with the given tag.


`


void` `
https://developer.android.com/reference/android/view/View#findViewsWithText(java.util.ArrayList<android.view.View>,%20java.lang.CharSequence,%20int)(https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View> outViews, https://developer.android.com/reference/java/lang/CharSequence searched, int flags)
`

Finds the Views that contain given text.


`


boolean` `
https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect insets)
`

*This method was deprecated
in API level 20.
As of API 20 use `https://developer.android.com/reference/android/view/View#dispatchApplyWindowInsets(android.view.WindowInsets)` to apply
insets to views. Views should override `https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` or use
`https://developer.android.com/reference/android/view/View#setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener)`
to implement handling their own insets.*


`


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#focusSearch(int)(int direction)
`

Find the nearest view in the specified direction that can take focus.


`


void` `
https://developer.android.com/reference/android/view/View#forceHasOverlappingRendering(boolean)(boolean hasOverlappingRendering)
`

Sets the behavior for overlapping rendering for this view (see `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()` for more details on this behavior).


`


void` `
https://developer.android.com/reference/android/view/View#forceLayout()()
`

Forces this view to be laid out during the next layout pass.


`


boolean` `
https://developer.android.com/reference/android/view/View#gatherTransparentRegion(android.graphics.Region)(https://developer.android.com/reference/android/graphics/Region region)
`

This is used by the ViewRoot to perform an optimization when
the view hierarchy contains one or several SurfaceView.


`


void` `
https://developer.android.com/reference/android/view/View#generateDisplayHash(java.lang.String,%20android.graphics.Rect,%20java.util.concurrent.Executor,%20android.view.displayhash.DisplayHashResultCallback)(https://developer.android.com/reference/java/lang/String hashAlgorithm, https://developer.android.com/reference/android/graphics/Rect bounds, https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/view/displayhash/DisplayHashResultCallback callback)
`

Called to generate a `https://developer.android.com/reference/android/view/displayhash/DisplayHash` for this view.


`


static


int` `
https://developer.android.com/reference/android/view/View#generateViewId()()
`

Generate a value suitable for use in `https://developer.android.com/reference/android/view/View#setId(int)`.


`


https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getAccessibilityClassName()()
`

Return the class name of this object to be used for accessibility purposes.


`


https://developer.android.com/reference/android/view/View.AccessibilityDelegate` `
https://developer.android.com/reference/android/view/View#getAccessibilityDelegate()()
`

Returns the delegate for implementing accessibility support via
composition.


`


int` `
https://developer.android.com/reference/android/view/View#getAccessibilityLiveRegion()()
`

Gets the live region mode for this View.


`


https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeProvider` `
https://developer.android.com/reference/android/view/View#getAccessibilityNodeProvider()()
`

Gets the provider for managing a virtual view hierarchy rooted at this View
and reported to `https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s
that explore the window content.


`


https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getAccessibilityPaneTitle()()
`

Get the title of the pane for purposes of accessibility.


`


int` `
https://developer.android.com/reference/android/view/View#getAccessibilityTraversalAfter()()
`

Gets the id of a view after which this one is visited in accessibility traversal.


`


int` `
https://developer.android.com/reference/android/view/View#getAccessibilityTraversalBefore()()
`

Gets the id of a view before which this one is visited in accessibility traversal.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#getAllowedHandwritingDelegatePackageName()()
`

Returns the allowed package for delegate editor views for which this view may act as a
handwriting delegator, as set by `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatePackage(java.lang.String)`.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#getAllowedHandwritingDelegatorPackageName()()
`

Returns the allowed package for views which may act as a handwriting delegator for this
delegate editor view, as set by `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)`.


`


float` `
https://developer.android.com/reference/android/view/View#getAlpha()()
`

The opacity of the view.


`


https://developer.android.com/reference/android/view/animation/Animation` `
https://developer.android.com/reference/android/view/View#getAnimation()()
`

Get the animation currently associated with this view.


`


https://developer.android.com/reference/android/graphics/Matrix` `
https://developer.android.com/reference/android/view/View#getAnimationMatrix()()
`

Return the current transformation matrix of the view.


`


https://developer.android.com/reference/android/os/IBinder` `
https://developer.android.com/reference/android/view/View#getApplicationWindowToken()()
`

Retrieve a unique token identifying the top-level "real" window of
the window that this view is attached to.


`


int[]` `
https://developer.android.com/reference/android/view/View#getAttributeResolutionStack(int)(int attribute)
`

Returns the ordered list of resource ID that are considered when resolving attribute values
for this `https://developer.android.com/reference/android/view/View`.


`


https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/lang/Integer>` `
https://developer.android.com/reference/android/view/View#getAttributeSourceResourceMap()()
`

Returns the mapping of attribute resource ID to source resource ID where the attribute value
was set.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#getAutofillHints()()
`

Gets the hints that help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how
to autofill the view with the user's data.


`


final

https://developer.android.com/reference/android/view/autofill/AutofillId` `
https://developer.android.com/reference/android/view/View#getAutofillId()()
`

Gets the unique, logical identifier of this view in the activity, for autofill purposes.


`


int` `
https://developer.android.com/reference/android/view/View#getAutofillType()()
`

Describes the autofill type of this view, so an
`https://developer.android.com/reference/android/service/autofill/AutofillService` can create the proper `https://developer.android.com/reference/android/view/autofill/AutofillValue`
when autofilling the view.


`


https://developer.android.com/reference/android/view/autofill/AutofillValue` `
https://developer.android.com/reference/android/view/View#getAutofillValue()()
`

Gets the `https://developer.android.com/reference/android/view/View`'s current autofill value.


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getBackground()()
`

Gets the background drawable


`


https://developer.android.com/reference/android/graphics/BlendMode` `
https://developer.android.com/reference/android/view/View#getBackgroundTintBlendMode()()
`

Return the blending mode used to apply the tint to the background
drawable, if specified.


`


https://developer.android.com/reference/android/content/res/ColorStateList` `
https://developer.android.com/reference/android/view/View#getBackgroundTintList()()
`

Return the tint applied to the background drawable, if specified.


`


https://developer.android.com/reference/android/graphics/PorterDuff.Mode` `
https://developer.android.com/reference/android/view/View#getBackgroundTintMode()()
`

Return the blending mode used to apply the tint to the background
drawable, if specified.


`


int` `
https://developer.android.com/reference/android/view/View#getBaseline()()
`

<br />

Return the offset of the widget's text baseline from the widget's top
boundary.


`


final

int` `
https://developer.android.com/reference/android/view/View#getBottom()()
`

Bottom position of this view relative to its parent.


`


float` `
https://developer.android.com/reference/android/view/View#getBottomFadingEdgeStrength()()
`

Returns the strength, or intensity, of the bottom faded edge.


`


int` `
https://developer.android.com/reference/android/view/View#getBottomPaddingOffset()()
`

Amount by which to extend the bottom fading region.


`


float` `
https://developer.android.com/reference/android/view/View#getCameraDistance()()
`

Gets the distance along the Z axis from the camera to this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#getClipBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outRect)
`

Populates an output rectangle with the clip bounds of the view,
returning `true` if successful or `false` if the view's
clip bounds are `null`.


`


https://developer.android.com/reference/android/graphics/Rect` `
https://developer.android.com/reference/android/view/View#getClipBounds()()
`

Returns a copy of the current `https://developer.android.com/reference/android/view/View#setClipBounds(android.graphics.Rect)`.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getClipToOutline()()
`

Returns whether the Outline should be used to clip the contents of the View.


`


final

https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` `
https://developer.android.com/reference/android/view/View#getContentCaptureSession()()
`

Gets the session used to notify content capture events.


`


https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getContentDescription()()
`

Returns the `https://developer.android.com/reference/android/view/View`'s content description.


`


final

int` `
https://developer.android.com/reference/android/view/View#getContentSensitivity()()
`

Gets content sensitivity mode to determine whether this view displays sensitive content.


`


final

https://developer.android.com/reference/android/content/Context` `
https://developer.android.com/reference/android/view/View#getContext()()
`

Returns the context the view is running in, through which it can
access the current theme, resources, etc.


`


https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo` `
https://developer.android.com/reference/android/view/View#getContextMenuInfo()()
`

Views should implement this if they have extra information to associate
with the context menu.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getDefaultFocusHighlightEnabled()()
`

Returns whether this View should use a default focus highlight when it gets focused but
doesn't have `https://developer.android.com/reference/android/R.attr#state_focused` defined in its background.


`


static


int` `
https://developer.android.com/reference/android/view/View#getDefaultSize(int,%20int)(int size, int measureSpec)
`

Utility to return a default size.


`


https://developer.android.com/reference/android/view/Display` `
https://developer.android.com/reference/android/view/View#getDisplay()()
`

Gets the logical display to which the view's window has been attached.


`


final

int[]` `
https://developer.android.com/reference/android/view/View#getDrawableState()()
`

Return an array of resource IDs of the drawable states representing the
current state of the view.


`


https://developer.android.com/reference/android/graphics/Bitmap` `
https://developer.android.com/reference/android/view/View#getDrawingCache()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


https://developer.android.com/reference/android/graphics/Bitmap` `
https://developer.android.com/reference/android/view/View#getDrawingCache(boolean)(boolean autoScale)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


int` `
https://developer.android.com/reference/android/view/View#getDrawingCacheBackgroundColor()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


int` `
https://developer.android.com/reference/android/view/View#getDrawingCacheQuality()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#getDrawingRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outRect)
`

Return the visible drawing bounds of your view.


`


long` `
https://developer.android.com/reference/android/view/View#getDrawingTime()()
`

<br />

Return the time at which the drawing of the view hierarchy started.


`


float` `
https://developer.android.com/reference/android/view/View#getElevation()()
`

The base elevation of this view relative to its parent, in pixels.


`


int` `
https://developer.android.com/reference/android/view/View#getExplicitStyle()()
`

Returns the resource ID for the style specified using `style="..."` in the
`https://developer.android.com/reference/android/util/AttributeSet`'s backing XML element or `https://developer.android.com/reference/android/content/res/Resources#ID_NULL` otherwise if not
specified or otherwise not applicable.


`


boolean` `
https://developer.android.com/reference/android/view/View#getFilterTouchesWhenObscured()()
`

Gets whether the framework should discard touches when the view's
window is obscured by another visible window at the touched location.


`


boolean` `
https://developer.android.com/reference/android/view/View#getFitsSystemWindows()()
`

Check for state of `https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)`.


`


int` `
https://developer.android.com/reference/android/view/View#getFocusable()()
`

Returns the focusable setting for this view.


`


https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View>` `
https://developer.android.com/reference/android/view/View#getFocusables(int)(int direction)
`

Find and return all focusable views that are descendants of this view,
possibly including this view if it is focusable itself.


`


void` `
https://developer.android.com/reference/android/view/View#getFocusedRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect r)
`

When a view has focus and the user navigates away from it, the next view is searched for
starting from the rectangle filled in by this method.


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getForeground()()
`

Returns the drawable used as the foreground of this View.


`


int` `
https://developer.android.com/reference/android/view/View#getForegroundGravity()()
`

Describes how the foreground is positioned.


`


https://developer.android.com/reference/android/graphics/BlendMode` `
https://developer.android.com/reference/android/view/View#getForegroundTintBlendMode()()
`

Return the blending mode used to apply the tint to the foreground
drawable, if specified.


`


https://developer.android.com/reference/android/content/res/ColorStateList` `
https://developer.android.com/reference/android/view/View#getForegroundTintList()()
`

Return the tint applied to the foreground drawable, if specified.


`


https://developer.android.com/reference/android/graphics/PorterDuff.Mode` `
https://developer.android.com/reference/android/view/View#getForegroundTintMode()()
`

Return the blending mode used to apply the tint to the foreground
drawable, if specified.


`


float` `
https://developer.android.com/reference/android/view/View#getFrameContentVelocity()()
`

Get the current velocity of the View.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getGlobalVisibleRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect r)
`

Sets `r` to the coordinates of the non-clipped area of this view in
the coordinate space of the view's root view.


`


boolean` `
https://developer.android.com/reference/android/view/View#getGlobalVisibleRect(android.graphics.Rect,%20android.graphics.Point)(https://developer.android.com/reference/android/graphics/Rect r, https://developer.android.com/reference/android/graphics/Point globalOffset)
`

Sets `r` to the coordinates of the non-clipped area of this view in
the coordinate space of the view's root view.


`


https://developer.android.com/reference/android/os/Handler` `
https://developer.android.com/reference/android/view/View#getHandler()()
` `


float` `
https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetBottom()()
`

Return the amount of offset applied to the bottom edge of this view's handwriting bounds, in
the unit of pixel.


`


float` `
https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetLeft()()
`

Return the amount of offset applied to the left edge of this view's handwriting bounds,
in the unit of pixel.


`


float` `
https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetRight()()
`

Return the amount of offset applied to the right edge of this view's handwriting bounds, in
the unit of pixel.


`


float` `
https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetTop()()
`

Return the amount of offset applied to the top edge of this view's handwriting bounds,
in the unit of pixel.


`


int` `
https://developer.android.com/reference/android/view/View#getHandwritingDelegateFlags()()
`

Returns flags configuring the handwriting delegation behavior for this delegate editor view,
as set by `https://developer.android.com/reference/android/view/View#setHandwritingDelegateFlags(int)`.


`


https://developer.android.com/reference/java/lang/Runnable` `
https://developer.android.com/reference/android/view/View#getHandwritingDelegatorCallback()()
`

Returns the callback set by `https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)` which should be called
when a stylus `https://developer.android.com/reference/android/view/MotionEvent` occurs within this view's bounds.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getHasOverlappingRendering()()
`

Returns the value for overlapping rendering that is used internally.


`


final

int` `
https://developer.android.com/reference/android/view/View#getHeight()()
`

Return the height of your view.


`


void` `
https://developer.android.com/reference/android/view/View#getHitRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outRect)
`

Hit rectangle in parent's coordinates


`


int` `
https://developer.android.com/reference/android/view/View#getHorizontalFadingEdgeLength()()
`

Returns the size of the horizontal faded edges used to indicate that more
content in this view is visible.


`


int` `
https://developer.android.com/reference/android/view/View#getHorizontalScrollbarHeight()()
`

Returns the height of the horizontal scrollbar.


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getHorizontalScrollbarThumbDrawable()()
`

Returns the currently configured Drawable for the thumb of the horizontal scroll bar if it
exists, null otherwise.


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getHorizontalScrollbarTrackDrawable()()
`

Returns the currently configured Drawable for the track of the horizontal scroll bar if it
exists, null otherwise.


`


int` `
https://developer.android.com/reference/android/view/View#getId()()
`

Returns this view's identifier.


`


int` `
https://developer.android.com/reference/android/view/View#getImportantForAccessibility()()
`

Gets the mode for determining whether this View is important for accessibility.


`


int` `
https://developer.android.com/reference/android/view/View#getImportantForAutofill()()
`

Gets the mode for determining whether this view is important for autofill.


`


int` `
https://developer.android.com/reference/android/view/View#getImportantForContentCapture()()
`

Gets the mode for determining whether this view is important for content capture.


`


boolean` `
https://developer.android.com/reference/android/view/View#getKeepScreenOn()()
`

Returns whether the screen should remain on, corresponding to the current
value of `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`.


`


https://developer.android.com/reference/android/view/KeyEvent.DispatcherState` `
https://developer.android.com/reference/android/view/View#getKeyDispatcherState()()
`

Return the global `https://developer.android.com/reference/android/view/KeyEvent.DispatcherState`
for this view's window.


`


int` `
https://developer.android.com/reference/android/view/View#getLabelFor()()
`

Gets the id of a view for which this view serves as a label for
accessibility purposes.


`


int` `
https://developer.android.com/reference/android/view/View#getLayerType()()
`

Indicates what type of layer is currently associated with this view.


`


int` `
https://developer.android.com/reference/android/view/View#getLayoutDirection()()
`

Returns the resolved layout direction for this view.


`


https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` `
https://developer.android.com/reference/android/view/View#getLayoutParams()()
`

Get the LayoutParams associated with this view.


`


final

int` `
https://developer.android.com/reference/android/view/View#getLeft()()
`

Left position of this view relative to its parent.


`


float` `
https://developer.android.com/reference/android/view/View#getLeftFadingEdgeStrength()()
`

Returns the strength, or intensity, of the left faded edge.


`


int` `
https://developer.android.com/reference/android/view/View#getLeftPaddingOffset()()
`

Amount by which to extend the left fading region.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getLocalVisibleRect(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect r)
`

Sets `r` to the coordinates of the non-clipped area of this view
relative to the top left corner of the view.


`


void` `
https://developer.android.com/reference/android/view/View#getLocationInSurface(int[])(int[] location)
`

Gets the coordinates of this view in the coordinate space of the
`https://developer.android.com/reference/android/view/Surface` that contains the view.


`


void` `
https://developer.android.com/reference/android/view/View#getLocationInWindow(int[])(int[] outLocation)
`

Gets the coordinates of this view in the coordinate space of the window
that contains the view, irrespective of system decorations.


`


void` `
https://developer.android.com/reference/android/view/View#getLocationOnScreen(int[])(int[] outLocation)
`

Gets the coordinates of this view in the coordinate space of the device
screen, irrespective of system decorations and whether the system is in
multi-window mode.


`


https://developer.android.com/reference/android/graphics/Matrix` `
https://developer.android.com/reference/android/view/View#getMatrix()()
`

The transform matrix of this view, which is calculated based on the current
rotation, scale, and pivot properties.


`


final

int` `
https://developer.android.com/reference/android/view/View#getMeasuredHeight()()
`

Like `https://developer.android.com/reference/android/view/View#getMeasuredHeightAndState()`, but only returns the
raw height component (that is the result is masked by
`https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK`).


`


final

int` `
https://developer.android.com/reference/android/view/View#getMeasuredHeightAndState()()
`

Return the full height measurement information for this view as computed
by the most recent call to `https://developer.android.com/reference/android/view/View#measure(int,%20int)`.


`


final

int` `
https://developer.android.com/reference/android/view/View#getMeasuredState()()
`

Return only the state bits of `https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()`
and `https://developer.android.com/reference/android/view/View#getMeasuredHeightAndState()`, combined into one integer.


`


final

int` `
https://developer.android.com/reference/android/view/View#getMeasuredWidth()()
`

Like `https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()`, but only returns the
raw width component (that is the result is masked by
`https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK`).


`


final

int` `
https://developer.android.com/reference/android/view/View#getMeasuredWidthAndState()()
`

Return the full width measurement information for this view as computed
by the most recent call to `https://developer.android.com/reference/android/view/View#measure(int,%20int)`.


`


int` `
https://developer.android.com/reference/android/view/View#getMinimumHeight()()
`

Returns the minimum height of the view.


`


int` `
https://developer.android.com/reference/android/view/View#getMinimumWidth()()
`

Returns the minimum width of the view.


`


int` `
https://developer.android.com/reference/android/view/View#getNextClusterForwardId()()
`

Gets the id of the root of the next keyboard navigation cluster.


`


int` `
https://developer.android.com/reference/android/view/View#getNextFocusDownId()()
`

Gets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_DOWN`.


`


int` `
https://developer.android.com/reference/android/view/View#getNextFocusForwardId()()
`

Gets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD`.


`


int` `
https://developer.android.com/reference/android/view/View#getNextFocusLeftId()()
`

Gets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`.


`


int` `
https://developer.android.com/reference/android/view/View#getNextFocusRightId()()
`

Gets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT`.


`


int` `
https://developer.android.com/reference/android/view/View#getNextFocusUpId()()
`

Gets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_UP`.


`


https://developer.android.com/reference/android/view/View.OnFocusChangeListener` `
https://developer.android.com/reference/android/view/View#getOnFocusChangeListener()()
`

Returns the focus-change callback registered for this view.


`


int` `
https://developer.android.com/reference/android/view/View#getOutlineAmbientShadowColor()()
` `


https://developer.android.com/reference/android/view/ViewOutlineProvider` `
https://developer.android.com/reference/android/view/View#getOutlineProvider()()
`

Returns the current `https://developer.android.com/reference/android/view/ViewOutlineProvider` of the view, which generates the Outline
that defines the shape of the shadow it casts, and enables outline clipping.


`


int` `
https://developer.android.com/reference/android/view/View#getOutlineSpotShadowColor()()
` `


int` `
https://developer.android.com/reference/android/view/View#getOverScrollMode()()
`

Returns the over-scroll mode for this view.


`


https://developer.android.com/reference/android/view/ViewOverlay` `
https://developer.android.com/reference/android/view/View#getOverlay()()
`

Returns the overlay for this view, creating it if it does not yet exist.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingBottom()()
`

Returns the bottom padding of this view.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingEnd()()
`

Returns the end padding of this view depending on its resolved layout direction.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingLeft()()
`

Returns the left padding of this view.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingRight()()
`

Returns the right padding of this view.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingStart()()
`

Returns the start padding of this view depending on its resolved layout direction.


`


int` `
https://developer.android.com/reference/android/view/View#getPaddingTop()()
`

Returns the top padding of this view.


`


final

https://developer.android.com/reference/android/view/ViewParent` `
https://developer.android.com/reference/android/view/View#getParent()()
`

Gets the parent of this view.


`


https://developer.android.com/reference/android/view/ViewParent` `
https://developer.android.com/reference/android/view/View#getParentForAccessibility()()
`

Gets the parent for accessibility purposes.


`


final

https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/credentials/GetCredentialResponse, https://developer.android.com/reference/android/credentials/GetCredentialException>` `
https://developer.android.com/reference/android/view/View#getPendingCredentialCallback()()
`

Returns the callback that has previously been set up on this view through
the `https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)` API.


`


final

https://developer.android.com/reference/android/credentials/GetCredentialRequest` `
https://developer.android.com/reference/android/view/View#getPendingCredentialRequest()()
`

Returns the `https://developer.android.com/reference/android/credentials/GetCredentialRequest` associated with the view.


`


float` `
https://developer.android.com/reference/android/view/View#getPivotX()()
`

The x location of the point around which the view is `https://developer.android.com/reference/android/view/View#setRotation(float)`
and `https://developer.android.com/reference/android/view/View#setScaleX(float)`.


`


float` `
https://developer.android.com/reference/android/view/View#getPivotY()()
`

The y location of the point around which the view is `https://developer.android.com/reference/android/view/View#setRotation(float)`
and `https://developer.android.com/reference/android/view/View#setScaleY(float)`.


`


https://developer.android.com/reference/android/view/PointerIcon` `
https://developer.android.com/reference/android/view/View#getPointerIcon()()
`

Gets the mouse pointer icon for the current view.


`


final

https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` `
https://developer.android.com/reference/android/view/View#getPreferKeepClearRects()()
` `


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#getReceiveContentMimeTypes()()
`

Returns the MIME types accepted by `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for this view, as
configured via `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)`.


`


float` `
https://developer.android.com/reference/android/view/View#getRequestedFrameRate()()
`

Get the current preferred frame rate of the View.


`


https://developer.android.com/reference/android/content/res/Resources` `
https://developer.android.com/reference/android/view/View#getResources()()
`

Returns the resources associated with this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#getRevealOnFocusHint()()
`

Returns this view's preference for reveal behavior when it gains focus.


`


final

int` `
https://developer.android.com/reference/android/view/View#getRight()()
`

Right position of this view relative to its parent.


`


float` `
https://developer.android.com/reference/android/view/View#getRightFadingEdgeStrength()()
`

Returns the strength, or intensity, of the right faded edge.


`


int` `
https://developer.android.com/reference/android/view/View#getRightPaddingOffset()()
`

Amount by which to extend the right fading region.


`


https://developer.android.com/reference/android/view/AttachedSurfaceControl` `
https://developer.android.com/reference/android/view/View#getRootSurfaceControl()()
`

The AttachedSurfaceControl itself is not a View, it is just the interface to the
windowing-system object that contains the entire view hierarchy.


`


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#getRootView()()
`

<br />

Finds the topmost view in the current view hierarchy.


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#getRootWindowInsets()()
`

Provide original WindowInsets that are dispatched to the view hierarchy.


`


float` `
https://developer.android.com/reference/android/view/View#getRotation()()
`

The degrees that the view is rotated around the pivot point.


`


float` `
https://developer.android.com/reference/android/view/View#getRotationX()()
`

The degrees that the view is rotated around the horizontal axis through the pivot point.


`


float` `
https://developer.android.com/reference/android/view/View#getRotationY()()
`

The degrees that the view is rotated around the vertical axis through the pivot point.


`


float` `
https://developer.android.com/reference/android/view/View#getScaleX()()
`

The amount that the view is scaled in x around the pivot point, as a proportion of
the view's unscaled width.


`


float` `
https://developer.android.com/reference/android/view/View#getScaleY()()
`

The amount that the view is scaled in y around the pivot point, as a proportion of
the view's unscaled height.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollBarDefaultDelayBeforeFade()()
`

Returns the delay before scrollbars fade.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollBarFadeDuration()()
`

Returns the scrollbar fade duration.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollBarSize()()
`

Returns the scrollbar size.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollBarStyle()()
`

<br />

Returns the current scrollbar style.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollCaptureHint()()
`

Returns the current scroll capture hint for this view.


`


int` `
https://developer.android.com/reference/android/view/View#getScrollIndicators()()
`

Returns a bitmask representing the enabled scroll indicators.


`


final

int` `
https://developer.android.com/reference/android/view/View#getScrollX()()
`

Return the scrolled left position of this view.


`


final

int` `
https://developer.android.com/reference/android/view/View#getScrollY()()
`

Return the scrolled top position of this view.


`


int` `
https://developer.android.com/reference/android/view/View#getSolidColor()()
`

Override this if your view is known to always be drawn on top of a solid color background,
and needs to draw fading edges.


`


int` `
https://developer.android.com/reference/android/view/View#getSourceLayoutResId()()
`

A `https://developer.android.com/reference/android/view/View` can be inflated from an XML layout.


`


final

https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getStateDescription()()
`

Returns the `https://developer.android.com/reference/android/view/View`'s state description.


`


https://developer.android.com/reference/android/animation/StateListAnimator` `
https://developer.android.com/reference/android/view/View#getStateListAnimator()()
`

Returns the current StateListAnimator if exists.


`


int` `
https://developer.android.com/reference/android/view/View#getSuggestedMinimumHeight()()
`

Returns the suggested minimum height that the view should use.


`


int` `
https://developer.android.com/reference/android/view/View#getSuggestedMinimumWidth()()
`

Returns the suggested minimum width that the view should use.


`


https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getSupplementalDescription()()
`

Returns the `https://developer.android.com/reference/android/view/View`'s supplemental description.


`


https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` `
https://developer.android.com/reference/android/view/View#getSystemGestureExclusionRects()()
`

Retrieve the list of areas within this view's post-layout coordinate space where the system
should not intercept touch or other pointing device gestures.


`


int` `
https://developer.android.com/reference/android/view/View#getSystemUiVisibility()()
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/android/view/View#getTag()()
`

Returns this view's tag.


`


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/android/view/View#getTag(int)(int key)
`

Returns the tag associated with this view and the specified key.


`


int` `
https://developer.android.com/reference/android/view/View#getTextAlignment()()
`

Return the resolved text alignment.


`


int` `
https://developer.android.com/reference/android/view/View#getTextDirection()()
`

Return the resolved text direction.


`


https://developer.android.com/reference/java/lang/CharSequence` `
https://developer.android.com/reference/android/view/View#getTooltipText()()
`

Returns the view's tooltip text.


`


final

int` `
https://developer.android.com/reference/android/view/View#getTop()()
`

Top position of this view relative to its parent.


`


float` `
https://developer.android.com/reference/android/view/View#getTopFadingEdgeStrength()()
`

Returns the strength, or intensity, of the top faded edge.


`


int` `
https://developer.android.com/reference/android/view/View#getTopPaddingOffset()()
`

Amount by which to extend the top fading region.


`


https://developer.android.com/reference/android/view/TouchDelegate` `
https://developer.android.com/reference/android/view/View#getTouchDelegate()()
`

Gets the TouchDelegate for this View.


`


https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View>` `
https://developer.android.com/reference/android/view/View#getTouchables()()
`

Find and return all touchable views that are descendants of this view,
possibly including this view if it is touchable itself.


`


float` `
https://developer.android.com/reference/android/view/View#getTransitionAlpha()()
`

This property is intended only for use by the Fade transition, which animates
it to produce a visual translucency that does not side-effect (or get affected
by) the real alpha property.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#getTransitionName()()
`

Returns the name of the View to be used to identify Views in Transitions.


`


float` `
https://developer.android.com/reference/android/view/View#getTranslationX()()
`

The horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.


`


float` `
https://developer.android.com/reference/android/view/View#getTranslationY()()
`

The vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.


`


float` `
https://developer.android.com/reference/android/view/View#getTranslationZ()()
`

The depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.


`


long` `
https://developer.android.com/reference/android/view/View#getUniqueDrawingId()()
`

Get the identifier used for this view by the drawing system.


`


int` `
https://developer.android.com/reference/android/view/View#getVerticalFadingEdgeLength()()
`

Returns the size of the vertical faded edges used to indicate that more
content in this view is visible.


`


int` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarPosition()()
` `


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarThumbDrawable()()
`

Returns the currently configured Drawable for the thumb of the vertical scroll bar if it
exists, null otherwise.


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarTrackDrawable()()
`

Returns the currently configured Drawable for the track of the vertical scroll bar if it
exists, null otherwise.


`


int` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarWidth()()
`

Returns the width of the vertical scrollbar.


`


https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` `
https://developer.android.com/reference/android/view/View#getViewTranslationResponse()()
`

Returns the `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` associated with this view.


`


https://developer.android.com/reference/android/view/ViewTreeObserver` `
https://developer.android.com/reference/android/view/View#getViewTreeObserver()()
`

Returns the ViewTreeObserver for this view's hierarchy.


`


int` `
https://developer.android.com/reference/android/view/View#getVisibility()()
`

Returns the visibility status for this view.


`


final

int` `
https://developer.android.com/reference/android/view/View#getWidth()()
`

Return the width of your view.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowAttachCount()()
` `


https://developer.android.com/reference/android/view/WindowId` `
https://developer.android.com/reference/android/view/View#getWindowId()()
`

Retrieve the `https://developer.android.com/reference/android/view/WindowId` for the window this view is
currently attached to.


`


https://developer.android.com/reference/android/view/WindowInsetsController` `
https://developer.android.com/reference/android/view/View#getWindowInsetsController()()
`

Retrieves the single `https://developer.android.com/reference/android/view/WindowInsetsController` of the window this view is attached to.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowSystemUiVisibility()()
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


https://developer.android.com/reference/android/os/IBinder` `
https://developer.android.com/reference/android/view/View#getWindowToken()()
`

Retrieve a unique token identifying the window this view is attached to.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowVisibility()()
`

Returns the current visibility of the window this view is attached to
(either `https://developer.android.com/reference/android/view/View#GONE`, `https://developer.android.com/reference/android/view/View#INVISIBLE`, or `https://developer.android.com/reference/android/view/View#VISIBLE`).


`


void` `
https://developer.android.com/reference/android/view/View#getWindowVisibleDisplayFrame(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outRect)
`

Retrieve the overall visible display size in which the window this view is
attached to has been positioned in.


`


float` `
https://developer.android.com/reference/android/view/View#getX()()
`

The visual x position of this view, in pixels.


`


float` `
https://developer.android.com/reference/android/view/View#getY()()
`

The visual y position of this view, in pixels.


`


float` `
https://developer.android.com/reference/android/view/View#getZ()()
`

The visual z position of this view, in pixels.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasExplicitFocusable()()
`

Returns true if this view is focusable or if it contains a reachable View
for which `https://developer.android.com/reference/android/view/View#hasExplicitFocusable()` returns `true`.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasFocus()()
`

Returns true if this view has focus itself, or is the ancestor of the
view that has focus.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasFocusable()()
`

Returns true if this view is focusable or if it contains a reachable View
for which `https://developer.android.com/reference/android/view/View#hasFocusable()` returns `true`.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasNestedScrollingParent()()
`

Returns true if this view has a nested scrolling parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOnClickListeners()()
`

Return whether this view has an attached OnClickListener.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOnLongClickListeners()()
`

Return whether this view has an attached OnLongClickListener.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOverlappingRendering()()
`

Returns whether this View has content which overlaps.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasPointerCapture()()
`

Checks pointer capture status.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasTransientState()()
`

Indicates whether the view is currently tracking transient state that the
app should not need to concern itself with saving and restoring, but that
the framework should take special note to preserve when possible.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasWindowFocus()()
`

Returns true if this view is in a window that currently has window focus.


`


static


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#inflate(android.content.Context,%20int,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, int resource, https://developer.android.com/reference/android/view/ViewGroup root)
`

Inflate a view from an XML resource.


`


void` `
https://developer.android.com/reference/android/view/View#invalidate()()
`

Invalidate the whole view.


`


void` `
https://developer.android.com/reference/android/view/View#invalidate(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect dirty)
`

*This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call `https://developer.android.com/reference/android/view/View#invalidate()`.*


`


void` `
https://developer.android.com/reference/android/view/View#invalidate(int,%20int,%20int,%20int)(int l, int t, int r, int b)
`

*This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call `https://developer.android.com/reference/android/view/View#invalidate()`.*


`


void` `
https://developer.android.com/reference/android/view/View#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Invalidates the specified Drawable.


`


void` `
https://developer.android.com/reference/android/view/View#invalidateOutline()()
`

Called to rebuild this View's Outline from its `https://developer.android.com/reference/android/view/ViewOutlineProvider`


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityDataSensitive()()
`

Whether this view should restrict accessibility service access only to services that have the
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property
set to true.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityFocused()()
`

Returns whether this View is accessibility focused.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityHeading()()
`

Gets whether this view is a heading for accessibility purposes.


`


boolean` `
https://developer.android.com/reference/android/view/View#isActivated()()
`

Indicates the activation state of this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAttachedToWindow()()
`

Returns true if this view is currently attached to a window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAutoHandwritingEnabled()()
`

Return whether the View allows automatic handwriting initiation.


`


boolean` `
https://developer.android.com/reference/android/view/View#isClickable()()
`

Indicates whether this view reacts to click events or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isContentCaptureSelfReportingEnabled()()
`

Returns whether this View automatically reports its lifecycle events and layout bounds
to the Content Capture Version 2.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isContentSensitive()()
`

Returns whether this view displays sensitive content, based
on the value explicitly set by `https://developer.android.com/reference/android/view/View#setContentSensitivity(int)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isContextClickable()()
`

Indicates whether this view reacts to context clicks or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isCredential()()
`

*This method was deprecated
in API level 37.
The `https://developer.android.com/reference/android/view/View#isCredential()` is no longer used by the system and is not
recommended for use by apps. The purpose and usage expectations of this property were
never clearly defined.*


`


boolean` `
https://developer.android.com/reference/android/view/View#isDirty()()
`

True if this view has changed since the last time being drawn.


`


boolean` `
https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


boolean` `
https://developer.android.com/reference/android/view/View#isDuplicateParentStateEnabled()()
`

<br />

Indicates whether this duplicates its drawable state from its parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#isEnabled()()
`

Returns the enabled status for this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusable()()
`

Returns whether this View is currently able to take focus.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()()
`

When a view is focusable, it may not want to take focus when in touch mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#isFocused()()
`

Returns true if this view has focus


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusedByDefault()()
`

Returns whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isForceDarkAllowed()()
`

See `https://developer.android.com/reference/android/view/View#setForceDarkAllowed(boolean)`


`


boolean` `
https://developer.android.com/reference/android/view/View#isHandwritingDelegate()()
`

Returns whether this view has been set as a handwriting delegate by `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHapticFeedbackEnabled()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isHardwareAccelerated()()
`

<br />

Indicates whether this view is attached to a hardware accelerated
window or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHorizontalFadingEdgeEnabled()()
`

<br />

Indicate whether the horizontal edges are faded when the view is
scrolled horizontally.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()()
`

<br />

Indicate whether the horizontal scrollbar should be drawn or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHovered()()
`

Returns true if the view is currently hovered.


`


boolean` `
https://developer.android.com/reference/android/view/View#isImportantForAccessibility()()
`

Computes whether this view should be exposed for accessibility.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isImportantForAutofill()()
`

Hints the Android System whether the `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode`
associated with this view is considered important for autofill purposes.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isImportantForContentCapture()()
`

Hints the Android System whether this view is considered important for content capture, based
on the value explicitly set by `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)` and heuristics
when it's `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInEditMode()()
`

Indicates whether this View is currently in edit mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInLayout()()
`

Returns whether the view hierarchy is currently undergoing a layout pass.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInTouchMode()()
`

Returns the touch mode state associated with this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isKeyboardNavigationCluster()()
`

Returns whether this View is a root of a keyboard navigation cluster.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLaidOut()()
`

Returns true if this view has been through at least one layout since it
was last attached to or detached from a window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLayoutDirectionResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isLayoutRequested()()
`

<br />

Indicates whether or not this view's layout will be requested during
the next hierarchy layout pass.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLongClickable()()
`

Indicates whether this view reacts to long click events or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isNestedScrollingEnabled()()
`

Returns true if nested scrolling is enabled for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isOpaque()()
`

Indicates whether this View is opaque.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()()
`

If the View draws content inside its padding and enables fading edges,
it needs to support padding offsets.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPaddingRelative()()
`

Return if the padding has been set through relative values
`https://developer.android.com/reference/android/view/View#setPaddingRelative(int,%20int,%20int,%20int)` or through


`


boolean` `
https://developer.android.com/reference/android/view/View#isPivotSet()()
`

Returns whether or not a pivot has been set by a call to `https://developer.android.com/reference/android/view/View#setPivotX(float)` or
`https://developer.android.com/reference/android/view/View#setPivotY(float)`.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isPreferKeepClear()()
`

Retrieve the preference for this view to be kept clear.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPressed()()
`

Indicates whether the view is currently in pressed state.


`


boolean` `
https://developer.android.com/reference/android/view/View#isSaveEnabled()()
`

Indicates whether this view will save its state (that is,
whether its `https://developer.android.com/reference/android/view/View#onSaveInstanceState()` method will be called).


`


boolean` `
https://developer.android.com/reference/android/view/View#isSaveFromParentEnabled()()
`

Indicates whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScreenReaderFocusable()()
`

Returns whether the view should be treated as a focusable unit by screen reader
accessibility tools.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScrollContainer()()
`

Indicates whether this view is one of the set of scrollable containers in
its window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScrollbarFadingEnabled()()
`

Returns true if scrollbars will fade when this view is not scrolling


`


boolean` `
https://developer.android.com/reference/android/view/View#isSelected()()
`

Indicates the selection state of this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isShowingLayoutBounds()()
`

Returns `true` when the View is attached and the system developer setting to show
the layout bounds is enabled or `false` otherwise.


`


boolean` `
https://developer.android.com/reference/android/view/View#isShown()()
`

Returns the visibility of this view and all of its ancestors


`


boolean` `
https://developer.android.com/reference/android/view/View#isSoundEffectsEnabled()()
` `


final

boolean` `
https://developer.android.com/reference/android/view/View#isTemporarilyDetached()()
`

Tells whether the `https://developer.android.com/reference/android/view/View` is in the state between `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()`
and `https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isTextAlignmentResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isTextDirectionResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isVerticalFadingEdgeEnabled()()
`

<br />

Indicate whether the vertical edges are faded when the view is
scrolled horizontally.


`


boolean` `
https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()()
`

<br />

Indicate whether the vertical scrollbar should be drawn or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isVisibleToUserForAutofill(int)(int virtualId)
`

Computes whether this virtual autofill view is visible to the user.


`


void` `
https://developer.android.com/reference/android/view/View#jumpDrawablesToCurrentState()()
`

Call `https://developer.android.com/reference/android/graphics/drawable/Drawable#jumpToCurrentState()`
on all Drawable objects associated with this view.


`


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#keyboardNavigationClusterSearch(android.view.View,%20int)(https://developer.android.com/reference/android/view/View currentCluster, int direction)
`

Find the nearest keyboard navigation cluster in the specified direction.


`


void` `
https://developer.android.com/reference/android/view/View#layout(int,%20int,%20int,%20int)(int l, int t, int r, int b)
`

Assign a size and position to a view and all of its
descendants

This is the second phase of the layout mechanism.


`


final

void` `
https://developer.android.com/reference/android/view/View#measure(int,%20int)(int widthMeasureSpec, int heightMeasureSpec)
`

<br />


This is called to find out how big a view should be.


`


static


int[]` `
https://developer.android.com/reference/android/view/View#mergeDrawableStates(int[],%20int[])(int[] baseState, int[] additionalState)
`

Merge your own state values in <var translate="no">additionalState</var> into the base
state values <var translate="no">baseState</var> that were returned by
`https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)`.


`


void` `
https://developer.android.com/reference/android/view/View#offsetLeftAndRight(int)(int offset)
`

Offset this view's horizontal location by the specified amount of pixels.


`


void` `
https://developer.android.com/reference/android/view/View#offsetTopAndBottom(int)(int offset)
`

Offset this view's vertical location by the specified number of pixels.


`


void` `
https://developer.android.com/reference/android/view/View#onAnimationEnd()()
`

Invoked by a parent ViewGroup to notify the end of the animation
currently associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#onAnimationStart()()
`

Invoked by a parent ViewGroup to notify the start of the animation
currently associated with this view.


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)(https://developer.android.com/reference/android/view/WindowInsets insets)
`

Called when the view should apply `https://developer.android.com/reference/android/view/WindowInsets` according to its internal policy.


`


void` `
https://developer.android.com/reference/android/view/View#onAttachedToWindow()()
`

This is called when the view is attached to a window.


`


void` `
https://developer.android.com/reference/android/view/View#onCancelPendingInputEvents()()
`

Called as the result of a call to `https://developer.android.com/reference/android/view/View#cancelPendingInputEvents()` on this view or
a parent view.


`


boolean` `
https://developer.android.com/reference/android/view/View#onCapturedPointerEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle captured pointer events


`


boolean` `
https://developer.android.com/reference/android/view/View#onCheckIsTextEditor()()
`

Check whether the called view is a text editor, in which case it
would make sense to automatically display a soft input window for
it.


`


void` `
https://developer.android.com/reference/android/view/View#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig)
`

Called when the current configuration of the resources being used
by the application have changed.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateContextMenu(android.view.ContextMenu)(https://developer.android.com/reference/android/view/ContextMenu menu)
`

Views should implement this if the view itself is going to add items to
the context menu.


`


int[]` `
https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)(int extraSpace)
`

Generate the new `https://developer.android.com/reference/android/graphics/drawable/Drawable` state for
this view.


`


https://developer.android.com/reference/android/view/inputmethod/InputConnection` `
https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/EditorInfo outAttrs)
`

Create a new InputConnection for an InputMethod to interact
with the view.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)(int[] supportedFormats, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requestsCollector)
`

Collects a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` which represents the content to be translated in
the view.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateVirtualViewTranslationRequests(long[],%20int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)(long[] virtualIds, int[] supportedFormats, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requestsCollector)
`

Collects `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s which represents the content to be translated
for the virtual views in the host view.


`


void` `
https://developer.android.com/reference/android/view/View#onDetachedFromWindow()()
`

This is called when the view is detached from a window.


`


void` `
https://developer.android.com/reference/android/view/View#onDisplayHint(int)(int hint)
`

Gives this view a hint about whether is displayed or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)(https://developer.android.com/reference/android/view/DragEvent event)
`

Handles drag events sent by the system following a call to
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`.


`


void` `
https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Implement this to do your drawing.


`


void` `
https://developer.android.com/reference/android/view/View#onDrawForeground(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Draw any foreground content for this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#onDrawScrollBars(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

<br />

Request the drawing of the horizontal and the vertical scrollbar.


`


boolean` `
https://developer.android.com/reference/android/view/View#onFilterTouchEventForSecurity(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Filter the touch event to apply security policies.


`


void` `
https://developer.android.com/reference/android/view/View#onFinishInflate()()
`

Finalize inflating a view from XML.


`


void` `
https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()()
`

Called after `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()` when the container is done
changing the view.


`


void` `
https://developer.android.com/reference/android/view/View#onFocusChanged(boolean,%20int,%20android.graphics.Rect)(boolean gainFocus, int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect)
`

Called by the view system when the focus state of this view changes.


`


boolean` `
https://developer.android.com/reference/android/view/View#onGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle generic motion events.


`


void` `
https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)(boolean hovered)
`

Implement this method to handle hover state changes.


`


boolean` `
https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle hover events.


`


void` `
https://developer.android.com/reference/android/view/View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` with information about
this View which is the event source.


`


void` `
https://developer.android.com/reference/android/view/View#onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)(https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo info)
`

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` with information about this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)`: perform press of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER` or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
is released, if the view is enabled and clickable.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)`: always returns false (doesn't handle
the event).


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int repeatCount, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)`: always returns false (doesn't handle
the event).


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyPreIme(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Handle a key event before it is processed by any input method
associated with the view hierarchy.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyShortcut(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called on the focused view when a key shortcut event is not handled.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)`: perform clicking of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SPACE` is released.


`


void` `
https://developer.android.com/reference/android/view/View#onLayout(boolean,%20int,%20int,%20int,%20int)(boolean changed, int left, int top, int right, int bottom)
`

Called from layout when this view should
assign a size and position to each of its children.


`


void` `
https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)(int widthMeasureSpec, int heightMeasureSpec)
`

<br />


Measure the view and its content to determine the measured width and the
measured height.


`


void` `
https://developer.android.com/reference/android/view/View#onOverScrolled(int,%20int,%20boolean,%20boolean)(int scrollX, int scrollY, boolean clampedX, boolean clampedY)
`

Called by `https://developer.android.com/reference/android/view/View#overScrollBy(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20boolean)` to
respond to the results of an over-scroll operation.


`


void` `
https://developer.android.com/reference/android/view/View#onPointerCaptureChange(boolean)(boolean hasCapture)
`

Called when the window has just acquired or lost pointer capture.


`


void` `
https://developer.android.com/reference/android/view/View#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Called from `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`
giving a chance to this View to populate the accessibility event with its
text content.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` to fullfil an autofill request.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` containing virtual children to fullfil an autofill
request.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideContentCaptureNodeProperties(android.view.contentcapture.ContentCaptureNodeProperties)(https://developer.android.com/reference/android/view/contentcapture/ContentCaptureNodeProperties properties)
`

Populates the properties of this `https://developer.android.com/reference/android/view/View` for Content Capture version 2.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideContentCaptureStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` for content capture.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideStructure(android.view.ViewStructure)(https://developer.android.com/reference/android/view/ViewStructure structure)
`

Called when assist structure is being retrieved from a view as part of
`https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)`.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideVirtualStructure(android.view.ViewStructure)(https://developer.android.com/reference/android/view/ViewStructure structure)
`

Called when assist structure is being retrieved from a view as part of
`https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)` to
generate additional virtual structure under this view.


`


https://developer.android.com/reference/android/view/ContentInfo` `
https://developer.android.com/reference/android/view/View#onReceiveContent(android.view.ContentInfo)(https://developer.android.com/reference/android/view/ContentInfo payload)
`

Implements the default behavior for receiving content for this type of view.


`


https://developer.android.com/reference/android/view/PointerIcon` `
https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int)(https://developer.android.com/reference/android/view/MotionEvent event, int pointerIndex)
`

Resolve the pointer icon that should be used for specified pointer in the motion event.


`


void` `
https://developer.android.com/reference/android/view/View#onRestoreInstanceState(android.os.Parcelable)(https://developer.android.com/reference/android/os/Parcelable state)
`

Hook allowing a view to re-apply a representation of its internal state that had previously
been generated by `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`.


`


void` `
https://developer.android.com/reference/android/view/View#onRtlPropertiesChanged(int)(int layoutDirection)
`

Called when any RTL property (layout direction or text direction or text alignment) has
been changed.


`


https://developer.android.com/reference/android/os/Parcelable` `
https://developer.android.com/reference/android/view/View#onSaveInstanceState()()
`

Hook allowing a view to generate a representation of its internal state
that can later be used to create a new instance with that same state.


`


void` `
https://developer.android.com/reference/android/view/View#onScreenStateChanged(int)(int screenState)
`

This method is called whenever the state of the screen this view is
attached to changes.


`


void` `
https://developer.android.com/reference/android/view/View#onScrollCaptureSearch(android.graphics.Rect,%20android.graphics.Point,%20java.util.function.Consumer<android.view.ScrollCaptureTarget>)(https://developer.android.com/reference/android/graphics/Rect localVisibleRect, https://developer.android.com/reference/android/graphics/Point windowOffset, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/ScrollCaptureTarget> targets)
`

Called when scroll capture is requested, to search for appropriate content to scroll.


`


void` `
https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)(int l, int t, int oldl, int oldt)
`

This is called in response to an internal scroll in this view (i.e., the
view scrolled its own contents).


`


boolean` `
https://developer.android.com/reference/android/view/View#onSetAlpha(int)(int alpha)
`

Invoked if there is a Transform that involves alpha.


`


void` `
https://developer.android.com/reference/android/view/View#onSizeChanged(int,%20int,%20int,%20int)(int w, int h, int oldw, int oldh)
`

This is called during layout when the size of this view has changed.


`


void` `
https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()()
`

This is called when a container is going to temporarily detach a child, with
`https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle pointer events.


`


boolean` `
https://developer.android.com/reference/android/view/View#onTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle trackball motion events.


`


void` `
https://developer.android.com/reference/android/view/View#onViewTranslationResponse(android.view.translation.ViewTranslationResponse)(https://developer.android.com/reference/android/view/translation/ViewTranslationResponse response)
`

Called when the content from `https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` had been translated
by the TranslationService.


`


void` `
https://developer.android.com/reference/android/view/View#onVirtualViewTranslationResponses(android.util.LongSparseArray<android.view.translation.ViewTranslationResponse>)(https://developer.android.com/reference/android/util/LongSparseArray<https://developer.android.com/reference/android/view/translation/ViewTranslationResponse> response)
`

Called when the content from `https://developer.android.com/reference/android/view/View#onCreateVirtualViewTranslationRequests(long[],%20int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` had been
translated by the TranslationService.


`


void` `
https://developer.android.com/reference/android/view/View#onVisibilityAggregated(boolean)(boolean isVisible)
`

Called when the user-visibility of this View is potentially affected by a change
to this view itself, an ancestor view or the window this view is attached to.


`


void` `
https://developer.android.com/reference/android/view/View#onVisibilityChanged(android.view.View,%20int)(https://developer.android.com/reference/android/view/View changedView, int visibility)
`

Called when the visibility of the view or an ancestor of the view has
changed.


`


void` `
https://developer.android.com/reference/android/view/View#onWindowFocusChanged(boolean)(boolean hasWindowFocus)
`

Called when the window containing this view gains or loses focus.


`


void` `
https://developer.android.com/reference/android/view/View#onWindowSystemUiVisibilityChanged(int)(int visible)
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


void` `
https://developer.android.com/reference/android/view/View#onWindowVisibilityChanged(int)(int visibility)
`

Called when the window containing has change its visibility
(between `https://developer.android.com/reference/android/view/View#GONE`, `https://developer.android.com/reference/android/view/View#INVISIBLE`, and `https://developer.android.com/reference/android/view/View#VISIBLE`).


`


boolean` `
https://developer.android.com/reference/android/view/View#overScrollBy(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20boolean)(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent)
`

Scroll the view with standard behavior for scrolling beyond the normal
content boundaries.


`


boolean` `
https://developer.android.com/reference/android/view/View#performAccessibilityAction(int,%20android.os.Bundle)(int action, https://developer.android.com/reference/android/os/Bundle arguments)
`

Performs the specified accessibility action on the view.


`


boolean` `
https://developer.android.com/reference/android/view/View#performClick()()
`

Call this view's OnClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performContextClick(float,%20float)(float x, float y)
`

Call this view's OnContextClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performContextClick()()
`

Call this view's OnContextClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(int)(int feedbackConstant)
`

BZZZTT!!1!

Provide haptic feedback to the user for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(android.os.vibrator.HapticFeedbackRequest)(https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest request)
`

<br />

Like `https://developer.android.com/reference/android/view/View#performHapticFeedback(int,%20int)`, but takes a `https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest`.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(int,%20int)(int feedbackConstant, int flags)
`

BZZZTT!!1!

Like `https://developer.android.com/reference/android/view/View#performHapticFeedback(int)`, with additional options.


`


boolean` `
https://developer.android.com/reference/android/view/View#performLongClick(float,%20float)(float x, float y)
`

Calls this view's OnLongClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performLongClick()()
`

Calls this view's OnLongClickListener, if it is defined.


`


https://developer.android.com/reference/android/view/ContentInfo` `
https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)(https://developer.android.com/reference/android/view/ContentInfo payload)
`

Receives the given content.


`


void` `
https://developer.android.com/reference/android/view/View#playSoundEffect(int)(int soundConstant)
`

Play a sound effect for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Causes the Runnable to be added to the message queue.


`


boolean` `
https://developer.android.com/reference/android/view/View#postDelayed(java.lang.Runnable,%20long)(https://developer.android.com/reference/java/lang/Runnable action, long delayMillis)
`

<br />

Causes the Runnable to be added to the message queue, to be run
after the specified amount of time elapses.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidate()()
`

<br />

Cause an invalidate to happen on a subsequent cycle through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidate(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on a subsequent cycle
through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long,%20int,%20int,%20int,%20int)(long delayMilliseconds, int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on a subsequent cycle
through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long)(long delayMilliseconds)
`

<br />

Cause an invalidate to happen on a subsequent cycle through the event
loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateOnAnimation(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on the next animation
time step, typically the next display frame.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateOnAnimation()()
`

<br />

Cause an invalidate to happen on the next animation time step, typically the
next display frame.


`


void` `
https://developer.android.com/reference/android/view/View#postOnAnimation(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Causes the Runnable to execute on the next animation time step.


`


void` `
https://developer.android.com/reference/android/view/View#postOnAnimationDelayed(java.lang.Runnable,%20long)(https://developer.android.com/reference/java/lang/Runnable action, long delayMillis)
`

<br />

Causes the Runnable to execute on the next animation time step,
after the specified amount of time elapses.


`


void` `
https://developer.android.com/reference/android/view/View#refreshDrawableState()()
`

Call this to force a view to update its drawable state.


`


static


void` `
https://developer.android.com/reference/android/view/View#registerCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)(https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener listener)
`

Registers a listener that is notified when a View API is called from the wrong thread.


`


void` `
https://developer.android.com/reference/android/view/View#releasePointerCapture()()
`

Releases the pointer capture.


`


boolean` `
https://developer.android.com/reference/android/view/View#removeCallbacks(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Removes the specified Runnable from the message queue.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener)(https://developer.android.com/reference/android/view/View.OnAttachStateChangeListener listener)
`

Remove a listener for attach state changes.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener)(https://developer.android.com/reference/android/view/View.OnLayoutChangeListener listener)
`

Remove a listener for layout changes.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnUnhandledKeyEventListener(android.view.View.OnUnhandledKeyEventListener)(https://developer.android.com/reference/android/view/View.OnUnhandledKeyEventListener listener)
`

Removes a listener which will receive unhandled `https://developer.android.com/reference/android/view/KeyEvent`s.


`


void` `
https://developer.android.com/reference/android/view/View#reportAppJankStats(android.app.jank.AppJankStats)(https://developer.android.com/reference/android/app/jank/AppJankStats appJankStats)
`

Called from apps when they want to report jank stats to the system.


`


void` `
https://developer.android.com/reference/android/view/View#requestApplyInsets()()
`

Ask that a new dispatch of `https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` be performed.


`


void` `
https://developer.android.com/reference/android/view/View#requestFitSystemWindows()()
`

*This method was deprecated
in API level 20.
Use `https://developer.android.com/reference/android/view/View#requestApplyInsets()` for newer platform versions.*


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocus(int)(int direction)
`

Call this to try to give focus to a specific view or to one of its
descendants and give it a hint about what direction focus is heading.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocus()()
`

Call this to try to give focus to a specific view or to one of its
descendants.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestFocus(int,%20android.graphics.Rect)(int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect)
`

Call this to try to give focus to a specific view or to one of its descendants
and give it hints about the direction and a specific rectangle that the focus
is coming from.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocusFromTouch()()
`

Call this to try to give focus to a specific view or to one of its descendants.


`


void` `
https://developer.android.com/reference/android/view/View#requestLayout()()
`

Call this when something has changed which has invalidated the
layout of this view.


`


void` `
https://developer.android.com/reference/android/view/View#requestPointerCapture()()
`

Requests pointer capture in
relative mode.


`


void` `
https://developer.android.com/reference/android/view/View#requestPointerCapture(int)(int mode)
`

Requests pointer capture in the specified mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)(https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate, int source)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect rectangle)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean)(https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


final

void` `
https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(int)(int source)
`

Request unbuffered dispatch of the given event source class to this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Request unbuffered dispatch of the given stream of MotionEvents to this View.


`


final
<T extends https://developer.android.com/reference/android/view/View>
T` `
https://developer.android.com/reference/android/view/View#requireViewById(int)(int id)
`

Finds the first descendant view with the given ID, the view itself if the ID matches
`https://developer.android.com/reference/android/view/View#getId()`, or throws an IllegalArgumentException if the ID is invalid or there is no
matching view in the hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#resetPivot()()
`

Clears any pivot previously set by a call to `https://developer.android.com/reference/android/view/View#setPivotX(float)` or
`https://developer.android.com/reference/android/view/View#setPivotY(float)`.


`


static


int` `
https://developer.android.com/reference/android/view/View#resolveSize(int,%20int)(int size, int measureSpec)
`

Version of `https://developer.android.com/reference/android/view/View#resolveSizeAndState(int,%20int,%20int)`
returning only the `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` bits of the result.


`


static


int` `
https://developer.android.com/reference/android/view/View#resolveSizeAndState(int,%20int,%20int)(int size, int measureSpec, int childMeasuredState)
`

Utility to reconcile a desired size and state, with constraints imposed
by a MeasureSpec.


`


boolean` `
https://developer.android.com/reference/android/view/View#restoreDefaultFocus()()
`

Gives focus to the default-focus view in the view hierarchy that has this view as a root.


`


void` `
https://developer.android.com/reference/android/view/View#restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Restore this view hierarchy's frozen state from the given container.


`


final

void` `
https://developer.android.com/reference/android/view/View#saveAttributeDataForStyleable(android.content.Context,%20int[],%20android.util.AttributeSet,%20android.content.res.TypedArray,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, int[] styleable, https://developer.android.com/reference/android/util/AttributeSet attrs, https://developer.android.com/reference/android/content/res/TypedArray t, int defStyleAttr, int defStyleRes)
`

Stores debugging information about attributes.


`


void` `
https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Store this view hierarchy's frozen state into the given container.


`


void` `
https://developer.android.com/reference/android/view/View#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what, long when)
`

Schedules an action on a drawable to occur at a specified time.


`


void` `
https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)(int x, int y)
`

Move the scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)(int x, int y)
`

Set the scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)(int eventType)
`

Sends an accessibility event of the given type.


`


void` `
https://developer.android.com/reference/android/view/View#sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

This method behaves exactly as `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)` but
takes as an argument an empty `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and does not
perform a check whether accessibility is enabled.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityDataSensitive(int)(int accessibilityDataSensitive)
`

Specifies whether this view should only allow interactions from
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s with the
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property
set to true.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityDelegate(android.view.View.AccessibilityDelegate)(https://developer.android.com/reference/android/view/View.AccessibilityDelegate delegate)
`

Sets a delegate for implementing accessibility support via composition
(as opposed to inheritance).


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityHeading(boolean)(boolean isHeading)
`

Set if view is a heading for a section of content for accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityLiveRegion(int)(int mode)
`

Sets the live region mode for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence accessibilityPaneTitle)
`

Visually distinct portion of a window with window-like semantics are considered panes for
accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityTraversalAfter(int)(int afterId)
`

Sets the id of a view that screen readers are requested to visit before this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityTraversalBefore(int)(int beforeId)
`

Sets the id of a view that screen readers are requested to visit after this view.


`


void` `
https://developer.android.com/reference/android/view/View#setActivated(boolean)(boolean activated)
`

Changes the activated state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowClickWhenDisabled(boolean)(boolean clickableWhenDisabled)
`

Enables or disables click events for this view when disabled.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatePackage(java.lang.String)(https://developer.android.com/reference/java/lang/String allowedPackageName)
`

Specifies that this view may act as a handwriting initiation delegator for a delegate editor
view from the specified package.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)(https://developer.android.com/reference/java/lang/String allowedPackageName)
`

Specifies that a view from the specified package may act as a handwriting delegator for this
delegate editor view.


`


void` `
https://developer.android.com/reference/android/view/View#setAlpha(float)(float alpha)
`

Sets the opacity of the view to a value from 0 to 1, where 0 means the view is
completely transparent and 1 means the view is completely opaque.


`


void` `
https://developer.android.com/reference/android/view/View#setAnimation(android.view.animation.Animation)(https://developer.android.com/reference/android/view/animation/Animation animation)
`

Sets the next animation to play for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAnimationMatrix(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Changes the transformation matrix on the view.


`


void` `
https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)(boolean enabled)
`

Set whether this view enables automatic handwriting initiation.


`


void` `
https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])(https://developer.android.com/reference/java/lang/String autofillHints)
`

Sets the hints that help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how
to autofill the view with the user's data.


`


void` `
https://developer.android.com/reference/android/view/View#setAutofillId(android.view.autofill.AutofillId)(https://developer.android.com/reference/android/view/autofill/AutofillId id)
`

Sets the unique, logical identifier of this view in the activity, for autofill purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setBackdropRenderEffect(android.graphics.RenderEffect)(https://developer.android.com/reference/android/graphics/RenderEffect renderEffect)
`

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to the backdrop contents of this
View.


`


void` `
https://developer.android.com/reference/android/view/View#setBackground(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable background)
`

Set the background to a given Drawable, or remove the background.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundColor(int)(int color)
`

Sets the background color for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable background)
`

*This method was deprecated
in API level 16.
use `https://developer.android.com/reference/android/view/View#setBackground(android.graphics.drawable.Drawable)` instead*


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundResource(int)(int resid)
`

Set the background to a given resource.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode blendMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList tint)
`

Applies a tint to the background drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode tintMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


final

void` `
https://developer.android.com/reference/android/view/View#setBottom(int)(int bottom)
`

Sets the bottom position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setCameraDistance(float)(float distance)
`

<br />

Sets the distance along the Z axis (orthogonal to the X/Y plane on which
views are drawn) from the camera to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setClickable(boolean)(boolean clickable)
`

Enables or disables click events for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setClipBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect clipBounds)
`

Sets a rectangular area on this view to which the view will be clipped
when it is drawn.


`


void` `
https://developer.android.com/reference/android/view/View#setClipToOutline(boolean)(boolean clipToOutline)
`

Sets whether the View's Outline should be used to clip the contents of the View.


`


void` `
https://developer.android.com/reference/android/view/View#setContentCaptureSession(android.view.contentcapture.ContentCaptureSession)(https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession contentCaptureSession)
`

Sets the (optional) `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence contentDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s content description.


`


final

void` `
https://developer.android.com/reference/android/view/View#setContentSensitivity(int)(int mode)
`

Sets content sensitivity mode to determine whether this view displays sensitive content
(e.g. username, password etc.).


`


void` `
https://developer.android.com/reference/android/view/View#setContextClickable(boolean)(boolean contextClickable)
`

Enables or disables context clicking for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setDefaultFocusHighlightEnabled(boolean)(boolean defaultFocusHighlightEnabled)
`

Sets whether this View should use a default focus highlight when it gets focused but doesn't
have `https://developer.android.com/reference/android/R.attr#state_focused` defined in its background.


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheBackgroundColor(int)(int color)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)(boolean enabled)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheQuality(int)(int quality)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDuplicateParentStateEnabled(boolean)(boolean enabled)
`

<br />

Enables or disables the duplication of the parent's state into this view.


`


void` `
https://developer.android.com/reference/android/view/View#setElevation(float)(float elevation)
`

Sets the base elevation of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setEnabled(boolean)(boolean enabled)
`

Set the enabled state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setFadingEdgeLength(int)(int length)
`

Set the size of the faded edge used to indicate that more content in this
view is available.


`


void` `
https://developer.android.com/reference/android/view/View#setFilterTouchesWhenObscured(boolean)(boolean enabled)
`

Sets whether the framework should discard touches when the view's
window is obscured by another visible window at the touched location.


`


void` `
https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)(boolean fitSystemWindows)
`

Sets whether or not this view should account for system screen decorations
such as the status bar and inset its content; that is, controlling whether
the default implementation of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` will be
executed.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusable(boolean)(boolean focusable)
`

Set whether this view can receive the focus.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusable(int)(int focusable)
`

Sets whether this view can receive focus.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusableInTouchMode(boolean)(boolean focusableInTouchMode)
`

Set whether this view can receive focus while in touch mode.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusedByDefault(boolean)(boolean isFocusedByDefault)
`

Sets whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


`


void` `
https://developer.android.com/reference/android/view/View#setForceDarkAllowed(boolean)(boolean allow)
`

Sets whether or not to allow force dark to apply to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setForeground(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable foreground)
`

Supply a Drawable that is to be rendered on top of all of the content in the view.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundGravity(int)(int gravity)
`

Describes how the foreground is positioned.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode blendMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList tint)
`

Applies a tint to the foreground drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode tintMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setFrameContentVelocity(float)(float pixelsPerSecond)
`

Set the current velocity of the View, we only track positive value.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)(float offsetLeft, float offsetTop, float offsetRight, float offsetBottom)
`

Set the amount of offset applied to this view's stylus handwriting bounds.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingDelegateFlags(int)(int flags)
`

Sets flags configuring the handwriting delegation behavior for this delegate editor view.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable callback)
`

Sets a callback which should be called when a stylus `https://developer.android.com/reference/android/view/MotionEvent` occurs within this
view's bounds.


`


void` `
https://developer.android.com/reference/android/view/View#setHapticFeedbackEnabled(boolean)(boolean hapticFeedbackEnabled)
`

Set whether this view should have haptic feedback for events such as
long presses.


`


void` `
https://developer.android.com/reference/android/view/View#setHasTransientState(boolean)(boolean hasTransientState)
`

Set whether this view is currently tracking transient state that the
framework should attempt to preserve when possible.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalFadingEdgeEnabled(boolean)(boolean horizontalFadingEdgeEnabled)
`

<br />

Define whether the horizontal edges should be faded when this view
is scrolled horizontally.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)(boolean horizontalScrollBarEnabled)
`

<br />

Define whether the horizontal scrollbar should be drawn or not.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollbarThumbDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the horizontal thumb drawable


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollbarTrackDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the horizontal track drawable


`


void` `
https://developer.android.com/reference/android/view/View#setHovered(boolean)(boolean hovered)
`

Sets whether the view is currently hovered.


`


void` `
https://developer.android.com/reference/android/view/View#setId(int)(int id)
`

Sets the identifier for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForAccessibility(int)(int mode)
`

Sets how to determine whether this view is important for accessibility
which is if it fires accessibility events and if it is reported to
accessibility services that query the screen.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)(int mode)
`

Sets the mode for determining whether this view is considered important for autofill.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)(int mode)
`

Sets the mode for determining whether this view is considered important for content capture.


`


void` `
https://developer.android.com/reference/android/view/View#setIsCredential(boolean)(boolean isCredential)
`

*This method was deprecated
in API level 37.
The `https://developer.android.com/reference/android/view/View#isCredential()` is no longer used by the system and is not
recommended for use by apps. The purpose and usage expectations of this property were
never clearly defined.*


`


void` `
https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)(boolean isHandwritingDelegate)
`

Sets this view to be a handwriting delegate.


`


void` `
https://developer.android.com/reference/android/view/View#setKeepScreenOn(boolean)(boolean keepScreenOn)
`

Controls whether the screen should remain on, modifying the
value of `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`.


`


void` `
https://developer.android.com/reference/android/view/View#setKeyboardNavigationCluster(boolean)(boolean isCluster)
`

Set whether this view is a root of a keyboard navigation cluster.


`


void` `
https://developer.android.com/reference/android/view/View#setLabelFor(int)(int id)
`

Sets the id of a view for which this view serves as a label for
accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setLayerPaint(android.graphics.Paint)(https://developer.android.com/reference/android/graphics/Paint paint)
`

Updates the `https://developer.android.com/reference/android/graphics/Paint` object used with the current layer (used only if the current
layer type is not set to `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`).


`


void` `
https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)(int layerType, https://developer.android.com/reference/android/graphics/Paint paint)
`

<br />

Specifies the type of layer backing this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLayoutDirection(int)(int layoutDirection)
`

Set the layout direction for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLayoutParams(android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params)
`

Set the layout parameters associated with this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setLeft(int)(int left)
`

Sets the left position of this view relative to its parent.


`


final

void` `
https://developer.android.com/reference/android/view/View#setLeftTopRightBottom(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

Assign a size and position to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLongClickable(boolean)(boolean longClickable)
`

Enables or disables long click events for this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setMeasuredDimension(int,%20int)(int measuredWidth, int measuredHeight)
`

<br />

This method must be called by `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` to store the
measured width and measured height.


`


void` `
https://developer.android.com/reference/android/view/View#setMinimumHeight(int)(int minHeight)
`

Sets the minimum height of the view.


`


void` `
https://developer.android.com/reference/android/view/View#setMinimumWidth(int)(int minWidth)
`

Sets the minimum width of the view.


`


void` `
https://developer.android.com/reference/android/view/View#setNestedScrollingEnabled(boolean)(boolean enabled)
`

Enable or disable nested scrolling for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setNextClusterForwardId(int)(int nextClusterForwardId)
`

Sets the id of the view to use as the root of the next keyboard navigation cluster.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusDownId(int)(int nextFocusDownId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_DOWN`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusForwardId(int)(int nextFocusForwardId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusLeftId(int)(int nextFocusLeftId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusRightId(int)(int nextFocusRightId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusUpId(int)(int nextFocusUpId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_UP`.


`


void` `
https://developer.android.com/reference/android/view/View#setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener)(https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener listener)
`

Set an `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` to take over the policy for applying
window insets to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnCapturedPointerListener(android.view.View.OnCapturedPointerListener)(https://developer.android.com/reference/android/view/View.OnCapturedPointerListener l)
`

Set a listener to receive callbacks when the pointer capture state of a view changes.


`


void` `
https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)(https://developer.android.com/reference/android/view/View.OnClickListener l)
`

Register a callback to be invoked when this view is clicked.


`


void` `
https://developer.android.com/reference/android/view/View#setOnContextClickListener(android.view.View.OnContextClickListener)(https://developer.android.com/reference/android/view/View.OnContextClickListener l)
`

Register a callback to be invoked when this view is context clicked.


`


void` `
https://developer.android.com/reference/android/view/View#setOnCreateContextMenuListener(android.view.View.OnCreateContextMenuListener)(https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener l)
`

Register a callback to be invoked when the context menu for this view is
being built.


`


void` `
https://developer.android.com/reference/android/view/View#setOnDragListener(android.view.View.OnDragListener)(https://developer.android.com/reference/android/view/View.OnDragListener l)
`

Register a drag event listener callback object for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setOnFocusChangeListener(android.view.View.OnFocusChangeListener)(https://developer.android.com/reference/android/view/View.OnFocusChangeListener l)
`

Register a callback to be invoked when focus of this view changed.


`


void` `
https://developer.android.com/reference/android/view/View#setOnGenericMotionListener(android.view.View.OnGenericMotionListener)(https://developer.android.com/reference/android/view/View.OnGenericMotionListener l)
`

Register a callback to be invoked when a generic motion event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnHoverListener(android.view.View.OnHoverListener)(https://developer.android.com/reference/android/view/View.OnHoverListener l)
`

Register a callback to be invoked when a hover event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnKeyListener(android.view.View.OnKeyListener)(https://developer.android.com/reference/android/view/View.OnKeyListener l)
`

Register a callback to be invoked when a hardware key is pressed in this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)(https://developer.android.com/reference/android/view/View.OnLongClickListener l)
`

Register a callback to be invoked when this view is clicked and held.


`


void` `
https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)(https://developer.android.com/reference/java/lang/String mimeTypes, https://developer.android.com/reference/android/view/OnReceiveContentListener listener)
`

Sets the listener to be `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` to handle insertion of
content into this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnScrollChangeListener(android.view.View.OnScrollChangeListener)(https://developer.android.com/reference/android/view/View.OnScrollChangeListener l)
`

Register a callback to be invoked when the scroll X or Y positions of
this view change.


`


void` `
https://developer.android.com/reference/android/view/View#setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener)(https://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener l)
`

*This method was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsets#isVisible(int)` to find out about system bar visibilities
by setting a `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` on this view.*


`


void` `
https://developer.android.com/reference/android/view/View#setOnTouchListener(android.view.View.OnTouchListener)(https://developer.android.com/reference/android/view/View.OnTouchListener l)
`

Register a callback to be invoked when a touch event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineAmbientShadowColor(int)(int color)
`

Sets the color of the ambient shadow that is drawn when the view has a positive Z or
elevation value.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineProvider(android.view.ViewOutlineProvider)(https://developer.android.com/reference/android/view/ViewOutlineProvider provider)
`

Sets the `https://developer.android.com/reference/android/view/ViewOutlineProvider` of the view, which generates the Outline that defines
the shape of the shadow it casts, and enables outline clipping.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineSpotShadowColor(int)(int color)
`

Sets the color of the spot shadow that is drawn when the view has a positive Z or
elevation value.


`


void` `
https://developer.android.com/reference/android/view/View#setOverScrollMode(int)(int overScrollMode)
`

Set the over-scroll mode for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

Sets the padding.


`


void` `
https://developer.android.com/reference/android/view/View#setPaddingRelative(int,%20int,%20int,%20int)(int start, int top, int end, int bottom)
`

Sets the relative padding.


`


void` `
https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)(https://developer.android.com/reference/android/credentials/GetCredentialRequest request, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/credentials/GetCredentialResponse, https://developer.android.com/reference/android/credentials/GetCredentialException> callback)
`

Sets a `https://developer.android.com/reference/android/credentials/CredentialManager` request to retrieve credentials, when the user focuses
on this given view.


`


void` `
https://developer.android.com/reference/android/view/View#setPivotX(float)(float pivotX)
`

Sets the x location of the point around which the view is
`https://developer.android.com/reference/android/view/View#setRotation(float)` and `https://developer.android.com/reference/android/view/View#setScaleX(float)`.


`


void` `
https://developer.android.com/reference/android/view/View#setPivotY(float)(float pivotY)
`

Sets the y location of the point around which the view is `https://developer.android.com/reference/android/view/View#setRotation(float)`
and `https://developer.android.com/reference/android/view/View#setScaleY(float)`.


`


void` `
https://developer.android.com/reference/android/view/View#setPointerIcon(android.view.PointerIcon)(https://developer.android.com/reference/android/view/PointerIcon pointerIcon)
`

Set the pointer icon to be used for a mouse pointer in the current view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)(boolean preferKeepClear)
`

Set a preference to keep the bounds of this view clear from floating windows above this
view's window.


`


final

void` `
https://developer.android.com/reference/android/view/View#setPreferKeepClearRects(java.util.List<android.graphics.Rect>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects)
`

Set a preference to keep the provided rects clear from floating windows above this
view's window.


`


void` `
https://developer.android.com/reference/android/view/View#setPressed(boolean)(boolean pressed)
`

Sets the pressed state for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setRenderEffect(android.graphics.RenderEffect)(https://developer.android.com/reference/android/graphics/RenderEffect renderEffect)
`

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to this View.


`


void` `
https://developer.android.com/reference/android/view/View#setRequestedFrameRate(float)(float frameRate)
`

You can set the preferred frame rate for a View using a positive number
or by specifying the preferred frame rate category using constants, including
REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_LOW,
REQUESTED_FRAME_RATE_CATEGORY_NORMAL, REQUESTED_FRAME_RATE_CATEGORY_HIGH.


`


final

void` `
https://developer.android.com/reference/android/view/View#setRevealOnFocusHint(boolean)(boolean revealOnFocus)
`

Sets this view's preference for reveal behavior when it gains focus.


`


final

void` `
https://developer.android.com/reference/android/view/View#setRight(int)(int right)
`

Sets the right position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setRotation(float)(float rotation)
`

Sets the degrees that the view is rotated around the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setRotationX(float)(float rotationX)
`

Sets the degrees that the view is rotated around the horizontal axis through the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setRotationY(float)(float rotationY)
`

Sets the degrees that the view is rotated around the vertical axis through the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setSaveEnabled(boolean)(boolean enabled)
`

Controls whether the saving of this view's state is
enabled (that is, whether its `https://developer.android.com/reference/android/view/View#onSaveInstanceState()` method
will be called).


`


void` `
https://developer.android.com/reference/android/view/View#setSaveFromParentEnabled(boolean)(boolean enabled)
`

Controls whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setScaleX(float)(float scaleX)
`

Sets the amount that the view is scaled in x around the pivot point, as a proportion of
the view's unscaled width.


`


void` `
https://developer.android.com/reference/android/view/View#setScaleY(float)(float scaleY)
`

Sets the amount that the view is scaled in Y around the pivot point, as a proportion of
the view's unscaled width.


`


void` `
https://developer.android.com/reference/android/view/View#setScreenReaderFocusable(boolean)(boolean screenReaderFocusable)
`

Sets whether this View should be a focusable element for screen readers
and include non-focusable Views from its subtree when providing feedback.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarDefaultDelayBeforeFade(int)(int scrollBarDefaultDelayBeforeFade)
`

Define the delay before scrollbars fade.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarFadeDuration(int)(int scrollBarFadeDuration)
`

Define the scrollbar fade duration.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarSize(int)(int scrollBarSize)
`

Define the scrollbar size.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarStyle(int)(int style)
`

<br />

Specify the style of the scrollbars.


`


final

void` `
https://developer.android.com/reference/android/view/View#setScrollCaptureCallback(android.view.ScrollCaptureCallback)(https://developer.android.com/reference/android/view/ScrollCaptureCallback callback)
`

Sets the callback to receive scroll capture requests.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollCaptureHint(int)(int hint)
`

Sets the scroll capture hint for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollContainer(boolean)(boolean isScrollContainer)
`

Change whether this view is one of the set of scrollable containers in
its window.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)(int indicators, int mask)
`

Sets the state of the scroll indicators specified by the mask.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollIndicators(int)(int indicators)
`

Sets the state of all scroll indicators.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollX(int)(int value)
`

Set the horizontal scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollY(int)(int value)
`

Set the vertical scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollbarFadingEnabled(boolean)(boolean fadeScrollbars)
`

Define whether scrollbars will fade when the view is not scrolling.


`


void` `
https://developer.android.com/reference/android/view/View#setSelected(boolean)(boolean selected)
`

Changes the selection state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setSoundEffectsEnabled(boolean)(boolean soundEffectsEnabled)
`

Set whether this view should have sound effects enabled for events such as
clicking and touching.


`


void` `
https://developer.android.com/reference/android/view/View#setStateDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence stateDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s state description.


`


void` `
https://developer.android.com/reference/android/view/View#setStateListAnimator(android.animation.StateListAnimator)(https://developer.android.com/reference/android/animation/StateListAnimator stateListAnimator)
`

Attaches the provided StateListAnimator to this View.


`


void` `
https://developer.android.com/reference/android/view/View#setSupplementalDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence supplementalDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s supplemental description.


`


void` `
https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects)
`

Sets a list of areas within this view's post-layout coordinate space where the system
should not intercept touch or other pointing device gestures.


`


void` `
https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)(int visibility)
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


void` `
https://developer.android.com/reference/android/view/View#setTag(int,%20java.lang.Object)(int key, https://developer.android.com/reference/java/lang/Object tag)
`

Sets a tag associated with this view and a key.


`


void` `
https://developer.android.com/reference/android/view/View#setTag(java.lang.Object)(https://developer.android.com/reference/java/lang/Object tag)
`

Sets the tag associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#setTextAlignment(int)(int textAlignment)
`

Set the text alignment.


`


void` `
https://developer.android.com/reference/android/view/View#setTextDirection(int)(int textDirection)
`

Set the text direction.


`


void` `
https://developer.android.com/reference/android/view/View#setTooltipText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence tooltipText)
`

Sets the tooltip text which will be displayed in a small popup next to the view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setTop(int)(int top)
`

Sets the top position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setTouchDelegate(android.view.TouchDelegate)(https://developer.android.com/reference/android/view/TouchDelegate delegate)
`

Sets the TouchDelegate for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setTransitionAlpha(float)(float alpha)
`

This property is intended only for use by the Fade transition, which animates it
to produce a visual translucency that does not side-effect (or get affected by)
the real alpha property.


`


final

void` `
https://developer.android.com/reference/android/view/View#setTransitionName(java.lang.String)(https://developer.android.com/reference/java/lang/String transitionName)
`

Sets the name of the View to be used to identify Views in Transitions.


`


void` `
https://developer.android.com/reference/android/view/View#setTransitionVisibility(int)(int visibility)
`

Changes the visibility of this View without triggering any other changes.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationX(float)(float translationX)
`

Sets the horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationY(float)(float translationY)
`

Sets the vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationZ(float)(float translationZ)
`

Sets the depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalFadingEdgeEnabled(boolean)(boolean verticalFadingEdgeEnabled)
`

<br />

Define whether the vertical edges should be faded when this view
is scrolled vertically.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)(boolean verticalScrollBarEnabled)
`

<br />

Define whether the vertical scrollbar should be drawn or not.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarPosition(int)(int position)
`

Set the position of the vertical scroll bar.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarThumbDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the vertical scrollbar thumb drawable


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarTrackDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the vertical scrollbar track drawable


`


void` `
https://developer.android.com/reference/android/view/View#setViewTranslationCallback(android.view.translation.ViewTranslationCallback)(https://developer.android.com/reference/android/view/translation/ViewTranslationCallback callback)
`

Sets a `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` that is used to display/hide the translated
information.


`


void` `
https://developer.android.com/reference/android/view/View#setVisibility(int)(int visibility)
`

Set the visibility state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setWillNotCacheDrawing(boolean)(boolean willNotCacheDrawing)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setWillNotDraw(boolean)(boolean willNotDraw)
`

If this view doesn't do any drawing on its own, set this flag to
allow further optimizations.


`


void` `
https://developer.android.com/reference/android/view/View#setWindowInsetsAnimationCallback(android.view.WindowInsetsAnimation.Callback)(https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback callback)
`

Sets a `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback` to be notified about animations of windows that
cause insets.


`


void` `
https://developer.android.com/reference/android/view/View#setX(float)(float x)
`

Sets the visual x position of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setY(float)(float y)
`

Sets the visual y position of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setZ(float)(float z)
`

Sets the visual z position of this view, in pixels.


`


boolean` `
https://developer.android.com/reference/android/view/View#showContextMenu()()
`

Shows the context menu for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#showContextMenu(float,%20float)(float x, float y)
`

Shows the context menu for this view anchored to the specified
view-relative coordinate.


`


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/View#startActionMode(android.view.ActionMode.Callback,%20int)(https://developer.android.com/reference/android/view/ActionMode.Callback callback, int type)
`

Start an action mode with the given type.


`


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/View#startActionMode(android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/ActionMode.Callback callback)
`

Start an action mode with the default type `https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`.


`


void` `
https://developer.android.com/reference/android/view/View#startAnimation(android.view.animation.Animation)(https://developer.android.com/reference/android/view/animation/Animation animation)
`

Start the specified animation now.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#startDrag(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)(https://developer.android.com/reference/android/content/ClipData data, https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder, https://developer.android.com/reference/java/lang/Object myLocalState, int flags)
`

*This method was deprecated
in API level 24.
Use `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` for newer platform versions.*


`


final

boolean` `
https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)(https://developer.android.com/reference/android/content/ClipData data, https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder, https://developer.android.com/reference/java/lang/Object myLocalState, int flags)
`

Starts a drag and drop operation.


`


boolean` `
https://developer.android.com/reference/android/view/View#startNestedScroll(int)(int axes)
`

Begin a nestable scroll operation along the given axes.


`


void` `
https://developer.android.com/reference/android/view/View#stopNestedScroll()()
`

Stop a nested scroll in progress.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#toString()()
`

Returns a string representation of the object.


`


void` `
https://developer.android.com/reference/android/view/View#transformMatrixToGlobal(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Modifies the input matrix such that it maps view-local coordinates to
on-screen coordinates.


`


void` `
https://developer.android.com/reference/android/view/View#transformMatrixToLocal(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Modifies the input matrix such that it maps on-screen coordinates to
view-local coordinates.


`


static


void` `
https://developer.android.com/reference/android/view/View#unregisterCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)(https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener listener)
`

Unregisters a listener that was previously registered with
`https://developer.android.com/reference/android/view/View#registerCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)`.


`


void` `
https://developer.android.com/reference/android/view/View#unscheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what)
`

Cancels a scheduled action on a drawable.


`


void` `
https://developer.android.com/reference/android/view/View#unscheduleDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

Unschedule any events associated with the given Drawable.


`


final

void` `
https://developer.android.com/reference/android/view/View#updateDragShadow(android.view.View.DragShadowBuilder)(https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder)
`

Updates the drag shadow for the ongoing drag and drop operation.


`


boolean` `
https://developer.android.com/reference/android/view/View#verifyDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

If your view subclass is displaying its own Drawable objects, it should
override this function and return true for any Drawable it is
displaying.


`


boolean` `
https://developer.android.com/reference/android/view/View#willNotCacheDrawing()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


boolean` `
https://developer.android.com/reference/android/view/View#willNotDraw()()
`

Returns whether or not this View draws on its own.


From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource

` `
abstract


void` `
https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource#sendAccessibilityEvent(int)(int eventType)
`

Handles the request for sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` given
the event type.


`
abstract


void` `
https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource#sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Handles the request for sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`.


From interface `

https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback

` `
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

Called when the drawable needs to be redrawn.


`
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what, long when)
`

A Drawable can call this to schedule the next frame of its
animation.


`
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#unscheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what)
`

A Drawable can call this to unschedule an action previously
scheduled with `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)`.


From interface `

https://developer.android.com/reference/android/view/KeyEvent.Callback

` `
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a key down event has occurred.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a long press has occurred.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int count, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a user's interaction with an analog control, such as
flinging a trackball, generates simulated down/up events for the same
key multiple times in quick succession.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a key up event has occurred.


From interface `

https://developer.android.com/reference/android/view/ViewTreeObserver.OnPreDrawListener

` `
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewTreeObserver.OnPreDrawListener#onPreDraw()()
`

Callback method to be invoked when the view tree is about to be drawn.


## XML attributes

### android:allowUndo

Whether undo should be allowed for editable text. Defaults to true.

May be a boolean value, such as "`true`" or
"`false`".

<br />

### android:autoLink

Controls whether links such as urls and email addresses are
automatically found and converted to clickable links. The default
value is "none", disabling this feature.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| all | f | Match all patterns (equivalent to web\|email\|phone\|map). |
| email | 2 | Match email addresses. |
| map | 8 | Match map addresses. Deprecated: see `https://developer.android.com/reference/android/text/util/Linkify#MAP_ADDRESSES`. |
| none | 0 | Match no patterns (default). |
| phone | 4 | Match phone numbers. |
| web | 1 | Match Web URLs. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)`

### android:autoSizeMaxTextSize

The maximum text size constraint to be used when auto-sizing text.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`

### android:autoSizeMinTextSize

The minimum text size constraint to be used when auto-sizing text.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`

### android:autoSizePresetSizes

Resource array of dimensions to be used in conjunction with
`autoSizeTextType` set to `uniform`. Overrides
`autoSizeStepGranularity` if set.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

May be an integer value, such as "`100`".

May be a boolean value, such as "`true`" or
"`false`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

May be a floating point value, such as "`1.2`".

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

May be a fractional value, which is a floating point number appended with
either % or %p, such as "`14.5%`".
The % suffix always means a percentage of the base size;
the optional %p suffix provides a size relative to some parent container.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`

### android:autoSizeStepGranularity

Specify the auto-size step size if `autoSizeTextType` is set to
`uniform`. The default is 1px. Overwrites
`autoSizePresetSizes` if set.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`

### android:autoSizeTextType

Specify the type of auto-size. Note that this feature is not supported by EditText,
works only for TextView.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| none | 0 | No auto-sizing (default). |
| uniform | 1 | Uniform horizontal and vertical text size scaling to fit within the container. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeWithDefaults(int)`

### android:autoText


**This is deprecated.**   

Use inputType instead.

May be a boolean value, such as "`true`" or
"`false`".

If set, specifies that this TextView has a textual input method
and automatically corrects some common spelling errors.
The default is "false".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:breakStrategy

Break strategy (control over paragraph layout).

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| balanced | 2 | Line breaking strategy balances line lengths. |
| high_quality | 1 | Line breaking uses high-quality strategy, including hyphenation. |
| simple | 0 | Line breaking uses simple strategy. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setBreakStrategy(int)`

### android:bufferType

Determines the minimum type that getText() will return.
The default is "normal".
Note that EditText and LogTextBox always return Editable,
even if you specify something less powerful here.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| editable | 2 | Can only return Spannable and Editable. |
| normal | 0 | Can return any CharSequence, possibly a Spanned one if the source text was Spanned. |
| spannable | 1 | Can only return Spannable. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setText(int,%20android.widget.TextView.BufferType)`

### android:capitalize


**This is deprecated.**   

Use inputType instead.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| characters | 3 | Capitalize every character. |
| none | 0 | Don't automatically capitalize anything. |
| sentences | 1 | Capitalize the first word of each sentence. |
| words | 2 | Capitalize the first letter of every word. |

<br />

If set, specifies that this TextView has a textual input method
and should automatically capitalize what the user types.
The default is "none".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:cursorVisible

Makes the cursor visible (the default) or invisible.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCursorVisible(boolean)`

### android:digits

If set, specifies that this TextView has a numeric input method
and that these specific characters are the ones that it will
accept.
If this is set, numeric is implied to be true.
The default is false.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:drawableBottom

The drawable to be drawn below the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:drawableEnd

The drawable to be drawn to the end of the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:drawableLeft

The drawable to be drawn to the left of the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:drawablePadding

The padding between the drawables and the text.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablePadding(int)`

### android:drawableRight

The drawable to be drawn to the right of the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:drawableStart

The drawable to be drawn to the start of the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelativeWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:drawableTint

Tint to apply to the compound (left, top, etc.) drawables.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)`

### android:drawableTintMode

Blending mode used to apply the compound (left, top, etc.) drawables tint.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| add | 10 | Combines the tint and drawable color and alpha channels, clamping the result to valid color values. Saturate(S + D) |
| multiply | e | Multiplies the color and alpha channels of the drawable with those of the tint. \[Sa \* Da, Sc \* Dc\] |
| screen | f | \[Sa + Da - Sa \* Da, Sc + Dc - Sc \* Dc\] |
| src_atop | 9 | The tint is drawn above the drawable, but with the drawable\\u2019s alpha channel masking the result. \[Da, Sc \* Da + (1 - Sa) \* Dc\] |
| src_in | 5 | The tint is masked by the alpha channel of the drawable. The drawable\\u2019s color channels are thrown out. \[Sa \* Da, Sc \* Da\] |
| src_over | 3 | The tint is drawn on top of the drawable. \[Sa + (1 - Sa)\*Da, Rc = Sc + (1 - Sa)\*Dc\] |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintMode(android.graphics.PorterDuff.Mode)`

### android:drawableTop

The drawable to be drawn above the text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesWithIntrinsicBounds(int,%20int,%20int,%20int)`

### android:editable


**This is deprecated.**   

Use inputType instead.

May be a boolean value, such as "`true`" or
"`false`".

If set, specifies that this TextView has an input method.
It will be a textual one unless it has otherwise been specified.
For TextView, this is false by default. For EditText, it is
true by default.

<br />

### android:editorExtras

Reference to an
`https://developer.android.com/reference/android/R.styleable#InputExtras`
XML resource containing additional data to
supply to an input method, which is private to the implementation
of the input method. This simply fills in
the `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#extras` field when the input
method is connected.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setInputExtras(int)`

### android:elegantTextHeight

Elegant text height, especially for less compacted complex script text.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setElegantTextHeight(boolean)`

### android:ellipsize

If set, causes words that are longer than the view is wide
to be ellipsized instead of broken in the middle.
You will often also want to set scrollHorizontally or singleLine
as well so that the text as a whole is also constrained to
a single line instead of still allowed to be broken onto
multiple lines.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| end | 3 |   |
| marquee | 4 |   |
| middle | 2 |   |
| none | 0 |   |
| start | 1 |   |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setEllipsize(android.text.TextUtils.TruncateAt)`

### android:ems

Makes the TextView be exactly this many ems wide.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### android:enabled

Specifies whether the widget is enabled. The interpretation of the enabled state varies by subclass.
For example, a non-enabled EditText prevents the user from editing the contained text, and
a non-enabled Button prevents the user from tapping the button.
The appearance of enabled and non-enabled widgets may differ, if the drawables referenced
from evaluating state_enabled differ.

May be a boolean value, such as "`true`" or
"`false`".

<br />

### android:fallbackLineSpacing

Whether to respect the ascent and descent of the fallback fonts that are used in
displaying the text. When true, fallback fonts that end up getting used can increase
the ascent and descent of the lines that they are used on.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFallbackLineSpacing(boolean)`

### android:firstBaselineToTopHeight

Distance from the top of the TextView to the first text baseline. If set, this
overrides the value set for paddingTop.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)`

### android:focusedSearchResultHighlightColor

Color of focused search result highlight.
This color is typically used when TextView/EditText shows search result in-app text
search invoked with Ctrl+F.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`

### android:focusedSearchResultHighlightColor

Color of focused search result highlight.
This color is typically used when TextView/EditText shows search result in-app text
search invoked with Ctrl+F.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`

### android:fontFamily

Font family (named by string or as a font resource reference) for the text.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface)`

### android:fontFeatureSettings

Font feature settings.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String)`

### android:fontVariationSettings

Font variation settings.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFontVariationSettings(java.lang.String)`

### android:freezesText

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. By default this is disabled;
it can be useful when the contents of a text view is not stored
in a persistent place such as a content provider. For
`https://developer.android.com/reference/android/widget/EditText` it is always enabled, regardless
of the value of the attribute.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFreezesText(boolean)`

### android:gravity

Specifies how to align the text by the view's x- and/or y-axis
when the text is smaller than the view.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| bottom | 50 | Push object to the bottom of its container, not changing its size. |
| center | 11 | Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. |
| center_horizontal | 1 | Place object in the horizontal center of its container, not changing its size. |
| center_vertical | 10 | Place object in the vertical center of its container, not changing its size. |
| clip_horizontal | 8 | Additional option that can be set to have the left and/or right edges of the child clipped to its container's bounds. The clip will be based on the horizontal gravity: a left gravity will clip the right edge, a right gravity will clip the left edge, and neither will clip both edges. |
| clip_vertical | 80 | Additional option that can be set to have the top and/or bottom edges of the child clipped to its container's bounds. The clip will be based on the vertical gravity: a top gravity will clip the bottom edge, a bottom gravity will clip the top edge, and neither will clip both edges. |
| end | 800005 | Push object to the end of its container, not changing its size. |
| fill | 77 | Grow the horizontal and vertical size of the object if needed so it completely fills its container. |
| fill_horizontal | 7 | Grow the horizontal size of the object if needed so it completely fills its container. |
| fill_vertical | 70 | Grow the vertical size of the object if needed so it completely fills its container. |
| left | 3 | Push object to the left of its container, not changing its size. |
| right | 5 | Push object to the right of its container, not changing its size. |
| start | 800003 | Push object to the beginning of its container, not changing its size. |
| top | 30 | Push object to the top of its container, not changing its size. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setGravity(int)`

### android:height

Makes the TextView be exactly this tall.
You could get the same effect by specifying this number in the
layout parameters.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### android:hint

Hint text to display when the text is empty.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHint(int)`

### android:hyphenationFrequency

Frequency of automatic hyphenation.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| full | 2 | Standard amount of hyphenation, useful for running text and for screens with limited space for text. |
| fullFast | 4 | Same to hyphenationFrequency="full" but using faster algorithm for measuring hyphenation break points. To make text rendering faster with hyphenation, this algorithm ignores some hyphen character related typographic features, e.g. kerning. |
| none | 0 | No hyphenation. |
| normal | 1 | Less frequent hyphenation, useful for informal use cases, such as chat messages. |
| normalFast | 3 | Same to hyphenationFrequency="normal" but using faster algorithm for measuring hyphenation break points. To make text rendering faster with hyphenation, this algorithm ignores some hyphen character related typographic features, e.g. kerning. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHyphenationFrequency(int)`

### android:imeActionId

Supply a value for
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionId`
used when an input method is connected to the text view.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`

### android:imeActionLabel

Supply a value for
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionLabel`
used when an input method is connected to the text view.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`

### android:imeOptions

Additional features you can enable in an IME associated with an editor
to improve the integration with your application. The constants
here correspond to those defined by
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#imeOptions`.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| actionDone | 6 | The action key performs a "done" operation, closing the soft input method. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_DONE`. |
| actionGo | 2 | The action key performs a "go" operation to take the user to the target of the text they typed. Typically used, for example, when entering a URL. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_GO`. |
| actionNext | 5 | The action key performs a "next" operation, taking the user to the next field that will accept text. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_NEXT`. |
| actionNone | 1 | This editor has no action associated with it. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_NONE`. |
| actionPrevious | 7 | The action key performs a "previous" operation, taking the user to the previous field that will accept text. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_PREVIOUS`. |
| actionSearch | 3 | The action key performs a "search" operation, taking the user to the results of searching for the text the have typed (in whatever context is appropriate). Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_SEARCH`. |
| actionSend | 4 | The action key performs a "send" operation, delivering the text to its target. This is typically used when composing a message. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_SEND`. |
| actionUnspecified | 0 | There is no specific action associated with this editor, let the editor come up with its own if it can. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_NULL`. |
| flagForceAscii | 80000000 | Used to request that the IME should be capable of inputting ASCII characters. The intention of this flag is to ensure that the user can type Roman alphabet characters in a `https://developer.android.com/reference/android/widget/TextView` used for, typically, account ID or password input. It is expected that IMEs normally are able to input ASCII even without being told so (such IMEs already respect this flag in a sense), but there could be some cases they aren't when, for instance, only non-ASCII input languages like Arabic, Greek, Hebrew, Russian are enabled in the IME. Applications need to be aware that the flag is not a guarantee, and not all IMEs will respect it. However, it is strongly recommended for IME authors to respect this flag especially when their IME could end up with a state that has only non-ASCII input languages enabled. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_FORCE_ASCII`. |
| flagNavigateNext | 8000000 | Used to specify that there is something interesting that a forward navigation can focus on. This is like using actionNext, except allows the IME to be multiline (with an enter key) as well as provide forward navigation. Note that some IMEs may not be able to do this, especially when running on a small screen where there is little space. In that case it does not need to present a UI for this option. Like actionNext, if the user selects the IME's facility to forward navigate, this will show up in the application at `https://developer.android.com/reference/android/view/inputmethod/InputConnection#performEditorAction(int)`. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NAVIGATE_NEXT`. |
| flagNavigatePrevious | 4000000 | Like flagNavigateNext, but specifies there is something interesting that a backward navigation can focus on. If the user selects the IME's facility to backward navigate, this will show up in the application as an actionPrevious at `https://developer.android.com/reference/android/view/inputmethod/InputConnection#performEditorAction(int)`. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NAVIGATE_PREVIOUS`. |
| flagNoAccessoryAction | 20000000 | Used in conjunction with a custom action, this indicates that the action should not be available as an accessory button when the input method is full-screen. Note that by setting this flag, there can be cases where the action is simply never available to the user. Setting this generally means that you think showing text being edited is more important than the action you have supplied. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NO_ACCESSORY_ACTION`. |
| flagNoEnterAction | 40000000 | Used in conjunction with a custom action, this indicates that the action should not be available in-line as a replacement for the "enter" key. Typically this is because the action has such a significant impact or is not recoverable enough that accidentally hitting it should be avoided, such as sending a message. Note that `https://developer.android.com/reference/android/widget/TextView` will automatically set this flag for you on multi-line text views. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NO_ENTER_ACTION`. |
| flagNoExtractUi | 10000000 | Used to specify that the IME does not need to show its extracted text UI. For input methods that may be fullscreen, often when in landscape mode, this allows them to be smaller and let part of the application be shown behind. Though there will likely be limited access to the application available from the user, it can make the experience of a (mostly) fullscreen IME less jarring. Note that when this flag is specified the IME may *not* be set up to be able to display text, so it should only be used in situations where this is not needed. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NO_EXTRACT_UI`. |
| flagNoFullscreen | 2000000 | Used to request that the IME never go into fullscreen mode. Applications need to be aware that the flag is not a guarantee, and not all IMEs will respect it. Corresponds to `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_FLAG_NO_FULLSCREEN`. |
| flagNoPersonalizedLearning | 1000000 | Used to request that the IME should not update any personalized data such as typing history and personalized language model based on what the user typed on this text editing object. Typical use cases are: - When the application is in a special mode, where user's activities are expected to be not recorded in the application's history. Some web browsers and chat applications may have this kind of modes. - When storing typing history does not make much sense. Specifying this flag in typing games may help to avoid typing history from being filled up with words that the user is less likely to type in their daily life. Another example is that when the application already knows that the expected input is not a valid word (e.g. a promotion code that is not a valid word in any natural language). Applications need to be aware that the flag is not a guarantee, and some IMEs may not respect it. |
| normal | 0 | There are no special semantics associated with this editor. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setImeOptions(int)`

### android:includeFontPadding

Leave enough room for ascenders and descenders instead of
using the font ascent and descent strictly. (Normally true).

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setIncludeFontPadding(boolean)`

### android:inputMethod


**This is deprecated.**   

Use inputType instead.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

If set, specifies that this TextView should use the specified
input method (specified by fully-qualified class name).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:inputType

The type of data being placed in a text field, used to help an
input method decide how to let the user enter text. The constants
here correspond to those defined by
`https://developer.android.com/reference/android/text/InputType`. Generally you can select
a single value, though some can be combined together as
indicated. Setting this attribute to anything besides
<var translate="no">none</var> also implies that the text is editable.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| date | 14 | For entering a date. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_DATETIME` \| `https://developer.android.com/reference/android/text/InputType#TYPE_DATETIME_VARIATION_DATE`. |
| datetime | 4 | For entering a date and time. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_DATETIME` \| `https://developer.android.com/reference/android/text/InputType#TYPE_DATETIME_VARIATION_NORMAL`. |
| none | 0 | There is no content type. The text is not editable. |
| number | 2 | A numeric only field. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_NUMBER` \| `https://developer.android.com/reference/android/text/InputType#TYPE_NUMBER_VARIATION_NORMAL`. |
| numberDecimal | 2002 | Can be combined with <var translate="no">number</var> and its other options to allow a decimal (fractional) number. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_NUMBER` \| `https://developer.android.com/reference/android/text/InputType#TYPE_NUMBER_FLAG_DECIMAL`. |
| numberPassword | 12 | A numeric password field. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_NUMBER` \| `https://developer.android.com/reference/android/text/InputType#TYPE_NUMBER_VARIATION_PASSWORD`. |
| numberSigned | 1002 | Can be combined with <var translate="no">number</var> and its other options to allow a signed number. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_NUMBER` \| `https://developer.android.com/reference/android/text/InputType#TYPE_NUMBER_FLAG_SIGNED`. |
| phone | 3 | For entering a phone number. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_PHONE`. |
| text | 1 | Just plain old text. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_NORMAL`. |
| textAutoComplete | 10001 | Can be combined with <var translate="no">text</var> and its variations to specify that this field will be doing its own auto-completion and talking with the input method appropriately. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_AUTO_COMPLETE`. |
| textAutoCorrect | 8001 | Can be combined with <var translate="no">text</var> and its variations to request auto-correction of text being input. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_AUTO_CORRECT`. |
| textCapCharacters | 1001 | Can be combined with <var translate="no">text</var> and its variations to request capitalization of all characters. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_CAP_CHARACTERS`. |
| textCapSentences | 4001 | Can be combined with <var translate="no">text</var> and its variations to request capitalization of the first character of every sentence. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_CAP_SENTENCES`. |
| textCapWords | 2001 | Can be combined with <var translate="no">text</var> and its variations to request capitalization of the first character of every word. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_CAP_WORDS`. |
| textEmailAddress | 21 | Text that will be used as an e-mail address. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_EMAIL_ADDRESS`. |
| textEmailSubject | 31 | Text that is being supplied as the subject of an e-mail. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_EMAIL_SUBJECT`. |
| textEnableTextConversionSuggestions | 100001 | Can be combined with <var translate="no">text</var> and its variations to indicate that if there is extra information, the IME should provide `https://developer.android.com/reference/android/view/inputmethod/TextAttribute`. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_ENABLE_TEXT_CONVERSION_SUGGESTIONS`. |
| textEnableTextSuggestionSelected | 200000 | Can be combined with <var translate="no">text</var> and its variations to indicate that if there is extra information, the IME should provide `https://developer.android.com/reference/android/view/inputmethod/TextAttribute` with text suggestion selected information. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_ENABLE_TEXT_SUGGESTION_SELECTED`. |
| textFilter | b1 | Text that is filtering some other data. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_FILTER`. |
| textImeMultiLine | 40001 | Can be combined with <var translate="no">text</var> and its variations to indicate that though the regular text view should not be multiple lines, the IME should provide multiple lines if it can. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_IME_MULTI_LINE`. |
| textLongMessage | 51 | Text that is the content of a long message. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_LONG_MESSAGE`. |
| textMultiLine | 20001 | Can be combined with <var translate="no">text</var> and its variations to allow multiple lines of text in the field. If this flag is not set, the text field will be constrained to a single line. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_MULTI_LINE`. Note: If this flag is not set and the text field doesn't have max length limit, the framework automatically set maximum length of the characters to 5000 for the performance reasons. |
| textNoSuggestions | 80001 | Can be combined with <var translate="no">text</var> and its variations to indicate that the IME should not show any dictionary-based word suggestions. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_NO_SUGGESTIONS`. |
| textPassword | 81 | Text that is a password. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_PASSWORD`. |
| textPersonName | 61 | Text that is the name of a person. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_PERSON_NAME`. |
| textPhonetic | c1 | Text that is for phonetic pronunciation, such as a phonetic name field in a contact entry. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_PHONETIC`. |
| textPostalAddress | 71 | Text that is being supplied as a postal mailing address. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_POSTAL_ADDRESS`. |
| textShortMessage | 41 | Text that is the content of a short message. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_SHORT_MESSAGE`. |
| textUri | 11 | Text that will be used as a URI. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_URI`. |
| textVisiblePassword | 91 | Text that is a password that should be visible. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_VISIBLE_PASSWORD`. |
| textWebEditText | a1 | Text that is being supplied as text in a web form. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT`. |
| textWebEmailAddress | d1 | Text that will be used as an e-mail address on a web form. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS`. |
| textWebPassword | e1 | Text that will be used as a password on a web form. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT` \| `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_WEB_PASSWORD`. |
| time | 24 | For entering a time. Corresponds to `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_DATETIME` \| `https://developer.android.com/reference/android/text/InputType#TYPE_DATETIME_VARIATION_TIME`. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setRawInputType(int)`

### android:justificationMode

Mode for justification.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| inter_character | 2 | @FlaggedApi("com.android.text.flags.inter_character_justification") |
| inter_word | 1 | Justification by stretching word spacing. |
| none | 0 | No justification. |

<br />

<br />

### android:lastBaselineToBottomHeight

Distance from the bottom of the TextView to the last text baseline. If set, this
overrides the value set for paddingBottom.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)`

### android:letterSpacing

Text letter-spacing.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLetterSpacing(float)`

### android:lineBreakStyle

Specifies the line-break strategies for text wrapping.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| loose | 1 | The least restrictive line-break rules are used for line breaking. |
| none | 0 | No line-break rules are used for line breaking. |
| normal | 2 | The most common line-break rules are used for line breaking. |
| strict | 3 | The most strict line-break rules are used for line breaking. |

<br />

<br />

### android:lineBreakWordStyle

Specifies the line-break word strategies for text wrapping.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| none | 0 | No line-break word style is used for line breaking. |
| phrase | 1 | Line breaking is based on phrases, which results in text wrapping only on meaningful words. |

<br />

<br />

### android:lineHeight

Explicit height between lines of text. If set, this will override the values set
for lineSpacingExtra and lineSpacingMultiplier.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLineHeight(int)`

### android:lineSpacingExtra

Extra spacing between lines of text. The value will not be applied for the last
line of text.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`

### android:lineSpacingMultiplier

Extra spacing between lines of text, as a multiplier. The value will not be applied
for the last line of text.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`

### android:lines

Makes the TextView be exactly this many lines tall.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### android:linksClickable

If set to false, keeps the movement method from being set
to the link movement method even if autoLink causes links
to be found.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLinksClickable(boolean)`

### android:marqueeRepeatLimit

The number of times to repeat the marquee animation. Only applied if the
TextView has marquee enabled.

May be an integer value, such as "`100`".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| marquee_forever | ffffffff | Indicates that marquee should repeat indefinitely. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMarqueeRepeatLimit(int)`

### android:maxEms

Makes the TextView be at most this many ems wide.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)`

### android:maxHeight

Makes the TextView be at most this many pixels tall.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)`

### android:maxLength

Set an input filter to constrain the text length to the
specified number.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setFilters(android.text.InputFilter[])`

### android:maxLines

Makes the TextView be at most this many lines tall.
When used on an editable text, the `inputType` attribute's value must be
combined with the `textMultiLine` flag for the maxLines attribute to apply.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)`

### android:maxWidth

Makes the TextView be at most this many pixels wide.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)`

### android:minEms

Makes the TextView be at least this many ems wide.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMinEms(int)`

### android:minHeight

Makes the TextView be at least this many pixels tall.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)`

### android:minLines

Makes the TextView be at least this many lines tall.
When used on an editable text, the `inputType` attribute's value must be
combined with the `textMultiLine` flag for the minLines attribute to apply.

May be an integer value, such as "`100`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMinLines(int)`

### android:minWidth

Makes the TextView be at least this many pixels wide.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)`

### android:numeric


**This is deprecated.**   

Use inputType instead.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| decimal | 5 | Input is numeric, with decimals allowed. |
| integer | 1 | Input is numeric. |
| signed | 3 | Input is numeric, with sign allowed. |

<br />

If set, specifies that this TextView has a numeric input method.
The default is false.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:password


**This is deprecated.**   

Use inputType instead.

May be a boolean value, such as "`true`" or
"`false`".

Whether the characters of the field are displayed as
password dots instead of themselves.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTransformationMethod(android.text.method.TransformationMethod)`

### android:phoneNumber


**This is deprecated.**   

Use inputType instead.

May be a boolean value, such as "`true`" or
"`false`".

If set, specifies that this TextView has a phone number input
method. The default is false.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`

### android:privateImeOptions

An addition content type description to supply to the input
method attached to the text view, which is private to the
implementation of the input method. This simply fills in
the `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#privateImeOptions` field when the input
method is connected.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setPrivateImeOptions(java.lang.String)`

### android:scrollHorizontally

Whether the text is allowed to be wider than the view (and
therefore can be scrolled horizontally).

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHorizontallyScrolling(boolean)`

### android:searchResultHighlightColor

Color of search results highlight.
This color is typically used when TextView/EditText shows search result in-app text
search invoked with Ctrl+F.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`

### android:searchResultHighlightColor

Color of search results highlight.
This color is typically used when TextView/EditText shows search result in-app text
search invoked with Ctrl+F.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`

### android:selectAllOnFocus

If the text is selectable, select it all when the view takes
focus.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setSelectAllOnFocus(boolean)`

### android:shadowColor

Place a blurred shadow of text underneath the text, drawn with the
specified color. The text shadow produced does not interact with
properties on View that are responsible for real time shadows,
`https://developer.android.com/reference/android/R.styleable#View_elevation` and
`https://developer.android.com/reference/android/R.styleable#View_translationZ`.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### android:shadowDx

Horizontal offset of the text shadow.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### android:shadowDy

Vertical offset of the text shadow.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### android:shadowRadius

Blur radius of the text shadow.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### android:singleLine


**This is deprecated.**   

This attribute is deprecated. Use `maxLines` instead to change
the layout of a static text, and use the `textMultiLine` flag in the
inputType attribute instead for editable text views (if both singleLine and inputType
are supplied, the inputType flags will override the value of singleLine).

May be a boolean value, such as "`true`" or
"`false`".

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.
The default value is false (multi-line wrapped text mode) for non-editable text, but if
you specify any value for inputType, the default is true (single-line input field mode).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTransformationMethod(android.text.method.TransformationMethod)`

### android:text

Text to display.

May be a string value, using '\\\\;' to escape characters such as
'\\\\n' or '\\\\uxxxx' for a unicode character;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setText(int,%20android.widget.TextView.BufferType)`

### android:textAllCaps

Present the text in ALL CAPS. This may use a small-caps form when available.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setAllCaps(boolean)`

### android:textAppearance

Base text color, typeface, size, and style.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextAppearance(int)`

### android:textColor

Text color.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`

### android:textColorHighlight

Color of the text selection highlight.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHighlightColor(int)`

### android:textColorHint

Color of the hint text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(int)`

### android:textColorLink

Text color for links.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(int)`

### android:textCursorDrawable

Reference to a drawable that will be drawn under the insertion cursor.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(int)`

### android:textFontWeight

Weight for the font used in the TextView.

May be an integer value, such as "`100`".

<br />

### android:textIsSelectable

Indicates that the content of a non-editable text can be selected.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#isTextSelectable()`

### android:textScaleX

Sets the horizontal scaling factor for the text.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextScaleX(float)`

### android:textSelectHandle

Reference to a drawable that will be used to display a text selection
anchor for positioning the cursor within text.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(android.graphics.drawable.Drawable)`

### android:textSelectHandleLeft

Reference to a drawable that will be used to display a text selection
anchor on the left side of a selection region.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(android.graphics.drawable.Drawable)`

### android:textSelectHandleRight

Reference to a drawable that will be used to display a text selection
anchor on the right side of a selection region.

May be a reference to another resource, in the form
"`@[+][*package*:]*type*/*name*`" or a theme
attribute in the form
"`?[*package*:]*type*/*name*`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(int)`

### android:textSize

Size of the text. Recommended dimension type for text is "sp" for scaled-pixels (example: 15sp).

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSize(float)`

### android:textStyle

Style (normal, bold, italic, bold\|italic) for the text.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| bold | 1 |   |
| italic | 2 |   |
| normal | 0 |   |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface,%20int)`

### android:typeface

Typeface (normal, sans, serif, monospace) for the text.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| monospace | 3 |   |
| normal | 0 |   |
| sans | 1 |   |
| serif | 2 |   |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface,%20int)`

### android:width

Makes the TextView be exactly this wide.
You could get the same effect by specifying this number in the
layout parameters.

May be a dimension value, which is a floating point number appended with a
unit such as "`14.5sp`".
Available units are: px (pixels), dp (density-independent pixels),
sp (scaled pixels based on preferred font size), in (inches), and
mm (millimeters).

<br />

**Related methods:**

- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

## Constants

### AUTO_SIZE_TEXT_TYPE_NONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUTO_SIZE_TEXT_TYPE_NONE
```

The TextView does not auto-size text (default).

<br />

Constant Value:

0
(0x00000000)


### AUTO_SIZE_TEXT_TYPE_UNIFORM

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUTO_SIZE_TEXT_TYPE_UNIFORM
```

The TextView scales text size both horizontally and vertically to fit within the
container.

<br />

Constant Value:

1
(0x00000001)


### FOCUSED_SEARCH_RESULT_INDEX_NONE

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUSED_SEARCH_RESULT_INDEX_NONE
```

A special index used for `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)` and
`https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()` inidicating there is no focused search result.

<br />

Constant Value:

-1
(0xffffffff)


## Public constructors

### TextView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextView (Context context)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |

### TextView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextView (Context context, 
                AttributeSet attrs)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet`: This value may be `null`. <br /> |

### TextView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextView (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet`: This value may be `null`. <br /> |
| `defStyleAttr` | `int` <br /> |

### TextView

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextView (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet`: This value may be `null`. <br /> |
| `defStyleAttr` | `int` <br /> |
| `defStyleRes` | `int` <br /> |

## Public methods

### addExtraDataToAccessibilityNodeInfo

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addExtraDataToAccessibilityNodeInfo (AccessibilityNodeInfo info, 
                String extraDataKey, 
                Bundle arguments)
```

Adds extra data to an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` based on an explicit request for the
additional data.


This method only needs overloading if the node is marked as having extra data available.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

| Parameters ||
|---|---|
| `info` | `AccessibilityNodeInfo`: The info to which to add the extra data. Never `null`. <br /> |
| `extraDataKey` | `String`: A key specifying the type of extra data to add to the info. The extra data should be added to the `https://developer.android.com/reference/android/os/Bundle` returned by the info's `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getExtras()` method. Never `null`. <br /> |
| `arguments` | `Bundle`: A `https://developer.android.com/reference/android/os/Bundle` holding any arguments relevant for this request. May be `null` if the service provided no arguments. <br /> |

### addTextChangedListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addTextChangedListener (TextWatcher watcher)
```

Adds a TextWatcher to the list of those whose methods are called
whenever this TextView's text changes.


In 1.0, the `https://developer.android.com/reference/android/text/TextWatcher#afterTextChanged(android.text.Editable)` method was erroneously
not called after `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)` calls. Now, doing `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)`
if there are any text changed listeners forces the buffer type to
Editable if it would not otherwise be and does call this method.

<br />

| Parameters ||
|---|---|
| `watcher` | `TextWatcher` <br /> |

### append

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void append (CharSequence text)
```

Convenience method to append the specified text to the TextView's
display buffer, upgrading it to `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE`
if it was not already editable.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be appended to the already displayed text <br /> |

### append

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void append (CharSequence text, 
                int start, 
                int end)
```

Convenience method to append the specified text slice to the TextView's
display buffer, upgrading it to `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE`
if it was not already editable.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be appended to the already displayed text <br /> |
| `start` | `int`: the index of the first character in the `text` <br /> |
| `end` | `int`: the index of the character following the last character in the `text` <br /> |

**See also:**

- `https://developer.android.com/reference/java/lang/Appendable#append(java.lang.CharSequence,%20int,%20int)`

### autofill

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void autofill (AutofillValue value)
```

Automatically fills the content of this view with the `value`.

Views support the Autofill Framework mainly by:

- Providing the metadata defining what the view means and how it can be autofilled.
- Implementing the methods that autofill the view.

`https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)` is responsible for the former,
this method is responsible for latter.

This method does nothing by default, but when overridden it typically:

1. Checks if the provided value matches the expected type (which is defined by `https://developer.android.com/reference/android/view/View#getAutofillType()`).
2. Checks if the view is editable - if it isn't, it should return right away.
3. Call the proper getter method on `https://developer.android.com/reference/android/view/autofill/AutofillValue` to fetch the actual value.
4. Pass the actual value to the equivalent setter in the view.

For example, a text-field view could implement the method this way:

```
@Override
public void autofill(AutofillValue value) {
  if (!value.isText() || !this.isEditable()) {
     return;
  }
  CharSequence text = value.getTextValue();
  if (text != null) {
    this.setText(text);
  }
}
```

If the value is updated asynchronously, the next call to
`https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyValueChanged(android.view.View)` must happen **after** the value was
changed to the autofilled value. If not, the view will not be considered autofilled.

**Note:** After this method is called, the value returned by
`https://developer.android.com/reference/android/view/View#getAutofillValue()` must be equal to the `value` passed to it, otherwise the
view will not be highlighted as autofilled.

<br />

| Parameters ||
|---|---|
| `value` | `AutofillValue`: value to be autofilled. <br /> |

### beginBatchEdit

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void beginBatchEdit ()
```

<br />

<br />

### bringPointIntoView

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean bringPointIntoView (int offset)
```

Move the point, specified by the offset, into the view if it is needed.
This has to be called after layout. Returns true if anything changed.

<br />

| Parameters ||
|---|---|
| `offset` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### bringPointIntoView

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean bringPointIntoView (int offset, 
                boolean requestRectWithoutFocus)
```

Move the insertion position of the given offset into visible area of the View.

If the View is focused or `requestRectWithoutFocus` is set to true, this API may call
`https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect)` to bring the point to the visible area if
necessary.

<br />

| Parameters ||
|---|---|
| `offset` | `int`: an offset of the character. Value is 0 or greater <br /> |
| `requestRectWithoutFocus` | `boolean`: True for calling `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect)` in the unfocused state. False for calling it only the View has the focus. <br /> |

| Returns ||
|---|---|
| `boolean` | true if anything changed, otherwise false. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#bringPointIntoView(int)`

### cancelLongPress

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void cancelLongPress ()
```

Cancels a pending long press. Your subclass can use this if you
want the context menu to come up if the user presses and holds
at the same place, but you don't want it to come up if they press
and then move around enough to cause scrolling.

<br />

### clearComposingText

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearComposingText ()
```

Use `https://developer.android.com/reference/android/view/inputmethod/BaseInputConnection#removeComposingSpans(android.text.Spannable)` to remove any IME composing
state from this text view.

<br />

### computeScroll

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void computeScroll ()
```

Called by a parent to request that a child update its values for mScrollX
and mScrollY if necessary. This will typically be done if the child is
animating a scroll using a `https://developer.android.com/reference/android/widget/Scroller`
object.

<br />

### debug

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void debug (int depth)
```

<br />

<br />

| Parameters ||
|---|---|
| `depth` | `int` <br /> |

### didTouchFocusSelect

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean didTouchFocusSelect ()
```

Returns true, only while processing a touch gesture, if the initial
touch down event caused focus to move to the text view and as a result
its selection changed. Only valid while processing the touch gesture
of interest, in an editable text view.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### drawableHotspotChanged

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void drawableHotspotChanged (float x, 
                float y)
```

This function is called whenever the view hotspot changes and needs to
be propagated to drawables or child views managed by the view.


Dispatching to child views is handled by
`https://developer.android.com/reference/android/view/View#dispatchDrawableHotspotChanged(float,%20float)`.


Be sure to call through to the superclass when overriding this function.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `x` | `float`: hotspot x coordinate <br /> |
| `y` | `float`: hotspot y coordinate <br /> |

### endBatchEdit

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void endBatchEdit ()
```

<br />

<br />

### extractText

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean extractText (ExtractedTextRequest request, 
                ExtractedText outText)
```

If this TextView contains editable content, extract a portion of it
based on the information in <var translate="no">request</var> in to <var translate="no">outText</var>.

<br />

| Parameters ||
|---|---|
| `request` | `ExtractedTextRequest` <br /> |
| `outText` | `ExtractedText` <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the text was successfully extracted, else false. <br /> |

### findViewsWithText

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void findViewsWithText (ArrayList<View> outViews, 
                CharSequence searched, 
                int flags)
```

Finds the Views that contain given text. The containment is case insensitive.
The search is performed by either the text that the View renders or the content
description that describes the view for accessibility purposes and the view does
not render or both. Clients can specify how the search is to be performed via
passing the `https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_TEXT` and
`https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_CONTENT_DESCRIPTION` flags.

<br />

| Parameters ||
|---|---|
| `outViews` | `ArrayList`: The output list of matching Views. <br /> |
| `searched` | `CharSequence`: The text to match against. <br /> |
| `flags` | `int`: Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_TEXT` - `https://developer.android.com/reference/android/view/View#FIND_VIEWS_WITH_CONTENT_DESCRIPTION` |

### getAccessibilityClassName

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getAccessibilityClassName ()
```

Return the class name of this object to be used for accessibility purposes.
Subclasses should only override this if they are implementing something that
should be seen as a completely new class of view when used by accessibility,
unrelated to the class it is deriving from. This is used to fill in
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setClassName(java.lang.CharSequence)`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### getAutoLinkMask

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getAutoLinkMask ()
```

Gets the autolink mask of the text.

See `https://developer.android.com/reference/android/text/util/Linkify#ALL` and peers for possible values.

<br />

**Related XML Attributes:**

- [android:autoLink](https://developer.android.com/reference/android/widget/TextView#attr_android:autoLink)

| Returns ||
|---|---|
| `int` | <br /> |

### getAutoSizeMaxTextSize

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutoSizeMaxTextSize ()
```

<br />

<br />

**Related XML Attributes:**

- [android:autoSizeMaxTextSize](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMaxTextSize)

| Returns ||
|---|---|
| `int` | the current auto-size maximum text size in pixels (the default is 112sp). Note that if auto-size has not been configured this function returns `-1`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`

### getAutoSizeMinTextSize

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutoSizeMinTextSize ()
```

<br />

<br />

**Related XML Attributes:**

- [android:autoSizeMinTextSize](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMinTextSize)

| Returns ||
|---|---|
| `int` | the current auto-size minimum text size in pixels (the default is 12sp). Note that if auto-size has not been configured this function returns `-1`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`

### getAutoSizeStepGranularity

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutoSizeStepGranularity ()
```

<br />

<br />

**Related XML Attributes:**

- [android:autoSizeStepGranularity](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeStepGranularity)

| Returns ||
|---|---|
| `int` | the current auto-size step granularity in pixels. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`

### getAutoSizeTextAvailableSizes

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getAutoSizeTextAvailableSizes ()
```

<br />

<br />

| Returns ||
|---|---|
| `int[]` | the current auto-size `int` sizes array (in pixels). <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`

### getAutoSizeTextType

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutoSizeTextType ()
```

Returns the type of auto-size set for this widget.

<br />

**Related XML Attributes:**

- [android:autoSizeTextType](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeTextType)

| Returns ||
|---|---|
| `int` | an `int` corresponding to one of the auto-size types: `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_NONE` or `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM` Value is one of the following: - `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_NONE` - `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeWithDefaults(int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`

### getAutofillHints

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] getAutofillHints ()
```

Gets the hints that help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how
to autofill the view with the user's data.

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about these hints.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The hints set via the attribute or `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])`, or `null` if no hints were set. <br /> |

### getAutofillType

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAutofillType ()
```

Describes the autofill type of this view, so an
`https://developer.android.com/reference/android/service/autofill/AutofillService` can create the proper `https://developer.android.com/reference/android/view/autofill/AutofillValue`
when autofilling the view.

By default returns `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_NONE`, but views should override it to properly
support the Autofill Framework.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_NONE` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TEXT` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TOGGLE` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_LIST` - `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_DATE` |

### getAutofillValue

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AutofillValue getAutofillValue ()
```

Gets the `https://developer.android.com/reference/android/widget/TextView`'s current text for AutoFill. The value is trimmed to 100K
`char`s if longer.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillValue` | current text, `null` if the text is not editable <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getAutofillValue()`

### getBaseline

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getBaseline ()
```

<br />

Return the offset of the widget's text baseline from the widget's top
boundary. If this widget does not support baseline alignment, this
method returns -1.

<br />

<br />

| Returns ||
|---|---|
| `int` | the offset of the baseline within the widget's bounds or -1 if baseline alignment is not supported <br /> |

### getBreakStrategy

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getBreakStrategy ()
```

Gets the current strategy for breaking paragraphs into lines.

<br />

**Related XML Attributes:**

- [android:breakStrategy](https://developer.android.com/reference/android/widget/TextView#attr_android:breakStrategy)

| Returns ||
|---|---|
| `int` | the current strategy for breaking paragraphs into lines. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_SIMPLE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_HIGH_QUALITY` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_BALANCED` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setBreakStrategy(int)`

### getCompoundDrawablePadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundDrawablePadding ()
```

Returns the padding between the compound drawables and the text.

<br />

**Related XML Attributes:**

- [android:drawablePadding](https://developer.android.com/reference/android/widget/TextView#attr_android:drawablePadding)

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundDrawableTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BlendMode getCompoundDrawableTintBlendMode ()
```

Returns the blending mode used to apply the tint to the compound
drawables, if specified.

<br />

**Related XML Attributes:**

- [android:drawableTintMode](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/BlendMode` | the blending mode used to apply the tint to the compound drawables. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintBlendMode(android.graphics.BlendMode)`

### getCompoundDrawableTintList

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ColorStateList getCompoundDrawableTintList ()
```

<br />

<br />

**Related XML Attributes:**

- [android:drawableTint](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTint)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | the tint applied to the compound drawables <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)`

### getCompoundDrawableTintMode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PorterDuff.Mode getCompoundDrawableTintMode ()
```

Returns the blending mode used to apply the tint to the compound
drawables, if specified.

<br />

**Related XML Attributes:**

- [android:drawableTintMode](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/PorterDuff.Mode` | the blending mode used to apply the tint to the compound drawables <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintMode(android.graphics.PorterDuff.Mode)`

### getCompoundDrawables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable[] getCompoundDrawables ()
```

Returns drawables for the left, top, right, and bottom borders.

<br />

**Related XML Attributes:**

- [android:drawableLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableLeft)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableRight](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableRight)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | This value cannot be `null`. <br /> |

### getCompoundDrawablesRelative

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable[] getCompoundDrawablesRelative ()
```

Returns drawables for the start, top, end, and bottom borders.

<br />

**Related XML Attributes:**

- [android:drawableStart](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableStart)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableEnd](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableEnd)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | This value cannot be `null`. <br /> |

### getCompoundPaddingBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingBottom ()
```

Returns the bottom padding of the view, plus space for the bottom
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundPaddingEnd

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingEnd ()
```

Returns the end padding of the view, plus space for the end
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundPaddingLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingLeft ()
```

Returns the left padding of the view, plus space for the left
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundPaddingRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingRight ()
```

Returns the right padding of the view, plus space for the right
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundPaddingStart

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingStart ()
```

Returns the start padding of the view, plus space for the start
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCompoundPaddingTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getCompoundPaddingTop ()
```

Returns the top padding of the view, plus space for the top
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getCurrentHintTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getCurrentHintTextColor ()
```

<br />

Return the current color selected to paint the hint text.

<br />

<br />

| Returns ||
|---|---|
| `int` | Returns the current hint text color. <br /> |

### getCurrentTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getCurrentTextColor ()
```

Return the current color selected for normal text.

<br />

| Returns ||
|---|---|
| `int` | Returns the current text color. <br /> |

### getCustomInsertionActionModeCallback

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode.Callback getCustomInsertionActionModeCallback ()
```

Retrieves the value set in `https://developer.android.com/reference/android/widget/TextView#setCustomInsertionActionModeCallback(android.view.ActionMode.Callback)`. Default is null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ActionMode.Callback` | The current custom insertion callback. <br /> |

### getCustomSelectionActionModeCallback

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode.Callback getCustomSelectionActionModeCallback ()
```

Retrieves the value set in `https://developer.android.com/reference/android/widget/TextView#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback)`. Default is null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ActionMode.Callback` | The current custom selection callback. <br /> |

### getEditableText

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Editable getEditableText ()
```

Return the text that TextView is displaying as an Editable object. If the text is not
editable, null is returned.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Editable` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getText()`

### getEllipsize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextUtils.TruncateAt getEllipsize ()
```

Returns where, if anywhere, words that are longer than the view
is wide should be ellipsized.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextUtils.TruncateAt` | <br /> |

### getError

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getError ()
```

Returns the error message that was set to be displayed with
`https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence)`, or `null` if no error was set
or if it the error was cleared by the widget after user input.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### getExtendedPaddingBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getExtendedPaddingBottom ()
```

Returns the extended bottom padding of the view, including both the
bottom Drawable if any and any extra space to keep more than maxLines
of text from showing. It is only valid to call this after measuring.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getExtendedPaddingTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getExtendedPaddingTop ()
```

Returns the extended top padding of the view, including both the
top Drawable if any and any extra space to keep more than maxLines
of text from showing. It is only valid to call this after measuring.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getFilters

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputFilter[] getFilters ()
```

Returns the current list of input filters.

<br />

**Related XML Attributes:**

- [android:maxLength](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLength)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/InputFilter` | <br /> |

### getFirstBaselineToTopHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getFirstBaselineToTopHeight ()
```

Returns the distance between the first text baseline and the top of this TextView.

<br />

**Related XML Attributes:**

- [android:firstBaselineToTopHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:firstBaselineToTopHeight)

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)`

### getFocusedRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getFocusedRect (Rect r)
```

When a view has focus and the user navigates away from it, the next view is searched for
starting from the rectangle filled in by this method.

By default, the rectangle is the `https://developer.android.com/reference/android/view/View#getDrawingRect(android.graphics.Rect)`)
of the view. However, if your view maintains some idea of internal selection,
such as a cursor, or a selected row or column, you should override this method and
fill in a more specific rectangle.

<br />

| Parameters ||
|---|---|
| `r` | `Rect`: The rectangle to fill in, in this view's coordinates. <br /> |

### getFocusedSearchResultHighlightColor

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getFocusedSearchResultHighlightColor ()
```

Gets focused search result highlight color.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Returns ||
|---|---|
| `int` | a focused search result highlight color. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### getFocusedSearchResultIndex

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getFocusedSearchResultIndex ()
```

Gets the focused search result index.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Returns ||
|---|---|
| `int` | a focused search index or `https://developer.android.com/reference/android/widget/TextView#FOCUSED_SEARCH_RESULT_INDEX_NONE` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### getFontFeatureSettings

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getFontFeatureSettings ()
```

Returns the font feature settings. The format is the same as the CSS
font-feature-settings attribute:
<https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop>

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the currently set font feature settings. Default is null. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFontFeatureSettings(java.lang.String)`
- `https://developer.android.com/reference/android/graphics/Paint#setFontFeatureSettings(java.lang.String)`

### getFontVariationSettings

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getFontVariationSettings ()
```

Returns the font variation settings.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | the currently set font variation settings. Returns null if no variation is specified. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFontVariationSettings(java.lang.String)`
- `https://developer.android.com/reference/android/graphics/Paint#setFontVariationSettings(java.lang.String)`

### getFreezesText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getFreezesText ()
```

Return whether this text view is including its entire text contents
in frozen icicles. For `https://developer.android.com/reference/android/widget/EditText` it always returns true.

<br />

| Returns ||
|---|---|
| `boolean` | Returns true if text is included, false if it isn't. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFreezesText(boolean)`

### getGravity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getGravity ()
```

Returns the horizontal and vertical alignment of this TextView.

<br />

**Related XML Attributes:**

- [android:gravity](https://developer.android.com/reference/android/widget/TextView#attr_android:gravity)

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Gravity`

### getHighlightColor

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHighlightColor ()
```

<br />

<br />

**Related XML Attributes:**

- [android:textColorHighlight](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHighlight)

| Returns ||
|---|---|
| `int` | the color used to display the selection highlight <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHighlightColor(int)`

### getHighlights

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Highlights getHighlights ()
```

Returns highlights

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Highlights` | a highlight to be drawn. null if no highlight was set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHighlights(android.text.Highlights)`
- `https://developer.android.com/reference/android/text/Highlights`

### getHint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getHint ()
```

Returns the hint that is displayed when the text of the TextView
is empty.

<br />

**Related XML Attributes:**

- [android:hint](https://developer.android.com/reference/android/widget/TextView#attr_android:hint)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

### getHintTextColors

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final ColorStateList getHintTextColors ()
```

<br />

<br />

**Related XML Attributes:**

- [android:textColorHint](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHint)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | the color of the hint text, for the different states of this TextView. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)`

### getHyphenationFrequency

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHyphenationFrequency ()
```

Gets the current frequency of automatic hyphenation to be used when determining word breaks.

<br />

**Related XML Attributes:**

- [android:hyphenationFrequency](https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency)

| Returns ||
|---|---|
| `int` | the current frequency of automatic hyphenation to be used when determining word breaks. Value is one of the following: - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHyphenationFrequency(int)`

### getImeActionId

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImeActionId ()
```

Get the IME action ID previous set with `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`

### getImeActionLabel

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getImeActionLabel ()
```

Get the IME action label previous set with `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setImeActionLabel(java.lang.CharSequence,%20int)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`

### getImeHintLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LocaleList getImeHintLocales ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/LocaleList` | The current languages list "hint". `null` when no "hint" is available. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setImeHintLocales(android.os.LocaleList)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#hintLocales`

### getImeOptions

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImeOptions ()
```

Get the type of the Input Method Editor (IME).

<br />

| Returns ||
|---|---|
| `int` | the type of the IME <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setImeOptions(int)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`

### getIncludeFontPadding

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getIncludeFontPadding ()
```

Gets whether the TextView includes extra top and bottom padding to make
room for accents that go above the normal ascent and descent.

<br />

**Related XML Attributes:**

- [android:includeFontPadding](https://developer.android.com/reference/android/widget/TextView#attr_android:includeFontPadding)

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setIncludeFontPadding(boolean)`

### getInputExtras

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bundle getInputExtras (boolean create)
```

Retrieve the input extras currently associated with the text view, which
can be viewed as well as modified.

<br />

**Related XML Attributes:**

- [android:editorExtras](https://developer.android.com/reference/android/widget/TextView#attr_android:editorExtras)

| Parameters ||
|---|---|
| `create` | `boolean`: If true, the extras will be created if they don't already exist. Otherwise, null will be returned if none have been created. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setInputExtras(int)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#extras`

### getInputType

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getInputType ()
```

Get the type of the editable content.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setInputType(int)`
- `https://developer.android.com/reference/android/text/InputType`

### getJustificationMode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getJustificationMode ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | true if currently paragraph justification mode. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_WORD` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_CHARACTER` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setJustificationMode(int)`

### getKeyListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final KeyListener getKeyListener ()
```

Gets the current `https://developer.android.com/reference/android/text/method/KeyListener` for the TextView.
This will frequently be null for non-EditText TextViews.

<br />

**Related XML Attributes:**

- [android:numeric](https://developer.android.com/reference/android/widget/TextView#attr_android:numeric)
- [android:digits](https://developer.android.com/reference/android/widget/TextView#attr_android:digits)
- [android:phoneNumber](https://developer.android.com/reference/android/widget/TextView#attr_android:phoneNumber)
- [android:inputMethod](https://developer.android.com/reference/android/widget/TextView#attr_android:inputMethod)
- [android:capitalize](https://developer.android.com/reference/android/widget/TextView#attr_android:capitalize)
- [android:autoText](https://developer.android.com/reference/android/widget/TextView#attr_android:autoText)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/method/KeyListener` | the current key listener for this TextView. <br /> |

### getLastBaselineToBottomHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLastBaselineToBottomHeight ()
```

Returns the distance between the last text baseline and the bottom of this TextView.

<br />

**Related XML Attributes:**

- [android:lastBaselineToBottomHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:lastBaselineToBottomHeight)

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)`

### getLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Layout getLayout ()
```

Gets the `https://developer.android.com/reference/android/text/Layout` that is currently being used to display the text.
This value can be null if the text or width has recently changed.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/Layout` | The Layout that is currently being used to display the text. <br /> |

### getLetterSpacing

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLetterSpacing ()
```

Gets the text letter-space value, which determines the spacing between characters.
The value returned is in ems. Normally, this value is 0.0.

<br />

| Returns ||
|---|---|
| `float` | The text letter-space value in ems. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLetterSpacing(float)`
- `https://developer.android.com/reference/android/graphics/Paint#setLetterSpacing(float)`

### getLineBounds

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineBounds (int line, 
                Rect bounds)
```

Return the baseline for the specified line (0...getLineCount() - 1)
If bounds is not null, return the top, left, right, bottom extents
of the specified line in it. If the internal Layout has not been built,
return 0 and set bounds to (0, 0, 0, 0)

<br />

| Parameters ||
|---|---|
| `line` | `int`: which line to examine (0..getLineCount() - 1) <br /> |
| `bounds` | `Rect`: Optional. If not null, it returns the extent of the line <br /> |

| Returns ||
|---|---|
| `int` | the Y-coordinate of the baseline <br /> |

### getLineBreakStyle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineBreakStyle ()
```

Gets the current line-break style for text wrapping.

<br />

| Returns ||
|---|---|
| `int` | The line-break style to be used for text wrapping. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_LOOSE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NORMAL` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_STRICT` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_UNSPECIFIED` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NO_BREAK` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_AUTO` |

### getLineBreakWordStyle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineBreakWordStyle ()
```

Gets the current line-break word style for text wrapping.

<br />

| Returns ||
|---|---|
| `int` | The line-break word style to be used for text wrapping. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_PHRASE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_UNSPECIFIED` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_AUTO` |

### getLineCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineCount ()
```

Return the number of lines of text, or 0 if the internal Layout has not
been built.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getLineHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLineHeight ()
```

Gets the vertical distance between lines of text, in pixels.
Note that markup within the text can cause individual lines
to be taller or shorter than this height, and the layout may
contain additional first-or last-line padding.

<br />

| Returns ||
|---|---|
| `int` | The height of one standard line in pixels. <br /> |

### getLineSpacingExtra

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineSpacingExtra ()
```

Gets the line spacing extra space

<br />

**Related XML Attributes:**

- [android:lineSpacingExtra](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingExtra)

| Returns ||
|---|---|
| `float` | the extra space that is added to the height of each lines of this TextView. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/widget/TextView#getLineSpacingMultiplier()`

### getLineSpacingMultiplier

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getLineSpacingMultiplier ()
```

Gets the line spacing multiplier

<br />

**Related XML Attributes:**

- [android:lineSpacingMultiplier](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingMultiplier)

| Returns ||
|---|---|
| `float` | the value by which each line's height is multiplied to get its actual height. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/widget/TextView#getLineSpacingExtra()`

### getLinkTextColors

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final ColorStateList getLinkTextColors ()
```

<br />

<br />

**Related XML Attributes:**

- [android:textColorLink](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorLink)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | the list of colors used to paint the links in the text, for the different states of this TextView <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(int)`

### getLinksClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getLinksClickable ()
```

Returns whether the movement method will automatically be set to
`https://developer.android.com/reference/android/text/method/LinkMovementMethod` if `https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)` has been
set to nonzero and links are detected in `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)`.
The default is true.

<br />

**Related XML Attributes:**

- [android:linksClickable](https://developer.android.com/reference/android/widget/TextView#attr_android:linksClickable)

| Returns ||
|---|---|
| `boolean` | <br /> |

### getMarqueeRepeatLimit

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMarqueeRepeatLimit ()
```

Gets the number of times the marquee animation is repeated. Only meaningful if the
TextView has marquee enabled.

<br />

**Related XML Attributes:**

- [android:marqueeRepeatLimit](https://developer.android.com/reference/android/widget/TextView#attr_android:marqueeRepeatLimit)

| Returns ||
|---|---|
| `int` | the number of times the marquee animation is repeated. -1 if the animation repeats indefinitely <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMarqueeRepeatLimit(int)`

### getMaxEms

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxEms ()
```

Returns the maximum width of TextView in terms of ems or -1 if the maximum width was set
using `https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`.

<br />

**Related XML Attributes:**

- [android:maxEms](https://developer.android.com/reference/android/widget/TextView#attr_android:maxEms)

| Returns ||
|---|---|
| `int` | the maximum width of TextView in terms of ems or -1 if the maximum width is not defined in ems <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)`
- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### getMaxHeight

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxHeight ()
```

Returns the maximum height of TextView in terms of pixels or -1 if the maximum height was
set using `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`.

<br />

**Related XML Attributes:**

- [android:maxHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:maxHeight)

| Returns ||
|---|---|
| `int` | the maximum height of TextView in terms of pixels or -1 if the maximum height is not defined in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### getMaxLines

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxLines ()
```

Returns the maximum height of TextView in terms of number of lines or -1 if the
maximum height was set using `https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`.

<br />

**Related XML Attributes:**

- [android:maxLines](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLines)

| Returns ||
|---|---|
| `int` | the maximum height of TextView in terms of number of lines. -1 if the maximum height is not defined in lines. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)`
- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### getMaxWidth

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMaxWidth ()
```

Returns the maximum width of TextView in terms of pixels or -1 if the maximum width was set
using `https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`.

<br />

**Related XML Attributes:**

- [android:maxWidth](https://developer.android.com/reference/android/widget/TextView#attr_android:maxWidth)

| Returns ||
|---|---|
| `int` | the maximum width of TextView in terms of pixels. -1 if the maximum width is not defined in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)`
- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

### getMinEms

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinEms ()
```

Returns the minimum width of TextView in terms of ems or -1 if the minimum width was set
using `https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`.

<br />

**Related XML Attributes:**

- [android:minEms](https://developer.android.com/reference/android/widget/TextView#attr_android:minEms)

| Returns ||
|---|---|
| `int` | the minimum width of TextView in terms of ems. -1 if the minimum width is not defined in ems <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinEms(int)`
- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### getMinHeight

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinHeight ()
```

Returns the minimum height of TextView in terms of pixels or -1 if the minimum height was
set using `https://developer.android.com/reference/android/widget/TextView#setMinLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`.

<br />

**Related XML Attributes:**

- [android:minHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:minHeight)

| Returns ||
|---|---|
| `int` | the minimum height of TextView in terms of pixels or -1 if the minimum height is not defined in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### getMinLines

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinLines ()
```

Returns the minimum height of TextView in terms of number of lines or -1 if the minimum
height was set using `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`.

<br />

**Related XML Attributes:**

- [android:minLines](https://developer.android.com/reference/android/widget/TextView#attr_android:minLines)

| Returns ||
|---|---|
| `int` | the minimum height of TextView in terms of number of lines or -1 if the minimum height is not defined in lines <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinLines(int)`
- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### getMinWidth

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinWidth ()
```

Returns the minimum width of TextView in terms of pixels or -1 if the minimum width was set
using `https://developer.android.com/reference/android/widget/TextView#setMinEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`.

<br />

**Related XML Attributes:**

- [android:minWidth](https://developer.android.com/reference/android/widget/TextView#attr_android:minWidth)

| Returns ||
|---|---|
| `int` | the minimum width of TextView in terms of pixels or -1 if the minimum width is not defined in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)`
- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

### getMinimumFontMetrics

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Paint.FontMetrics getMinimumFontMetrics ()
```

Get the minimum font metrics used for line spacing.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Paint.FontMetrics` | a minimum font metrics. `null` for using the value obtained by `https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/Layout#getMinimumFontMetrics()`
- `https://developer.android.com/reference/android/text/Layout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/DynamicLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`

### getMovementMethod

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final MovementMethod getMovementMethod ()
```

Gets the `https://developer.android.com/reference/android/text/method/MovementMethod` being used for this TextView,
which provides positioning, scrolling, and text selection functionality.
This will frequently be null for non-EditText TextViews.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/method/MovementMethod` | the movement method being used for this TextView. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/method/MovementMethod`

### getOffsetForPosition

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOffsetForPosition (float x, 
                float y)
```

Get the character offset closest to the specified absolute position. A typical use case is to
pass the result of `https://developer.android.com/reference/android/view/MotionEvent#getX()` and `https://developer.android.com/reference/android/view/MotionEvent#getY()` to this method.

<br />

| Parameters ||
|---|---|
| `x` | `float`: The horizontal absolute position of a point on screen <br /> |
| `y` | `float`: The vertical absolute position of a point on screen <br /> |

| Returns ||
|---|---|
| `int` | the character offset for the character whose position is closest to the specified position. Returns -1 if there is no layout. <br /> |

### getPaint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextPaint getPaint ()
```

Gets the `https://developer.android.com/reference/android/text/TextPaint` used for the text.
Use this only to consult the Paint's properties and not to change them.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextPaint` | The base paint used for the text. <br /> |

### getPaintFlags

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaintFlags ()
```

Gets the flags on the Paint being used to display the text.

<br />

| Returns ||
|---|---|
| `int` | The flags on the Paint being used to display the text. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/Paint#getFlags()`

### getPrivateImeOptions

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getPrivateImeOptions ()
```

Get the private type of the content.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setPrivateImeOptions(java.lang.String)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#privateImeOptions`

### getSearchResultHighlightColor

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSearchResultHighlightColor ()
```

Gets the search result highlight color.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Returns ||
|---|---|
| `int` | a search result highlight color. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### getSearchResultHighlights

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getSearchResultHighlights ()
```

Gets the current search result ranges.

<br />

| Returns ||
|---|---|
| `int[]` | a flatten search result ranges. null if not available. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### getSelectionEnd

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSelectionEnd ()
```

Convenience for `https://developer.android.com/reference/android/text/Selection#getSelectionEnd(java.lang.CharSequence)`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getSelectionStart

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSelectionStart ()
```

Convenience for `https://developer.android.com/reference/android/text/Selection#getSelectionStart(java.lang.CharSequence)`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getShadowColor

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getShadowColor ()
```

Gets the color of the shadow layer.

<br />

**Related XML Attributes:**

- [android:shadowColor](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowColor)

| Returns ||
|---|---|
| `int` | the color of the shadow layer <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### getShadowDx

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getShadowDx ()
```

<br />

<br />

**Related XML Attributes:**

- [android:shadowDx](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDx)

| Returns ||
|---|---|
| `float` | the horizontal offset of the shadow layer <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### getShadowDy

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getShadowDy ()
```

Gets the vertical offset of the shadow layer.

<br />

**Related XML Attributes:**

- [android:shadowDy](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDy)

| Returns ||
|---|---|
| `float` | The vertical offset of the shadow layer. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### getShadowRadius

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getShadowRadius ()
```

Gets the radius of the shadow layer.

<br />

**Related XML Attributes:**

- [android:shadowRadius](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowRadius)

| Returns ||
|---|---|
| `float` | the radius of the shadow layer. If 0, the shadow layer is not visible <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShadowLayer(float,%20float,%20float,%20int)`

### getShiftDrawingOffsetForStartOverhang

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getShiftDrawingOffsetForStartOverhang ()
```

Returns true if shifting the drawing x offset for start overhang.

<br />

| Returns ||
|---|---|
| `boolean` | True if shifting the drawing x offset for start overhang. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setShiftDrawingOffsetForStartOverhang(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#setUseBoundsForWidth(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()`

### getShowSoftInputOnFocus

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getShowSoftInputOnFocus ()
```

Returns whether the soft input method will be made visible when this
TextView gets focused. The default is true.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### getText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getText ()
```

Return the text that TextView is displaying. If `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)` was called
with an argument of `https://developer.android.com/reference/android/widget/TextView.BufferType#SPANNABLE`
or `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE`, you can cast
the return value from this method to Spannable or Editable, respectively.

The content of the return value should not be modified. If you want a modifiable one, you
should make your own copy first.

<br />

<br />

**Related XML Attributes:**

- [android:text](https://developer.android.com/reference/android/widget/TextView#attr_android:text)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The text displayed by the text view. <br /> |

### getTextClassifier

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextClassifier getTextClassifier ()
```

Returns the `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` used by this TextView.
If no TextClassifier has been set, this TextView uses the default set by the
`https://developer.android.com/reference/android/view/textclassifier/TextClassificationManager`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` | This value cannot be `null`. <br /> |

### getTextColors

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final ColorStateList getTextColors ()
```

Gets the text colors for the different states (normal, selected, focused) of the TextView.

<br />

**Related XML Attributes:**

- [android:textColor](https://developer.android.com/reference/android/widget/TextView#attr_android:textColor)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setTextColor(int)`

### getTextCursorDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getTextCursorDrawable ()
```

Returns the Drawable corresponding to the text cursor.
Note that any change applied to the cursor Drawable will not be visible
until the cursor is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textCursorDrawable](https://developer.android.com/reference/android/widget/TextView#attr_android:textCursorDrawable)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | the text cursor drawable. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(android.graphics.drawable.Drawable)`
- `https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(int)`

### getTextDirectionHeuristic

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TextDirectionHeuristic getTextDirectionHeuristic ()
```

Returns resolved `https://developer.android.com/reference/android/text/TextDirectionHeuristic` that will be used for text layout.
The `https://developer.android.com/reference/android/text/TextDirectionHeuristic` that is used by TextView is only available after
`https://developer.android.com/reference/android/view/View#getTextDirection()` and `https://developer.android.com/reference/android/view/View#getLayoutDirection()` is resolved. Therefore the
return value may not be the same as the one TextView uses if the View's layout direction is
not resolved or detached from parent root view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/TextDirectionHeuristic` | This value cannot be `null`. <br /> |

### getTextLocale

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Locale getTextLocale ()
```

Get the default primary `https://developer.android.com/reference/java/util/Locale` of the text in this TextView. This will always be
the first member of `https://developer.android.com/reference/android/widget/TextView#getTextLocales()`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Locale` | the default primary `https://developer.android.com/reference/java/util/Locale` of the text in this TextView. This value cannot be `null`. <br /> |

### getTextLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LocaleList getTextLocales ()
```

Get the default `https://developer.android.com/reference/android/os/LocaleList` of the text in this TextView.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/LocaleList` | the default `https://developer.android.com/reference/android/os/LocaleList` of the text in this TextView. This value cannot be `null`. <br /> |

### getTextMetricsParams

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PrecomputedText.Params getTextMetricsParams ()
```

Gets the parameters for text layout precomputation, for use with `https://developer.android.com/reference/android/text/PrecomputedText`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/PrecomputedText.Params` | a current `https://developer.android.com/reference/android/text/PrecomputedText.Params` This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/PrecomputedText`

### getTextScaleX

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTextScaleX ()
```

Gets the extent by which text should be stretched horizontally.
This will usually be 1.0.

<br />

| Returns ||
|---|---|
| `float` | The horizontal scale factor. <br /> |

### getTextSelectHandle

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getTextSelectHandle ()
```

Returns the Drawable corresponding to the selection handle used
for positioning the cursor within text.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandle](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandle)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | the text select handle drawable. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(android.graphics.drawable.Drawable)`
- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(int)`

### getTextSelectHandleLeft

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getTextSelectHandleLeft ()
```

Returns the Drawable corresponding to the left handle used
for selecting text.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleLeft)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | the left text selection handle drawable. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(android.graphics.drawable.Drawable)`
- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(int)`

### getTextSelectHandleRight

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getTextSelectHandleRight ()
```

Returns the Drawable corresponding to the right handle used
for selecting text.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleRight](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleRight)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | the right text selection handle drawable. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(android.graphics.drawable.Drawable)`
- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(int)`

### getTextSize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTextSize ()
```

<br />

<br />

| Returns ||
|---|---|
| `float` | the size (in pixels) of the default text size in this TextView. <br /> |

### getTextSizeUnit

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextSizeUnit ()
```

Gets the text size unit defined by the developer. It may be specified in resources or be
passed as the unit argument of `https://developer.android.com/reference/android/widget/TextView#setTextSize(int,%20float)` at runtime.

<br />

| Returns ||
|---|---|
| `int` | the dimension type of the text size unit originally defined. <br /> |

**See also:**

- `https://developer.android.com/reference/android/util/TypedValue#TYPE_DIMENSION`

### getTotalPaddingBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingBottom ()
```

Returns the total bottom padding of the view, including the bottom
Drawable if any, the extra space to keep more than maxLines
from showing, and the vertical offset for gravity, if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTotalPaddingEnd

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingEnd ()
```

Returns the total end padding of the view, including the end
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTotalPaddingLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingLeft ()
```

Returns the total left padding of the view, including the left
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTotalPaddingRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingRight ()
```

Returns the total right padding of the view, including the right
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTotalPaddingStart

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingStart ()
```

Returns the total start padding of the view, including the start
Drawable if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTotalPaddingTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTotalPaddingTop ()
```

Returns the total top padding of the view, including the top
Drawable if any, the extra space to keep more than maxLines
from showing, and the vertical offset for gravity, if any.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getTransformationMethod

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final TransformationMethod getTransformationMethod ()
```

Gets the current `https://developer.android.com/reference/android/text/method/TransformationMethod` for the TextView.
This is frequently null, except for single-line and password fields.

<br />

**Related XML Attributes:**

- [android:password](https://developer.android.com/reference/android/widget/TextView#attr_android:password)
- [android:singleLine](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/method/TransformationMethod` | the current transformation method for this TextView. <br /> |

### getTypeface

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Typeface getTypeface ()
```

Gets the current `https://developer.android.com/reference/android/graphics/Typeface` that is used to style the text.

<br />

**Related XML Attributes:**

- [android:fontFamily](https://developer.android.com/reference/android/widget/TextView#attr_android:fontFamily)
- [android:typeface](https://developer.android.com/reference/android/widget/TextView#attr_android:typeface)
- [android:textStyle](https://developer.android.com/reference/android/widget/TextView#attr_android:textStyle)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Typeface` | The current Typeface. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface)`

### getUrls

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public URLSpan[] getUrls ()
```

Returns the list of `https://developer.android.com/reference/android/text/style/URLSpan` attached to the text
(by `https://developer.android.com/reference/android/text/util/Linkify` or otherwise) if any. You can call
`https://developer.android.com/reference/android/text/style/URLSpan#getURL()` on them to find where they link to
or use `https://developer.android.com/reference/android/text/Spanned#getSpanStart(java.lang.Object)` and `https://developer.android.com/reference/android/text/Spanned#getSpanEnd(java.lang.Object)`
to find the region of the text they are attached to.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/style/URLSpan` | <br /> |

### getUseBoundsForWidth

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getUseBoundsForWidth ()
```

Returns true if using bounding box as a width, false for using advance as a width.

<br />

| Returns ||
|---|---|
| `boolean` | True if using bounding box for width, false if using advance for width. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setUseBoundsForWidth(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#setShiftDrawingOffsetForStartOverhang(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getShiftDrawingOffsetForStartOverhang()`

### hasOverlappingRendering

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasOverlappingRendering ()
```

Returns whether this View has content which overlaps.

This function, intended to be overridden by specific View types, is an optimization when
alpha is set on a view. If rendering overlaps in a view with alpha \< 1, that view is drawn to
an offscreen buffer and then composited into place, which can be expensive. If the view has
no overlapping rendering, the view can draw each primitive with the appropriate alpha value
directly. An example of overlapping rendering is a TextView with a background image, such as
a Button. An example of non-overlapping rendering is a TextView with no background, or an
ImageView with only the foreground image. The default implementation returns true; subclasses
should override if they have cases which can be optimized.

**Note:** The return value of this method is ignored if `https://developer.android.com/reference/android/view/View#forceHasOverlappingRendering(boolean)` has been called on this view.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the content in this view might overlap, false otherwise. <br /> |

### hasSelection

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasSelection ()
```

Return true iff there is a selection of nonzero length inside this text view.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### invalidateDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void invalidateDrawable (Drawable drawable)
```

Invalidates the specified Drawable.

<br />

| Parameters ||
|---|---|
| `drawable` | `Drawable`: This value cannot be `null`. <br /> |

### isAllCaps

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAllCaps ()
```

Checks whether the transformation method applied to this TextView is set to ALL CAPS.

<br />

| Returns ||
|---|---|
| `boolean` | Whether the current transformation method is for ALL CAPS. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAllCaps(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#setTransformationMethod(android.text.method.TransformationMethod)`

### isAutoHandwritingEnabled

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAutoHandwritingEnabled ()
```

Return whether the View allows automatic handwriting initiation. Returns true if automatic
handwriting initiation is enabled, and vice versa.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isCursorVisible

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isCursorVisible ()
```

<br />

<br />

**Related XML Attributes:**

- [android:cursorVisible](https://developer.android.com/reference/android/widget/TextView#attr_android:cursorVisible)

| Returns ||
|---|---|
| `boolean` | whether or not the cursor is visible (assuming this TextView is editable). This method may return `false` when the IME is consuming the input even if the `mEditor.mCursorVisible` attribute is `true` or `#setCursorVisible(true)` is called. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCursorVisible(boolean)`

### isElegantTextHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isElegantTextHeight ()
```

Get the value of the TextView's elegant height metrics flag. This setting selects font
variants that have not been compacted to fit Latin-based vertical
metrics, and also increases top and bottom bounds to provide more space.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the elegant height metrics flag is set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setElegantTextHeight(boolean)`
- `https://developer.android.com/reference/android/graphics/Paint#setElegantTextHeight(boolean)`

### isFallbackLineSpacing

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFallbackLineSpacing ()
```

<br />

<br />

**Related XML Attributes:**

- [android:fallbackLineSpacing](https://developer.android.com/reference/android/widget/TextView#attr_android:fallbackLineSpacing)

| Returns ||
|---|---|
| `boolean` | whether fallback line spacing is enabled, `true` by default <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFallbackLineSpacing(boolean)`

### isHorizontallyScrollable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isHorizontallyScrollable ()
```

Returns whether the text is allowed to be wider than the View.
If false, the text will be wrapped to the width of the View.

<br />

**Related XML Attributes:**

- [android:scrollHorizontally](https://developer.android.com/reference/android/widget/TextView#attr_android:scrollHorizontally)

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHorizontallyScrolling(boolean)`

### isInputMethodTarget

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isInputMethodTarget ()
```

Returns whether this text view is a current input method target. The
default implementation just checks with `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager`.

<br />

| Returns ||
|---|---|
| `boolean` | True if the TextView is a current input method target; false otherwise. <br /> |

### isLocalePreferredLineHeightForMinimumUsed

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLocalePreferredLineHeightForMinimumUsed ()
```

Returns true if the locale preferred line height is used for the minimum line height.

<br />

| Returns ||
|---|---|
| `boolean` | true if using locale preferred line height for the minimum line height. Otherwise false. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLocalePreferredLineHeightForMinimumUsed(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/widget/TextView#getMinimumFontMetrics()`

### isSingleLine

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSingleLine ()
```

Returns if the text is constrained to a single horizontally scrolling line ignoring new
line characters instead of letting it wrap onto multiple lines.

<br />

**Related XML Attributes:**

- [android:singleLine](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine)

| Returns ||
|---|---|
| `boolean` | <br /> |

### isSuggestionsEnabled

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSuggestionsEnabled ()
```

Return whether or not suggestions are enabled on this TextView. The suggestions are generated
by the IME or by the spell checker as the user types. This is done by adding
`https://developer.android.com/reference/android/text/style/SuggestionSpan`s to the text.

When suggestions are enabled (default), this list of suggestions will be displayed when the
user asks for them on these parts of the text. This value depends on the inputType of this
TextView.

The class of the input type must be `https://developer.android.com/reference/android/text/InputType#TYPE_CLASS_TEXT`.

In addition, the type variation must be one of
`https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_NORMAL`,
`https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_EMAIL_SUBJECT`,
`https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_LONG_MESSAGE`,
`https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_SHORT_MESSAGE` or
`https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_VARIATION_WEB_EDIT_TEXT`.

And finally, the `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_NO_SUGGESTIONS` flag must *not* be set.

<br />

| Returns ||
|---|---|
| `boolean` | true if the suggestions popup window is enabled, based on the inputType. <br /> |

### isTextSelectable

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isTextSelectable ()
```

Returns the state of the `textIsSelectable` flag (See
`https://developer.android.com/reference/android/widget/TextView#setTextIsSelectable(boolean)`). Although you have to set this flag
to allow users to select and copy text in a non-editable TextView, the content of an
`https://developer.android.com/reference/android/widget/EditText` can always be selected, independently of the value of this flag.

<br />

<br />

**Related XML Attributes:**

- [android:textIsSelectable](https://developer.android.com/reference/android/widget/TextView#attr_android:textIsSelectable)

| Returns ||
|---|---|
| `boolean` | True if the text displayed in this TextView can be selected by the user. <br /> |

### jumpDrawablesToCurrentState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void jumpDrawablesToCurrentState ()
```

Call `https://developer.android.com/reference/android/graphics/drawable/Drawable#jumpToCurrentState()`
on all Drawable objects associated with this view.


Also calls `https://developer.android.com/reference/android/animation/StateListAnimator#jumpToCurrentState()` if there is a StateListAnimator
attached to this view.


If you override this method you *must* call through to the
superclass implementation.

<br />

### length

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int length ()
```

Returns the length, in characters, of the text managed by this TextView

<br />

| Returns ||
|---|---|
| `int` | The length of the text managed by the TextView in characters. <br /> |

### moveCursorToVisibleOffset

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean moveCursorToVisibleOffset ()
```

Move the cursor, if needed, so that it is at an offset that is visible
to the user. This will not move the cursor if it represents more than
one character (a selection range). This will only work if the
TextView contains spannable text; otherwise it will do nothing.

<br />

| Returns ||
|---|---|
| `boolean` | True if the cursor was actually moved, false otherwise. <br /> |

### onBeginBatchEdit

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onBeginBatchEdit ()
```

Called by the framework in response to a request to begin a batch
of edit operations through a call to link `https://developer.android.com/reference/android/widget/TextView#beginBatchEdit()`.

<br />

### onCheckIsTextEditor

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onCheckIsTextEditor ()
```

Check whether the called view is a text editor, in which case it
would make sense to automatically display a soft input window for
it. Subclasses should override this if they implement
`https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo)` to return true if
a call on that method would return a non-null InputConnection, and
they are really a first-class editor that the user would normally
start typing on when the go into a window containing your view.

The default implementation always returns false. This does
*not* mean that its `https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo)`
will not be called or the user can not otherwise perform edits on your
view; it is just a hint to the system that this is not the primary
purpose of this view.

<br />

| Returns ||
|---|---|
| `boolean` | Returns true if this view is a text editor, else false. <br /> |

### onCommitCompletion

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCommitCompletion (CompletionInfo text)
```

Called by the framework in response to a text completion from
the current input method, provided by it calling
`https://developer.android.com/reference/android/view/inputmethod/InputConnection#commitCompletion(android.view.inputmethod.CompletionInfo)`. The default implementation does
nothing; text views that are supporting auto-completion should override
this to do their desired behavior.

<br />

| Parameters ||
|---|---|
| `text` | `CompletionInfo`: The auto complete text the user has selected. <br /> |

### onCommitCorrection

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCommitCorrection (CorrectionInfo info)
```

Called by the framework in response to a text auto-correction (such as fixing a typo using a
dictionary) from the current input method, provided by it calling
`https://developer.android.com/reference/android/view/inputmethod/InputConnection#commitCorrection(android.view.inputmethod.CorrectionInfo)`.
The default implementation flashes the background of the corrected word to provide
feedback to the user.

<br />

| Parameters ||
|---|---|
| `info` | `CorrectionInfo`: The auto correct info about the text that was corrected. <br /> |

### onCreateInputConnection

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public InputConnection onCreateInputConnection (EditorInfo outAttrs)
```

Create a new InputConnection for an InputMethod to interact
with the view. The default implementation returns null, since it doesn't
support input methods. You can override this to implement such support.
This is only needed for views that take focus and text input.

When implementing this, you probably also want to implement
`https://developer.android.com/reference/android/view/View#onCheckIsTextEditor()` to indicate you will return a
non-null InputConnection.

Also, take good care to fill in the `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`
object correctly and in its entirety, so that the connected IME can rely
on its values. For example, `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#initialSelStart`
and `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#initialSelEnd` members
must be filled in with the correct cursor position for IMEs to work correctly
with your application.

<br />

<br />

| Parameters ||
|---|---|
| `outAttrs` | `EditorInfo`: Fill in with attribute information about the connection. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/inputmethod/InputConnection` | <br /> |

### onCreateViewTranslationRequest

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCreateViewTranslationRequest (int[] supportedFormats, 
                Consumer<ViewTranslationRequest> requestsCollector)
```

Collects a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` which represents the content to be translated in
the view.

NOTE: When overriding the method, it should not collect a request to translate this
TextView if it is displaying a password.

<br />

| Parameters ||
|---|---|
| `supportedFormats` | `int`: the supported translation format. The value could be `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT`. This value cannot be `null`. <br /> |
| `requestsCollector` | `Consumer`: `https://developer.android.com/reference/java/util/function/Consumer` to receiver the `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` which contains the information to be translated. This value cannot be `null`. <br /> |

### onDragEvent

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onDragEvent (DragEvent event)
```

Handles drag events sent by the system following a call to
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`.

If this text view is not editable, delegates to the default `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)`
implementation.

If this text view is editable, accepts all drag actions (returns true for an
`https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED` event and all
subsequent drag events). While the drag is in progress, updates the cursor position
to follow the touch location. Once a drop event is received, handles content insertion
via `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)`.

<br />

| Parameters ||
|---|---|
| `event` | `DragEvent`: The `https://developer.android.com/reference/android/view/DragEvent` sent by the system. The `https://developer.android.com/reference/android/view/DragEvent#getAction()` method returns an action type constant defined in DragEvent, indicating the type of drag event represented by this object. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if this text view is editable and delegates to super otherwise. See `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)`. <br /> |

### onEditorAction

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onEditorAction (int actionCode)
```

Called when an attached input method calls
`https://developer.android.com/reference/android/view/inputmethod/InputConnection#performEditorAction(int)`
for this text view. The default implementation will call your action
listener supplied to `https://developer.android.com/reference/android/widget/TextView#setOnEditorActionListener(android.widget.TextView.OnEditorActionListener)`, or perform
a standard operation for `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_NEXT`, `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_PREVIOUS`, or `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#IME_ACTION_DONE`.

For backwards compatibility, if no IME options have been set and the
text view would not normally advance focus on enter, then
the NEXT and DONE actions received here will be turned into an enter
key down/up pair to go through the normal key handling.

<br />

| Parameters ||
|---|---|
| `actionCode` | `int`: The code of the action being performed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setOnEditorActionListener(android.widget.TextView.OnEditorActionListener)`

### onEndBatchEdit

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onEndBatchEdit ()
```

Called by the framework in response to a request to end a batch
of edit operations through a call to link `https://developer.android.com/reference/android/widget/TextView#endBatchEdit()`.

<br />

### onGenericMotionEvent

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onGenericMotionEvent (MotionEvent event)
```

Implement this method to handle generic motion events.


Generic motion events describe joystick movements, hover events from mouse or stylus
devices, trackpad touches, scroll wheel movements and other motion events not handled
by `https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)` or `https://developer.android.com/reference/android/view/View#onTrackballEvent(android.view.MotionEvent)`.
The `https://developer.android.com/reference/android/view/MotionEvent#getSource()` of the motion event specifies
the class of input that was received. Implementations of this method
must examine the bits in the source before processing the event.
The following code example shows how this is done.


Generic motion events with source class `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_POINTER`
are delivered to the view under the pointer. All other generic motion events are
delivered to the focused view.

```
 public boolean onGenericMotionEvent(MotionEvent event) {
    if (event.isFromSource(InputDevice.SOURCE_CLASS_JOYSTICK)) {
        if (event.getAction() == MotionEvent.ACTION_MOVE) {
            // process the joystick movement...
            return true;
        }
    }
    if (event.isFromSource(InputDevice.SOURCE_CLASS_POINTER)) {
        switch (event.getAction()) {
            case MotionEvent.ACTION_HOVER_MOVE:
                // process the hover movement...
                return true;
            case MotionEvent.ACTION_SCROLL:
                // process the scroll wheel movement...
                return true;
        }
    }
    return super.onGenericMotionEvent(event);
}
```

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The generic motion event being processed. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

### onKeyDown

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyDown (int keyCode, 
                KeyEvent event)
```

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)`: perform press of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER` or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
is released, if the view is enabled and clickable.


Key presses in software keyboards will generally NOT trigger this
listener, although some may elect to do so in some situations. Do not
rely on this to catch software key presses.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: a key code that represents the button pressed, from `https://developer.android.com/reference/android/view/KeyEvent` <br /> |
| `event` | `KeyEvent`: the KeyEvent object that defines the button action <br /> |

| Returns ||
|---|---|
| `boolean` | If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false. <br /> |

### onKeyMultiple

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyMultiple (int keyCode, 
                int repeatCount, 
                KeyEvent event)
```

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)`: always returns false (doesn't handle
the event).

Key presses in software keyboards will generally NOT trigger this listener,
although some may elect to do so in some situations. Do not rely on this to
catch software key presses.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: A key code that represents the button pressed, from `https://developer.android.com/reference/android/view/KeyEvent`. <br /> |
| `repeatCount` | `int`: The number of times the action was made. <br /> |
| `event` | `KeyEvent`: The KeyEvent object that defines the button action. <br /> |

| Returns ||
|---|---|
| `boolean` | If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false. <br /> |

### onKeyPreIme

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyPreIme (int keyCode, 
                KeyEvent event)
```

Handle a key event before it is processed by any input method
associated with the view hierarchy. This can be used to intercept
key events in special situations before the IME consumes them; a
typical example would be handling the BACK key to update the application's
UI instead of allowing the IME to see it and close itself. Due to a bug,
this function is not called for BACK key events on Android T and U, when
the IME is shown.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: The value in event.getKeyCode(). <br /> |
| `event` | `KeyEvent`: Description of the key event. <br /> |

| Returns ||
|---|---|
| `boolean` | If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false. <br /> |

### onKeyShortcut

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyShortcut (int keyCode, 
                KeyEvent event)
```

Called on the focused view when a key shortcut event is not handled.
Override this method to implement local key shortcuts for the View.
Key shortcuts can also be implemented by setting the
`https://developer.android.com/reference/android/view/MenuItem#setShortcut(char,%20char)` property of menu items.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: The value in event.getKeyCode(). <br /> |
| `event` | `KeyEvent`: Description of the key event. <br /> |

| Returns ||
|---|---|
| `boolean` | If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false. <br /> |

### onKeyUp

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyUp (int keyCode, 
                KeyEvent event)
```

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)`: perform clicking of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SPACE` is released.

Key presses in software keyboards will generally NOT trigger this listener,
although some may elect to do so in some situations. Do not rely on this to
catch software key presses.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: A key code that represents the button pressed, from `https://developer.android.com/reference/android/view/KeyEvent`. <br /> |
| `event` | `KeyEvent`: The KeyEvent object that defines the button action. <br /> |

| Returns ||
|---|---|
| `boolean` | If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false. <br /> |

### onPreDraw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onPreDraw ()
```

Callback method to be invoked when the view tree is about to be drawn. At this point, all
views in the tree have been measured and given a frame. Clients can use this to adjust
their scroll bounds or even to request a new layout before drawing occurs.

<br />

| Returns ||
|---|---|
| `boolean` | Return true to proceed with the current drawing pass, or false to cancel. <br /> |

### onPrivateIMECommand

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onPrivateIMECommand (String action, 
                Bundle data)
```

Called by the framework in response to a private command from the
current method, provided by it calling
`https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand(java.lang.String,%20android.os.Bundle)`.

<br />

| Parameters ||
|---|---|
| `action` | `String`: The action name of the command. <br /> |
| `data` | `Bundle`: Any additional data for the command. This may be null. <br /> |

| Returns ||
|---|---|
| `boolean` | Return true if you handled the command, else false. <br /> |

### onProvideContentCaptureNodeProperties

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void onProvideContentCaptureNodeProperties (ContentCaptureNodeProperties properties)
```

Populates the properties of this `https://developer.android.com/reference/android/view/View` for Content Capture version 2.

This method is called when a view that is eligible for content capture is initially
registered and appeared on the screen, or when its properties are explicitly requested to be
repopulated. The populated `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureNodeProperties` is subsequently sent to the
intelligence service through `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyNodeAppearedOrChanged(android.view.autofill.AutofillId,%20android.view.contentcapture.ContentCaptureNodeProperties)`.

The default implementation of this method computes and sets the most relevant properties,
such as the layout bounds relative to the nearest content-capture-important parent, the
parent's AutofillId, and the view's content description. Subclasses overriding this method
should call the super implementation
(`super.onProvideContentCaptureNodeProperties(properties)`) to populate these default
properties, and then modify them as appropriate.

**Note for Virtual Views:**Views that host a virtual view structure (such as web
pages) must only populate the node properties representing the host view itself and return
immediately. They must subsequently report virtual child node events on the main (UI) thread
by calling:

- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyNodeAppearedOrChanged(android.view.autofill.AutofillId,%20android.view.contentcapture.ContentCaptureNodeProperties)` when virtual nodes appear or their properties change
- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyNodeDisappeared(android.view.autofill.AutofillId)` when virtual nodes disappear

<br />

<br />

<br />

| Parameters ||
|---|---|
| `properties` | `ContentCaptureNodeProperties`: This value cannot be `null`. <br /> |

### onReceiveContent

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ContentInfo onReceiveContent (ContentInfo payload)
```

Default `https://developer.android.com/reference/android/widget/TextView` implementation for receiving content. Apps wishing to provide
custom behavior should configure a listener via `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)`.

For non-editable TextViews the default behavior is a no-op (returns the passed-in
content without acting on it).

For editable TextViews the default behavior is to insert text into the view, coercing
non-text content to text as needed. The MIME types "text/plain" and "text/html" have
well-defined behavior for this, while other MIME types have reasonable fallback behavior
(see `https://developer.android.com/reference/android/content/ClipData.Item#coerceToStyledText(android.content.Context)`).

<br />

| Parameters ||
|---|---|
| `payload` | `ContentInfo`: The content to insert and related metadata. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ContentInfo` | The portion of the passed-in content that was not handled (may be all, some, or none of the passed-in content). This value may be `null`. <br /> |

### onResolvePointerIcon

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PointerIcon onResolvePointerIcon (MotionEvent event, 
                int pointerIndex)
```

Resolve the pointer icon that should be used for specified pointer in the motion event.

The default implementation will resolve the pointer icon to one set using
`https://developer.android.com/reference/android/view/View#setPointerIcon(android.view.PointerIcon)` for mouse devices. Subclasses may override this to
customize the icon for the given pointer.

For example, to always show the PointerIcon.TYPE_HANDWRITING icon for a stylus pointer,
the event can be resolved in the following way:

    @Override
    public PointerIcon onResolvePointerIcon(MotionEvent event, int pointerIndex) {
        final int toolType = event.getToolType(pointerIndex);
        if (!event.isFromSource(InputDevice.SOURCE_MOUSE)
                && event.isFromSource(InputDevice.SOURCE_STYLUS)
                && (toolType == MotionEvent.TOOL_TYPE_STYLUS
                        || toolType == MotionEvent.TOOL_TYPE_ERASER)) {
            // Show this pointer icon only if this pointer is a stylus.
            return PointerIcon.getSystemIcon(mContext, PointerIcon.TYPE_HANDWRITING);
        }
        // Use the default logic for determining the pointer icon for other non-stylus pointers,
        // like for the mouse cursor.
        return super.onResolvePointerIcon(event, pointerIndex);
    }

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The `https://developer.android.com/reference/android/view/MotionEvent` that requires a pointer icon to be resolved for one of pointers. <br /> |
| `pointerIndex` | `int`: The index of the pointer in `event` for which to retrieve the `https://developer.android.com/reference/android/view/PointerIcon`. This will be between 0 and `https://developer.android.com/reference/android/view/MotionEvent#getPointerCount()`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/PointerIcon` | the pointer icon to use for specified pointer, or `null` if a pointer icon is not specified and the default icon should be used. <br /> |

### onRestoreInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onRestoreInstanceState (Parcelable state)
```

Hook allowing a view to re-apply a representation of its internal state that had previously
been generated by `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`. This function will never be called with a
null state.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `state` | `Parcelable`: The frozen state that had previously been returned by `https://developer.android.com/reference/android/widget/TextView#onSaveInstanceState()`. <br /> |

### onRtlPropertiesChanged

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onRtlPropertiesChanged (int layoutDirection)
```

Called when any RTL property (layout direction or text direction or text alignment) has
been changed.

Subclasses need to override this method to take care of cached information that depends on the
resolved layout direction, or to inform child views that inherit their layout direction.

The default implementation does nothing.

<br />

| Parameters ||
|---|---|
| `layoutDirection` | `int`: the direction of the layout. Value is one of the following: - `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR` - `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL` |

### onSaveInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Parcelable onSaveInstanceState ()
```

Hook allowing a view to generate a representation of its internal state
that can later be used to create a new instance with that same state.
This state should only contain information that is not persistent or can
not be reconstructed later. For example, you will never store your
current position on screen because that will be computed again when a
new instance of the view is placed in its view hierarchy.


Some examples of things you may store here: the current cursor position
in a text view (but usually not the text itself since that is stored in a
content provider or other persistent storage), the currently selected
item in a list view.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Parcelable` | Returns a Parcelable object containing the view's current dynamic state, or null if there is nothing interesting to save. <br /> |

### onScreenStateChanged

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onScreenStateChanged (int screenState)
```

This method is called whenever the state of the screen this view is
attached to changes. A state change will usually occurs when the screen
turns on or off (whether it happens automatically or the user does it
manually.)

<br />

| Parameters ||
|---|---|
| `screenState` | `int`: The new state of the screen. Can be either `https://developer.android.com/reference/android/view/View#SCREEN_STATE_ON` or `https://developer.android.com/reference/android/view/View#SCREEN_STATE_OFF` <br /> |

### onTextContextMenuItem

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onTextContextMenuItem (int id)
```

Called when a context menu option for the text view is selected. Currently
this will be one of `https://developer.android.com/reference/android/R.id#selectAll`, `https://developer.android.com/reference/android/R.id#cut`,
`https://developer.android.com/reference/android/R.id#copy`, `https://developer.android.com/reference/android/R.id#paste`,
`https://developer.android.com/reference/android/R.id#pasteAsPlainText` (starting at API level\\u202f23),
`https://developer.android.com/reference/android/R.id#lookUpText` (starting at API level 37) or
`https://developer.android.com/reference/android/R.id#shareText`.

<br />

| Parameters ||
|---|---|
| `id` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | true if the context menu item action was performed. <br /> |

### onTouchEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onTouchEvent (MotionEvent event)
```

Implement this method to handle pointer events.


This method is called to handle motion events where pointers are down on
the view. For example, this could include touchscreen touches, stylus
touches, or click-and-drag events from a mouse. However, it is not called
for motion events that do not involve pointers being down, such as hover
events or mouse scroll wheel movements.


If this method is used to detect click actions, it is recommended that
the actions be performed by implementing and calling
`https://developer.android.com/reference/android/view/View#performClick()`. This will ensure consistent system behavior,
including:

- obeying click sound preferences
- dispatching OnClickListener calls
- handling `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#ACTION_CLICK` when accessibility features are enabled

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

### onTrackballEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onTrackballEvent (MotionEvent event)
```

Implement this method to handle trackball motion events.


The *relative* movement of the trackball since the last event
can be retrieve with `https://developer.android.com/reference/android/view/MotionEvent#getX()` and
`https://developer.android.com/reference/android/view/MotionEvent#getY()`. These are normalized so
that a movement of 1 corresponds to the user pressing one DPAD key (so
they will often be fractional values, representing the more fine-grained
movement information available from a trackball).

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

### onVisibilityAggregated

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onVisibilityAggregated (boolean isVisible)
```

Called when the user-visibility of this View is potentially affected by a change
to this view itself, an ancestor view or the window this view is attached to.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `isVisible` | `boolean`: true if this view and all of its ancestors are `https://developer.android.com/reference/android/view/View#VISIBLE` and this view's window is also visible <br /> |

### onWindowFocusChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onWindowFocusChanged (boolean hasWindowFocus)
```

Called when the window containing this view gains or loses focus. Note
that this is separate from view focus: to receive key events, both
your view and its window must have focus. If a window is displayed
on top of yours that takes input focus, then your own window will lose
focus but the view focus will remain unchanged.

<br />

| Parameters ||
|---|---|
| `hasWindowFocus` | `boolean`: True if the window containing this view now has focus, false otherwise. <br /> |

### performLongClick

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performLongClick ()
```

Calls this view's OnLongClickListener, if it is defined. Invokes the
context menu if the OnLongClickListener did not consume the event.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if one of the above receivers consumed the event, `false` otherwise <br /> |

### removeTextChangedListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeTextChangedListener (TextWatcher watcher)
```

Removes the specified TextWatcher from the list of those whose
methods are called
whenever this TextView's text changes.

<br />

| Parameters ||
|---|---|
| `watcher` | `TextWatcher` <br /> |

### sendAccessibilityEventUnchecked

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void sendAccessibilityEventUnchecked (AccessibilityEvent event)
```

This method behaves exactly as `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)` but
takes as an argument an empty `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and does not
perform a check whether accessibility is enabled.


If an `https://developer.android.com/reference/android/view/View.AccessibilityDelegate` has been specified via calling
`https://developer.android.com/reference/android/view/View#setAccessibilityDelegate(android.view.View.AccessibilityDelegate)` its
`https://developer.android.com/reference/android/view/View.AccessibilityDelegate#sendAccessibilityEventUnchecked(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
is responsible for handling this call.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `AccessibilityEvent`: The event to send. <br /> |

### setAllCaps

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAllCaps (boolean allCaps)
```

Sets the properties of this field to transform input to ALL CAPS
display. This may use a "small caps" formatting if available.
This setting will be ignored if this field is editable or selectable.

This call replaces the current transformation method. Disabling this
will not necessarily restore the previous behavior from before this
was enabled.

<br />

**Related XML Attributes:**

- [android:textAllCaps](https://developer.android.com/reference/android/widget/TextView#attr_android:textAllCaps)

| Parameters ||
|---|---|
| `allCaps` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTransformationMethod(android.text.method.TransformationMethod)`

### setAutoLinkMask

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setAutoLinkMask (int mask)
```

Sets the autolink mask of the text. See `https://developer.android.com/reference/android/text/util/Linkify#ALL` and peers for
possible values.

**Note:**
`https://developer.android.com/reference/android/text/util/Linkify#MAP_ADDRESSES`
is deprecated and should be avoided; see its documentation.

<br />

**Related XML Attributes:**

- [android:autoLink](https://developer.android.com/reference/android/widget/TextView#attr_android:autoLink)

| Parameters ||
|---|---|
| `mask` | `int` <br /> |

### setAutoSizeTextTypeUniformWithConfiguration

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutoSizeTextTypeUniformWithConfiguration (int autoSizeMinTextSize, 
                int autoSizeMaxTextSize, 
                int autoSizeStepGranularity, 
                int unit)
```

Specify whether this widget should automatically scale the text to try to perfectly fit
within the layout bounds. If all the configuration params are valid the type of auto-size is
set to `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM`.

<br />

**Related XML Attributes:**

- [android:autoSizeTextType](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeTextType)
- [android:autoSizeMinTextSize](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMinTextSize)
- [android:autoSizeMaxTextSize](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeMaxTextSize)
- [android:autoSizeStepGranularity](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeStepGranularity)

| Parameters ||
|---|---|
| `autoSizeMinTextSize` | `int`: the minimum text size available for auto-size <br /> |
| `autoSizeMaxTextSize` | `int`: the maximum text size available for auto-size <br /> |
| `autoSizeStepGranularity` | `int`: the auto-size step granularity. It is used in conjunction with the minimum and maximum text size in order to build the set of text sizes the system uses to choose from when auto-sizing <br /> |
| `unit` | `int`: the desired dimension unit for all sizes above. See `https://developer.android.com/reference/android/util/TypedValue` for the possible dimension units <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if any of the configuration params are invalid. |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeWithDefaults(int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithPresetSizes(int[],%20int)`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeMinTextSize()`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeMaxTextSize()`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeStepGranularity()`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeTextAvailableSizes()`

### setAutoSizeTextTypeUniformWithPresetSizes

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutoSizeTextTypeUniformWithPresetSizes (int[] presetSizes, 
                int unit)
```

Specify whether this widget should automatically scale the text to try to perfectly fit
within the layout bounds. If at least one value from the `presetSizes` is valid
then the type of auto-size is set to `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM`.

<br />

**Related XML Attributes:**

- [android:autoSizeTextType](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeTextType)
- [android:autoSizePresetSizes](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizePresetSizes)

| Parameters ||
|---|---|
| `presetSizes` | `int`: an `int` array of sizes in pixels. This value cannot be `null`. <br /> |
| `unit` | `int`: the desired dimension unit for the preset sizes above. See `https://developer.android.com/reference/android/util/TypedValue` for the possible dimension units <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if all of the `presetSizes` are invalid. |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeWithDefaults(int)`
- `https://developer.android.com/reference/android/widget/TextView#setAutoSizeTextTypeUniformWithConfiguration(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeMinTextSize()`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeMaxTextSize()`
- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeTextAvailableSizes()`

### setAutoSizeTextTypeWithDefaults

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutoSizeTextTypeWithDefaults (int autoSizeTextType)
```

Specify whether this widget should automatically scale the text to try to perfectly fit
within the layout bounds by using the default auto-size configuration.

<br />

**Related XML Attributes:**

- [android:autoSizeTextType](https://developer.android.com/reference/android/widget/TextView#attr_android:autoSizeTextType)

| Parameters ||
|---|---|
| `autoSizeTextType` | `int`: the type of auto-size. Must be one of `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_NONE` or `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM` Value is one of the following: - `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_NONE` - `https://developer.android.com/reference/android/widget/TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM` |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if `autoSizeTextType` is none of the types above. |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getAutoSizeTextType()`

### setBreakStrategy

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBreakStrategy (int breakStrategy)
```

Sets the break strategy for breaking paragraphs into lines. The default value for
TextView is `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_HIGH_QUALITY`, and the default value for
EditText is `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_SIMPLE`, the latter to avoid the
text "dancing" when being edited.


Enabling hyphenation with either using `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` or
`https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` while line breaking is set to one of
`https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_BALANCED`, `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_HIGH_QUALITY`
improves the structure of text layout however has performance impact and requires more time
to do the text layout.


Compared with `https://developer.android.com/reference/android/widget/TextView#setLineBreakStyle(int)`, line break style with different strictness is
evaluated in the ICU to identify the potential breakpoints. In
`https://developer.android.com/reference/android/widget/TextView#setBreakStrategy(int)`, line break strategy handles the post processing of ICU's line
break result. It aims to evaluate ICU's breakpoints and break the lines based on the
constraint.

<br />

<br />

**Related XML Attributes:**

- [android:breakStrategy](https://developer.android.com/reference/android/widget/TextView#attr_android:breakStrategy)

| Parameters ||
|---|---|
| `breakStrategy` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_SIMPLE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_HIGH_QUALITY` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#BREAK_STRATEGY_BALANCED` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getBreakStrategy()`
- `https://developer.android.com/reference/android/widget/TextView#setHyphenationFrequency(int)`

### setCompoundDrawablePadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablePadding (int pad)
```

Sets the size of the padding between the compound drawables and
the text.

<br />

**Related XML Attributes:**

- [android:drawablePadding](https://developer.android.com/reference/android/widget/TextView#attr_android:drawablePadding)

| Parameters ||
|---|---|
| `pad` | `int` <br /> |

### setCompoundDrawableTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawableTintBlendMode (BlendMode blendMode)
```

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)` to the compound
drawables. The default mode is `https://developer.android.com/reference/android/graphics/PorterDuff.Mode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:drawableTintMode](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTintMode)

| Parameters ||
|---|---|
| `blendMode` | `BlendMode`: the blending mode used to apply the tint, may be `null` to clear tint <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintBlendMode(android.graphics.BlendMode)`

### setCompoundDrawableTintList

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawableTintList (ColorStateList tint)
```

Applies a tint to the compound drawables. Does not modify the
current tint mode, which is `https://developer.android.com/reference/android/graphics/BlendMode#SRC_IN` by default.


Subsequent calls to
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawables(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)`
and related methods will automatically mutate the drawables and apply
the specified tint and tint mode using
`https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintList(android.content.res.ColorStateList)`.

<br />

**Related XML Attributes:**

- [android:drawableTint](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTint)

| Parameters ||
|---|---|
| `tint` | `ColorStateList`: the tint to apply, may be `null` to clear tint <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getCompoundDrawableTintList()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintList(android.content.res.ColorStateList)`

### setCompoundDrawableTintMode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawableTintMode (PorterDuff.Mode tintMode)
```

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)` to the compound
drawables. The default mode is `https://developer.android.com/reference/android/graphics/PorterDuff.Mode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:drawableTintMode](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTintMode)

| Parameters ||
|---|---|
| `tintMode` | `PorterDuff.Mode`: the blending mode used to apply the tint, may be `null` to clear tint <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setCompoundDrawableTintList(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintMode(android.graphics.PorterDuff.Mode)`

### setCompoundDrawables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawables (Drawable left, 
                Drawable top, 
                Drawable right, 
                Drawable bottom)
```

Sets the Drawables (if any) to appear to the left of, above, to the
right of, and below the text. Use `null` if you do not want a
Drawable there. The Drawables must already have had
`https://developer.android.com/reference/android/graphics/drawable/Drawable#setBounds(android.graphics.Rect)` called.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelative(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableLeft)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableRight](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableRight)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `left` | `Drawable`: This value may be `null`. <br /> |
| `top` | `Drawable`: This value may be `null`. <br /> |
| `right` | `Drawable`: This value may be `null`. <br /> |
| `bottom` | `Drawable`: This value may be `null`. <br /> |

### setCompoundDrawablesRelative

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablesRelative (Drawable start, 
                Drawable top, 
                Drawable end, 
                Drawable bottom)
```

Sets the Drawables (if any) to appear to the start of, above, to the end
of, and below the text. Use `null` if you do not want a Drawable
there. The Drawables must already have had `https://developer.android.com/reference/android/graphics/drawable/Drawable#setBounds(android.graphics.Rect)`
called.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawables(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableStart](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableStart)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableEnd](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableEnd)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `start` | `Drawable`: This value may be `null`. <br /> |
| `top` | `Drawable`: This value may be `null`. <br /> |
| `end` | `Drawable`: This value may be `null`. <br /> |
| `bottom` | `Drawable`: This value may be `null`. <br /> |

### setCompoundDrawablesRelativeWithIntrinsicBounds

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablesRelativeWithIntrinsicBounds (Drawable start, 
                Drawable top, 
                Drawable end, 
                Drawable bottom)
```

Sets the Drawables (if any) to appear to the start of, above, to the end
of, and below the text. Use `null` if you do not want a Drawable
there. The Drawables' bounds will be set to their intrinsic bounds.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawables(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableStart](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableStart)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableEnd](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableEnd)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `start` | `Drawable`: This value may be `null`. <br /> |
| `top` | `Drawable`: This value may be `null`. <br /> |
| `end` | `Drawable`: This value may be `null`. <br /> |
| `bottom` | `Drawable`: This value may be `null`. <br /> |

### setCompoundDrawablesRelativeWithIntrinsicBounds

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablesRelativeWithIntrinsicBounds (int start, 
                int top, 
                int end, 
                int bottom)
```

Sets the Drawables (if any) to appear to the start of, above, to the end
of, and below the text. Use 0 if you do not want a Drawable there. The
Drawables' bounds will be set to their intrinsic bounds.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawables(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableStart](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableStart)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableEnd](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableEnd)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `start` | `int`: Resource identifier of the start Drawable. <br /> |
| `top` | `int`: Resource identifier of the top Drawable. <br /> |
| `end` | `int`: Resource identifier of the end Drawable. <br /> |
| `bottom` | `int`: Resource identifier of the bottom Drawable. <br /> |

### setCompoundDrawablesWithIntrinsicBounds

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablesWithIntrinsicBounds (Drawable left, 
                Drawable top, 
                Drawable right, 
                Drawable bottom)
```

Sets the Drawables (if any) to appear to the left of, above, to the
right of, and below the text. Use `null` if you do not want a
Drawable there. The Drawables' bounds will be set to their intrinsic
bounds.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelative(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableLeft)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableRight](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableRight)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `left` | `Drawable`: This value may be `null`. <br /> |
| `top` | `Drawable`: This value may be `null`. <br /> |
| `right` | `Drawable`: This value may be `null`. <br /> |
| `bottom` | `Drawable`: This value may be `null`. <br /> |

### setCompoundDrawablesWithIntrinsicBounds

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCompoundDrawablesWithIntrinsicBounds (int left, 
                int top, 
                int right, 
                int bottom)
```

Sets the Drawables (if any) to appear to the left of, above, to the
right of, and below the text. Use 0 if you do not want a Drawable there.
The Drawables' bounds will be set to their intrinsic bounds.


Calling this method will overwrite any Drawables previously set using
`https://developer.android.com/reference/android/widget/TextView#setCompoundDrawablesRelative(android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable,%20android.graphics.drawable.Drawable)` or related methods.

<br />

**Related XML Attributes:**

- [android:drawableLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableLeft)
- [android:drawableTop](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableTop)
- [android:drawableRight](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableRight)
- [android:drawableBottom](https://developer.android.com/reference/android/widget/TextView#attr_android:drawableBottom)

| Parameters ||
|---|---|
| `left` | `int`: Resource identifier of the left Drawable. <br /> |
| `top` | `int`: Resource identifier of the top Drawable. <br /> |
| `right` | `int`: Resource identifier of the right Drawable. <br /> |
| `bottom` | `int`: Resource identifier of the bottom Drawable. <br /> |

### setCursorVisible

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCursorVisible (boolean visible)
```

Set whether the cursor is visible. The default is true. Note that this property only
makes sense for editable TextView. If IME is consuming the input, the cursor will always be
invisible, visibility will be updated as the last state when IME does not consume
the input anymore.

<br />

**Related XML Attributes:**

- [android:cursorVisible](https://developer.android.com/reference/android/widget/TextView#attr_android:cursorVisible)

| Parameters ||
|---|---|
| `visible` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#isCursorVisible()`

### setCustomInsertionActionModeCallback

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCustomInsertionActionModeCallback (ActionMode.Callback actionModeCallback)
```

If provided, this ActionMode.Callback will be used to create the ActionMode when text
insertion is initiated in this View.
The standard implementation populates the menu with a subset of Select All,
Paste and Replace actions, depending on what this View supports.

A custom implementation can add new entries in the default menu in its
`https://developer.android.com/reference/android/view/ActionMode.Callback#onPrepareActionMode(android.view.ActionMode,%20android.view.Menu)` method. The default actions can also be removed from the menu using
`https://developer.android.com/reference/android/view/Menu#removeItem(int)` and passing `https://developer.android.com/reference/android/R.id#selectAll`,
`https://developer.android.com/reference/android/R.id#paste`, `https://developer.android.com/reference/android/R.id#pasteAsPlainText` (starting at API
level\\u202f23) or `https://developer.android.com/reference/android/R.id#replaceText` ids as parameters.

Returning false from
`https://developer.android.com/reference/android/view/ActionMode.Callback#onCreateActionMode(android.view.ActionMode,%20android.view.Menu)` will prevent the action mode from being started.

Action click events should be handled by the custom implementation of
`https://developer.android.com/reference/android/view/ActionMode.Callback#onActionItemClicked(android.view.ActionMode,%20android.view.MenuItem)`.

Note that text insertion mode is not started when a TextView receives focus and the
`https://developer.android.com/reference/android/R.attr#selectAllOnFocus` flag has been set.

<br />

<br />

| Parameters ||
|---|---|
| `actionModeCallback` | `ActionMode.Callback` <br /> |

### setCustomSelectionActionModeCallback

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCustomSelectionActionModeCallback (ActionMode.Callback actionModeCallback)
```

If provided, this ActionMode.Callback will be used to create the ActionMode when text
selection is initiated in this View.

The standard implementation populates the menu with a subset of Select All, Cut, Copy,
Paste, Replace and Share actions, depending on what this View supports.

A custom implementation can add new entries in the default menu in its
`https://developer.android.com/reference/android/view/ActionMode.Callback#onPrepareActionMode(android.view.ActionMode,%20android.view.Menu)`
method. The default actions can also be removed from the menu using
`https://developer.android.com/reference/android/view/Menu#removeItem(int)` and passing `https://developer.android.com/reference/android/R.id#selectAll`,
`https://developer.android.com/reference/android/R.id#cut`, `https://developer.android.com/reference/android/R.id#copy`, `https://developer.android.com/reference/android/R.id#paste`,
`https://developer.android.com/reference/android/R.id#pasteAsPlainText` (starting at API level\\u202f23),
`https://developer.android.com/reference/android/R.id#lookUpText` (starting at API level\\u202f37),
`https://developer.android.com/reference/android/R.id#replaceText` or `https://developer.android.com/reference/android/R.id#shareText` ids as parameters.

Returning false from
`https://developer.android.com/reference/android/view/ActionMode.Callback#onCreateActionMode(android.view.ActionMode,%20android.view.Menu)`
will prevent the action mode from being started.

Action click events should be handled by the custom implementation of
`https://developer.android.com/reference/android/view/ActionMode.Callback#onActionItemClicked(android.view.ActionMode,%20android.view.MenuItem)`.

Note that text selection mode is not started when a TextView receives focus and the
`https://developer.android.com/reference/android/R.attr#selectAllOnFocus` flag has been set. The content is highlighted in
that case, to allow for quick replacement.

<br />

| Parameters ||
|---|---|
| `actionModeCallback` | `ActionMode.Callback` <br /> |

### setEditableFactory

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setEditableFactory (Editable.Factory factory)
```

Sets the Factory used to create new `https://developer.android.com/reference/android/text/Editable`.

<br />

| Parameters ||
|---|---|
| `factory` | `Editable.Factory`: `https://developer.android.com/reference/android/text/Editable.Factory` to be used <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Editable.Factory`
- `https://developer.android.com/reference/android/widget/TextView.BufferType#EDITABLE`

### setElegantTextHeight

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setElegantTextHeight (boolean elegant)
```

Set the TextView's elegant height metrics flag. This setting selects font
variants that have not been compacted to fit Latin-based vertical
metrics, and also increases top and bottom bounds to provide more space.

<br />

**Related XML Attributes:**

- [android:elegantTextHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:elegantTextHeight)

| Parameters ||
|---|---|
| `elegant` | `boolean`: set the paint's elegant metrics flag. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#isElegantTextHeight()`
- `https://developer.android.com/reference/android/graphics/Paint#isElegantTextHeight()`

### setEllipsize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setEllipsize (TextUtils.TruncateAt where)
```

Causes words in the text that are longer than the view's width
to be ellipsized instead of broken in the middle. You may also
want to `https://developer.android.com/reference/android/widget/TextView#setSingleLine()` or `https://developer.android.com/reference/android/widget/TextView#setHorizontallyScrolling(boolean)`
to constrain the text to a single line. Use `null`
to turn off ellipsizing.

If `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)` has been used to set two or more lines,
only `https://developer.android.com/reference/android/text/TextUtils.TruncateAt#END` and
`https://developer.android.com/reference/android/text/TextUtils.TruncateAt#MARQUEE` are supported
(other ellipsizing types will not do anything).

<br />

**Related XML Attributes:**

- [android:ellipsize](https://developer.android.com/reference/android/widget/TextView#attr_android:ellipsize)

| Parameters ||
|---|---|
| `where` | `TextUtils.TruncateAt` <br /> |

### setEms

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setEms (int ems)
```

Sets the width of the TextView to be exactly `ems` wide.

This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous minimum/maximum configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMinEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)`.

<br />

**Related XML Attributes:**

- [android:ems](https://developer.android.com/reference/android/widget/TextView#attr_android:ems)

| Parameters ||
|---|---|
| `ems` | `int`: the exact width of the TextView in terms of ems <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

### setEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setEnabled (boolean enabled)
```

Set the enabled state of this view. The interpretation of the enabled
state varies by subclass.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: True if this view is enabled, false otherwise. <br /> |

### setError

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setError (CharSequence error)
```

Sets the right-hand compound drawable of the TextView to the "error"
icon and sets an error message that will be displayed in a popup when
the TextView has focus. The icon and error message will be reset to
null when any key events cause changes to the TextView's text. If the
`error` is `null`, the error message and icon
will be cleared.

<br />

| Parameters ||
|---|---|
| `error` | `CharSequence` <br /> |

### setError

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setError (CharSequence error, 
                Drawable icon)
```

Sets the right-hand compound drawable of the TextView to the specified
icon and sets an error message that will be displayed in a popup when
the TextView has focus. The icon and error message will be reset to
null when any key events cause changes to the TextView's text. The
drawable must already have had `https://developer.android.com/reference/android/graphics/drawable/Drawable#setBounds(android.graphics.Rect)` set on it.
If the `error` is `null`, the error message will
be cleared (and you should provide a `null` icon as well).

<br />

| Parameters ||
|---|---|
| `error` | `CharSequence` <br /> |
| `icon` | `Drawable` <br /> |

### setExtractedText

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setExtractedText (ExtractedText text)
```

Apply to this text view the given extracted text, as previously
returned by `https://developer.android.com/reference/android/widget/TextView#extractText(android.view.inputmethod.ExtractedTextRequest,%20android.view.inputmethod.ExtractedText)`.

<br />

| Parameters ||
|---|---|
| `text` | `ExtractedText` <br /> |

### setFallbackLineSpacing

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFallbackLineSpacing (boolean enabled)
```

Set whether to respect the ascent and descent of the fallback fonts that are used in
displaying the text (which is needed to avoid text from consecutive lines running into
each other). If set, fallback fonts that end up getting used can increase the ascent
and descent of the lines that they are used on.

<br />

It is required to be true if text could be in languages like Burmese or Tibetan where text is typically much taller or deeper than Latin text.

<br />

<br />

**Related XML Attributes:**

- [android:fallbackLineSpacing](https://developer.android.com/reference/android/widget/TextView#attr_android:fallbackLineSpacing)

| Parameters ||
|---|---|
| `enabled` | `boolean`: whether to expand linespacing based on fallback fonts, `true` by default <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseLineSpacingFromFallbacks(boolean)`

### setFilters

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFilters (InputFilter[] filters)
```

Sets the list of input filters that will be used if the buffer is
Editable. Has no effect otherwise.

<br />

**Related XML Attributes:**

- [android:maxLength](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLength)

| Parameters ||
|---|---|
| `filters` | `InputFilter` <br /> |

### setFirstBaselineToTopHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFirstBaselineToTopHeight (int firstBaselineToTopHeight)
```

Updates the top padding of the TextView so that `firstBaselineToTopHeight` is
the distance between the top of the TextView and first line's baseline.


![](https://developer.android.com/static/reference/android/images/text/widget/first_last_baseline.png)
First and last baseline metrics for a TextView. **Note** that if `FontMetrics.top` or `FontMetrics.ascent` was already greater than `firstBaselineToTopHeight`, the top padding is not updated. Moreover since this function sets the top padding, if the height of the TextView is less than the sum of top padding, line height and bottom padding, top of the line will be pushed down and bottom will be clipped.

<br />

<br />

**Related XML Attributes:**

- [android:firstBaselineToTopHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:firstBaselineToTopHeight)

| Parameters ||
|---|---|
| `firstBaselineToTopHeight` | `int`: distance between first baseline to top of the container in pixels. The units of this value are pixels. Value is 0 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getFirstBaselineToTopHeight()`
- `https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setPadding(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setPaddingRelative(int,%20int,%20int,%20int)`

### setFocusedSearchResultHighlightColor

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusedSearchResultHighlightColor (int color)
```

Sets focused search result highlight color.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Parameters ||
|---|---|
| `color` | `int`: a focused search result highlight color. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### setFocusedSearchResultIndex

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusedSearchResultIndex (int index)
```

Sets the focused search result index.

The focused search result is drawn in a focused color.
Calling `https://developer.android.com/reference/android/widget/TextView#FOCUSED_SEARCH_RESULT_INDEX_NONE` for clearing focused search result.

This method must be called after setting search result ranges by
`https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Parameters ||
|---|---|
| `index` | `int`: a focused search index or `https://developer.android.com/reference/android/widget/TextView#FOCUSED_SEARCH_RESULT_INDEX_NONE` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### setFontFeatureSettings

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFontFeatureSettings (String fontFeatureSettings)
```

Sets font feature settings. The format is the same as the CSS
font-feature-settings attribute:
<https://www.w3.org/TR/css-fonts-3/#font-feature-settings-prop>

<br />

**Related XML Attributes:**

- [android:fontFeatureSettings](https://developer.android.com/reference/android/widget/TextView#attr_android:fontFeatureSettings)

| Parameters ||
|---|---|
| `fontFeatureSettings` | `String`: font feature settings represented as CSS compatible string. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getFontFeatureSettings()`
- `https://developer.android.com/reference/android/graphics/Paint#getFontFeatureSettings()`

### setFontVariationSettings

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean setFontVariationSettings (String fontVariationSettings)
```

Sets TrueType or OpenType font variation settings. The settings string is constructed from
multiple pairs of axis tag and style values. The axis tag must contain four ASCII characters
and must be wrapped with single quotes (U+0027) or double quotes (U+0022). Axis strings that
are longer or shorter than four characters, or contain characters outside of U+0020..U+007E
are invalid. If a specified axis name is not defined in the font, the settings will be
ignored.


Examples,

- Set font width to 150.


        TextView textView = (TextView) findViewById(R.id.textView);
        textView.setFontVariationSettings("'wdth' 150");

- Set the font slant to 20 degrees and ask for italic style.


        TextView textView = (TextView) findViewById(R.id.textView);
        textView.setFontVariationSettings("'slnt' 20, 'ital' 1");

  <br />

<br />

<br />

**Related XML Attributes:**

- [android:fontVariationSettings](https://developer.android.com/reference/android/widget/TextView#attr_android:fontVariationSettings)

| Parameters ||
|---|---|
| `fontVariationSettings` | `String`: font variation settings. You can pass null or empty string as no variation settings. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the given settings is effective to at least one font file underlying this TextView. This function also returns true for empty settings string. Otherwise returns false. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If given string is not a valid font variation settings format. |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getFontVariationSettings()`
- `https://developer.android.com/reference/android/graphics/fonts/FontVariationAxis`

### setFreezesText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFreezesText (boolean freezesText)
```

Control whether this text view saves its entire text contents when
freezing to an icicle, in addition to dynamic state such as cursor
position. By default this is false, not saving the text. Set to true
if the text in the text view is not being saved somewhere else in
persistent storage (such as in a content provider) so that if the
view is later thawed the user will not lose their data. For
`https://developer.android.com/reference/android/widget/EditText` it is always enabled, regardless of
the value of the attribute.

<br />

**Related XML Attributes:**

- [android:freezesText](https://developer.android.com/reference/android/widget/TextView#attr_android:freezesText)

| Parameters ||
|---|---|
| `freezesText` | `boolean`: Controls whether a frozen icicle should include the entire text data: true to include it, false to not. <br /> |

### setGravity

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setGravity (int gravity)
```

Sets the horizontal alignment of the text and the
vertical gravity that will be used when there is extra space
in the TextView beyond what is required for the text itself.

<br />

**Related XML Attributes:**

- [android:gravity](https://developer.android.com/reference/android/widget/TextView#attr_android:gravity)

| Parameters ||
|---|---|
| `gravity` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Gravity`

### setHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHeight (int pixels)
```

Sets the height of the TextView to be exactly `pixels` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides previous minimum/maximum height configurations
such as `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)`.

<br />

**Related XML Attributes:**

- [android:height](https://developer.android.com/reference/android/widget/TextView#attr_android:height)

| Parameters ||
|---|---|
| `pixels` | `int`: the exact height of the TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### setHighlightColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHighlightColor (int color)
```

Sets the color used to display the selection highlight.

<br />

**Related XML Attributes:**

- [android:textColorHighlight](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHighlight)

| Parameters ||
|---|---|
| `color` | `int` <br /> |

### setHighlights

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHighlights (Highlights highlights)
```

Set Highlights

<br />

| Parameters ||
|---|---|
| `highlights` | `Highlights`: A highlight object. Call with null for reset. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getHighlights()`
- `https://developer.android.com/reference/android/text/Highlights`

### setHint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setHint (CharSequence hint)
```

Sets the text to be displayed when the text of the TextView is empty.
Null means to use the normal empty text. The hint does not currently
participate in determining the size of the view.

<br />

**Related XML Attributes:**

- [android:hint](https://developer.android.com/reference/android/widget/TextView#attr_android:hint)

| Parameters ||
|---|---|
| `hint` | `CharSequence` <br /> |

### setHint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setHint (int resid)
```

Sets the text to be displayed when the text of the TextView is empty,
from a resource.

<br />

**Related XML Attributes:**

- [android:hint](https://developer.android.com/reference/android/widget/TextView#attr_android:hint)

| Parameters ||
|---|---|
| `resid` | `int` <br /> |

### setHintTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setHintTextColor (ColorStateList colors)
```

Sets the color of the hint text.

<br />

**Related XML Attributes:**

- [android:textColorHint](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHint)

| Parameters ||
|---|---|
| `colors` | `ColorStateList` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getHintTextColors()`
- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)`

### setHintTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setHintTextColor (int color)
```

Sets the color of the hint text for all the states (disabled, focussed, selected...) of this
TextView.

<br />

**Related XML Attributes:**

- [android:textColorHint](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorHint)

| Parameters ||
|---|---|
| `color` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#getHintTextColors()`
- `https://developer.android.com/reference/android/widget/TextView#setTextColor(int)`

### setHorizontallyScrolling

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHorizontallyScrolling (boolean whether)
```

Sets whether the text should be allowed to be wider than the
View is. If false, it will be wrapped to the width of the View.

<br />

**Related XML Attributes:**

- [android:scrollHorizontally](https://developer.android.com/reference/android/widget/TextView#attr_android:scrollHorizontally)

| Parameters ||
|---|---|
| `whether` | `boolean` <br /> |

### setHyphenationFrequency

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHyphenationFrequency (int hyphenationFrequency)
```

Sets the frequency of automatic hyphenation to use when determining word breaks.
The default value for both TextView and `https://developer.android.com/reference/android/widget/EditText` is
`https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE`. Note that the default hyphenation frequency value
is set from the theme.

<br />

Enabling hyphenation with either using `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` or `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` while line breaking is set to one of `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_BALANCED`, `https://developer.android.com/reference/android/text/Layout#BREAK_STRATEGY_HIGH_QUALITY` improves the structure of text layout however has performance impact and requires more time to do the text layout.

<br />

Note: Before Android Q, in the theme hyphenation frequency is set to `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL`. The default value is changed into `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE` on Q.

<br />

<br />

**Related XML Attributes:**

- [android:hyphenationFrequency](https://developer.android.com/reference/android/widget/TextView#attr_android:hyphenationFrequency)

| Parameters ||
|---|---|
| `hyphenationFrequency` | `int`: the hyphenation frequency to use, one of `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE`, `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL`, `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` Value is one of the following: - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_FULL_FAST` - `https://developer.android.com/reference/android/text/Layout#HYPHENATION_FREQUENCY_NONE` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getHyphenationFrequency()`
- `https://developer.android.com/reference/android/widget/TextView#getBreakStrategy()`

### setImeActionLabel

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImeActionLabel (CharSequence label, 
                int actionId)
```

Change the custom IME action associated with the text view, which
will be reported to an IME with `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionLabel`
and `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#actionId` when it has focus.

<br />

**Related XML Attributes:**

- [android:imeActionLabel](https://developer.android.com/reference/android/widget/TextView#attr_android:imeActionLabel)
- [android:imeActionId](https://developer.android.com/reference/android/widget/TextView#attr_android:imeActionId)

| Parameters ||
|---|---|
| `label` | `CharSequence` <br /> |
| `actionId` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getImeActionLabel()`
- `https://developer.android.com/reference/android/widget/TextView#getImeActionId()`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`

### setImeHintLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImeHintLocales (LocaleList hintLocales)
```

Change "hint" locales associated with the text view, which will be reported to an IME with
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#hintLocales` when it has focus.

Starting with Android O, this also causes internationalized listeners to be created (or
change locale) based on the first locale in the input locale list.

**Note:** If you want new "hint" to take effect immediately you need to
call `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#restartInput(android.view.View)`.

<br />

<br />

| Parameters ||
|---|---|
| `hintLocales` | `LocaleList`: List of the languages that the user is supposed to switch to no matter what input method subtype is currently used. Set `null` to clear the current "hint". <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getImeHintLocales()`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#hintLocales`

### setImeOptions

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImeOptions (int imeOptions)
```

Change the editor type integer associated with the text view, which
is reported to an Input Method Editor (IME) with `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#imeOptions`
when it has focus.

<br />

**Related XML Attributes:**

- [android:imeOptions](https://developer.android.com/reference/android/widget/TextView#attr_android:imeOptions)

| Parameters ||
|---|---|
| `imeOptions` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getImeOptions()`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo`

### setIncludeFontPadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIncludeFontPadding (boolean includepad)
```

Set whether the TextView includes extra top and bottom padding to make
room for accents that go above the normal ascent and descent.
The default is true.

<br />

**Related XML Attributes:**

- [android:includeFontPadding](https://developer.android.com/reference/android/widget/TextView#attr_android:includeFontPadding)

| Parameters ||
|---|---|
| `includepad` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getIncludeFontPadding()`

### setInputExtras

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setInputExtras (int xmlResId)
```

Set the extra input data of the text, which is the
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#extras`
Bundle that will be filled in when creating an input connection. The
given integer is the resource identifier of an XML resource holding an
`https://developer.android.com/reference/android/R.styleable#InputExtras` XML tree.

<br />

**Related XML Attributes:**

- [android:editorExtras](https://developer.android.com/reference/android/widget/TextView#attr_android:editorExtras)

| Parameters ||
|---|---|
| `xmlResId` | `int` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/io/IOException` |   |
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException` |   |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getInputExtras(boolean)`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#extras`

### setInputType

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setInputType (int type)
```

Set the type of the content with a constant as defined for `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#inputType`. This
will take care of changing the key listener, by calling `https://developer.android.com/reference/android/widget/TextView#setKeyListener(android.text.method.KeyListener)`,
to match the given content type. If the given content type is `https://developer.android.com/reference/android/text/InputType#TYPE_NULL`
then a soft keyboard will not be displayed for this text view.

Note that the maximum number of displayed lines (see `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)`) will be
modified if you change the `https://developer.android.com/reference/android/text/InputType#TYPE_TEXT_FLAG_MULTI_LINE` flag of the input
type.

<br />

**Related XML Attributes:**

- [android:inputType](https://developer.android.com/reference/android/widget/TextView#attr_android:inputType)

| Parameters ||
|---|---|
| `type` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getInputType()`
- `https://developer.android.com/reference/android/widget/TextView#setRawInputType(int)`
- `https://developer.android.com/reference/android/text/InputType`

### setJustificationMode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setJustificationMode (int justificationMode)
```

Set justification mode. The default value is `https://developer.android.com/reference/android/text/Layout#JUSTIFICATION_MODE_NONE`. If the
last line is too short for justification, the last line will be displayed with the
alignment set by `https://developer.android.com/reference/android/view/View#setTextAlignment(int)`.

<br />

| Parameters ||
|---|---|
| `justificationMode` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_WORD` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_CHARACTER` |

| Returns ||
|---|---|
| `void` | Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_WORD` - `https://developer.android.com/reference/android/graphics/text/LineBreaker#JUSTIFICATION_MODE_INTER_CHARACTER` |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getJustificationMode()`

### setKeyListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setKeyListener (KeyListener input)
```

Sets the key listener to be used with this TextView. This can be null
to disallow user input. Note that this method has significant and
subtle interactions with soft keyboards and other input method:
see `https://developer.android.com/reference/android/text/method/KeyListener#getInputType()`
for important details. Calling this method will replace the current
content type of the text view with the content type returned by the
key listener.


Be warned that if you want a TextView with a key listener or movement
method not to be focusable, or if you want a TextView without a
key listener or movement method to be focusable, you must call
`https://developer.android.com/reference/android/view/View#setFocusable(boolean)` again after calling this to get the focusability
back the way you want it.

<br />

**Related XML Attributes:**

- [android:numeric](https://developer.android.com/reference/android/widget/TextView#attr_android:numeric)
- [android:digits](https://developer.android.com/reference/android/widget/TextView#attr_android:digits)
- [android:phoneNumber](https://developer.android.com/reference/android/widget/TextView#attr_android:phoneNumber)
- [android:inputMethod](https://developer.android.com/reference/android/widget/TextView#attr_android:inputMethod)
- [android:capitalize](https://developer.android.com/reference/android/widget/TextView#attr_android:capitalize)
- [android:autoText](https://developer.android.com/reference/android/widget/TextView#attr_android:autoText)

| Parameters ||
|---|---|
| `input` | `KeyListener` <br /> |

### setLastBaselineToBottomHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLastBaselineToBottomHeight (int lastBaselineToBottomHeight)
```

Updates the bottom padding of the TextView so that `lastBaselineToBottomHeight` is
the distance between the bottom of the TextView and the last line's baseline.


![](https://developer.android.com/static/reference/android/images/text/widget/first_last_baseline.png)
First and last baseline metrics for a TextView. **Note** that if `FontMetrics.bottom` or `FontMetrics.descent` was already greater than `lastBaselineToBottomHeight`, the bottom padding is not updated. Moreover since this function sets the bottom padding, if the height of the TextView is less than the sum of top padding, line height and bottom padding, bottom of the text will be clipped.

<br />

<br />

**Related XML Attributes:**

- [android:lastBaselineToBottomHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:lastBaselineToBottomHeight)

| Parameters ||
|---|---|
| `lastBaselineToBottomHeight` | `int`: distance between last baseline to bottom of the container in pixels. The units of this value are pixels. Value is 0 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getLastBaselineToBottomHeight()`
- `https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setPadding(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/widget/TextView#setPaddingRelative(int,%20int,%20int,%20int)`

### setLetterSpacing

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLetterSpacing (float letterSpacing)
```

Sets text letter-spacing in em units. Typical values
for slight expansion will be around 0.05. Negative values tighten text.

<br />

**Related XML Attributes:**

- [android:letterSpacing](https://developer.android.com/reference/android/widget/TextView#attr_android:letterSpacing)

| Parameters ||
|---|---|
| `letterSpacing` | `float`: A text letter-space value in ems. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getLetterSpacing()`
- `https://developer.android.com/reference/android/graphics/Paint#getLetterSpacing()`

### setLineBreakStyle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLineBreakStyle (int lineBreakStyle)
```

Sets the line-break style for text wrapping.

Line-break style specifies the line-break strategies that can be used
for text wrapping. The line-break style affects rule-based line breaking
by specifying the strictness of line-breaking rules.

The following are types of line-break styles:

- `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_LOOSE`
- `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NORMAL`
- `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_STRICT`

The default line-break style is
`https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NONE`, which specifies that no
line-breaking rules are used.

See the
[line-break property](https://www.w3.org/TR/css-text-3/#line-break-property) for more information.

<br />

| Parameters ||
|---|---|
| `lineBreakStyle` | `int`: The line-break style for the text. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_LOOSE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NORMAL` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_STRICT` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_UNSPECIFIED` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_NO_BREAK` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_STYLE_AUTO` |

### setLineBreakWordStyle

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLineBreakWordStyle (int lineBreakWordStyle)
```

Sets the line-break word style for text wrapping.

The line-break word style affects dictionary-based line breaking by
providing phrase-based line-breaking opportunities. Use
`https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_PHRASE` to specify
phrase-based line breaking.

The default line-break word style is
`https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_NONE`, which specifies that
no line-breaking word style is used.

See the
[word-break property](https://www.w3.org/TR/css-text-3/#word-break-property) for more information.

<br />

| Parameters ||
|---|---|
| `lineBreakWordStyle` | `int`: The line-break word style for the text. Value is one of the following: - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_NONE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_PHRASE` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_UNSPECIFIED` - `https://developer.android.com/reference/android/graphics/text/LineBreakConfig#LINE_BREAK_WORD_STYLE_AUTO` |

### setLineHeight

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLineHeight (int unit, 
                float lineHeight)
```

Sets an explicit line height to a given unit and value for this TextView. This is equivalent
to the vertical distance between subsequent baselines in the TextView. See `https://developer.android.com/reference/android/util/TypedValue` for the possible dimension units.

<br />

**Related XML Attributes:**

- [android:lineHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:lineHeight)

| Parameters ||
|---|---|
| `unit` | `int`: The desired dimension unit. SP units are strongly recommended so that line height stays proportional to the text size when fonts are scaled up for accessibility. Value is one of the following: - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PX` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_DIP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_SP` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_PT` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_IN` - `https://developer.android.com/reference/android/util/TypedValue#COMPLEX_UNIT_MM` |
| `lineHeight` | `float`: The desired line height in the given units. Value is 0.0f or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/widget/TextView#getLineSpacingExtra()`

### setLineHeight

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLineHeight (int lineHeight)
```

Sets an explicit line height for this TextView. This is equivalent to the vertical distance
between subsequent baselines in the TextView.

<br />

**Related XML Attributes:**

- [android:lineHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:lineHeight)

| Parameters ||
|---|---|
| `lineHeight` | `int`: the line height in pixels. The units of this value are pixels. Value is 0 or greater <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLineSpacing(float,%20float)`
- `https://developer.android.com/reference/android/widget/TextView#getLineSpacingExtra()`

### setLineSpacing

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLineSpacing (float add, 
                float mult)
```

Sets line spacing for this TextView. Each line other than the last line will have its height
multiplied by `mult` and have `add` added to it.

<br />

**Related XML Attributes:**

- [android:lineSpacingExtra](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingExtra)
- [android:lineSpacingMultiplier](https://developer.android.com/reference/android/widget/TextView#attr_android:lineSpacingMultiplier)

| Parameters ||
|---|---|
| `add` | `float`: The value in pixels that should be added to each line other than the last line. This will be applied after the multiplier <br /> |
| `mult` | `float`: The value by which each line height other than the last line will be multiplied by <br /> |

### setLines

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLines (int lines)
```

Sets the height of the TextView to be exactly `lines` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides previous minimum/maximum height configurations
such as `https://developer.android.com/reference/android/widget/TextView#setMinLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)`. `https://developer.android.com/reference/android/widget/TextView#setSingleLine()` will
set this value to 1.

<br />

**Related XML Attributes:**

- [android:lines](https://developer.android.com/reference/android/widget/TextView#attr_android:lines)

| Parameters ||
|---|---|
| `lines` | `int`: the exact height of the TextView in terms of lines <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### setLinkTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setLinkTextColor (ColorStateList colors)
```

Sets the color of links in the text.

<br />

**Related XML Attributes:**

- [android:textColorLink](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorLink)

| Parameters ||
|---|---|
| `colors` | `ColorStateList` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getLinkTextColors()`
- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(android.content.res.ColorStateList)`

### setLinkTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setLinkTextColor (int color)
```

Sets the color of links in the text.

<br />

**Related XML Attributes:**

- [android:textColorLink](https://developer.android.com/reference/android/widget/TextView#attr_android:textColorLink)

| Parameters ||
|---|---|
| `color` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#getLinkTextColors()`

### setLinksClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setLinksClickable (boolean whether)
```

Sets whether the movement method will automatically be set to
`https://developer.android.com/reference/android/text/method/LinkMovementMethod` if `https://developer.android.com/reference/android/widget/TextView#setAutoLinkMask(int)` has been
set to nonzero and links are detected in `https://developer.android.com/reference/android/widget/TextView#setText(char[],%20int,%20int)`.
The default is true.

<br />

**Related XML Attributes:**

- [android:linksClickable](https://developer.android.com/reference/android/widget/TextView#attr_android:linksClickable)

| Parameters ||
|---|---|
| `whether` | `boolean` <br /> |

### setLocalePreferredLineHeightForMinimumUsed

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLocalePreferredLineHeightForMinimumUsed (boolean flag)
```

Set true if the locale preferred line height is used for the minimum line height.

By setting this flag to true is equivalenet to call
`https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)` with the one obtained by
`https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)`.

If custom minimum line height was specified by
`https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`, this flag will be ignored.

<br />

| Parameters ||
|---|---|
| `flag` | `boolean`: true for using locale preferred line height for the minimum line height. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#isLocalePreferredLineHeightForMinimumUsed()`
- `https://developer.android.com/reference/android/widget/TextView#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/widget/TextView#getMinimumFontMetrics()`

### setMarqueeRepeatLimit

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMarqueeRepeatLimit (int marqueeLimit)
```

Sets how many times to repeat the marquee animation. Only applied if the
TextView has marquee enabled. Set to -1 to repeat indefinitely.

<br />

**Related XML Attributes:**

- [android:marqueeRepeatLimit](https://developer.android.com/reference/android/widget/TextView#attr_android:marqueeRepeatLimit)

| Parameters ||
|---|---|
| `marqueeLimit` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMarqueeRepeatLimit()`

### setMaxEms

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMaxEms (int maxEms)
```

Sets the width of the TextView to be at most `maxEms` wide.


This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous maximum width configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`.

<br />

**Related XML Attributes:**

- [android:maxEms](https://developer.android.com/reference/android/widget/TextView#attr_android:maxEms)

| Parameters ||
|---|---|
| `maxEms` | `int`: the maximum width of TextView in terms of ems <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMaxEms()`
- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### setMaxHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMaxHeight (int maxPixels)
```

Sets the height of the TextView to be at most `maxPixels` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides previous maximum height configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMaxLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`.

<br />

**Related XML Attributes:**

- [android:maxHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:maxHeight)

| Parameters ||
|---|---|
| `maxPixels` | `int`: the maximum height of TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMaxHeight()`
- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### setMaxLines

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMaxLines (int maxLines)
```

Sets the height of the TextView to be at most `maxLines` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides previous maximum height configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMaxHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`.

<br />

**Related XML Attributes:**

- [android:maxLines](https://developer.android.com/reference/android/widget/TextView#attr_android:maxLines)

| Parameters ||
|---|---|
| `maxLines` | `int`: the maximum height of TextView in terms of number of lines <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMaxLines()`
- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### setMaxWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMaxWidth (int maxPixels)
```

Sets the width of the TextView to be at most `maxPixels` wide.


This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous maximum width configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMaxEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`.

<br />

**Related XML Attributes:**

- [android:maxWidth](https://developer.android.com/reference/android/widget/TextView#attr_android:maxWidth)

| Parameters ||
|---|---|
| `maxPixels` | `int`: the maximum width of TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMaxWidth()`
- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

### setMinEms

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinEms (int minEms)
```

Sets the width of the TextView to be at least `minEms` wide.


This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous minimum width configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`.

<br />

**Related XML Attributes:**

- [android:minEms](https://developer.android.com/reference/android/widget/TextView#attr_android:minEms)

| Parameters ||
|---|---|
| `minEms` | `int`: the minimum width of TextView in terms of ems <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMinEms()`
- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### setMinHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinHeight (int minPixels)
```

Sets the height of the TextView to be at least `minPixels` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides previous minimum height configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMinLines(int)` or `https://developer.android.com/reference/android/widget/TextView#setLines(int)`.


The value given here is different than `https://developer.android.com/reference/android/view/View#setMinimumHeight(int)`. Between
`minHeight` and the value set in `https://developer.android.com/reference/android/view/View#setMinimumHeight(int)`, the greater one is
used to decide the final height.

<br />

**Related XML Attributes:**

- [android:minHeight](https://developer.android.com/reference/android/widget/TextView#attr_android:minHeight)

| Parameters ||
|---|---|
| `minPixels` | `int`: the minimum height of TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMinHeight()`
- `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`

### setMinLines

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinLines (int minLines)
```

Sets the height of the TextView to be at least `minLines` tall.


This value is used for height calculation if LayoutParams does not force TextView to have an
exact height. Setting this value overrides other previous minimum height configurations such
as `https://developer.android.com/reference/android/widget/TextView#setMinHeight(int)` or `https://developer.android.com/reference/android/widget/TextView#setHeight(int)`. `https://developer.android.com/reference/android/widget/TextView#setSingleLine()` will set
this value to 1.

<br />

**Related XML Attributes:**

- [android:minLines](https://developer.android.com/reference/android/widget/TextView#attr_android:minLines)

| Parameters ||
|---|---|
| `minLines` | `int`: the minimum height of TextView in terms of number of lines <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMinLines()`
- `https://developer.android.com/reference/android/widget/TextView#setLines(int)`

### setMinWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinWidth (int minPixels)
```

Sets the width of the TextView to be at least `minPixels` wide.


This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous minimum width configurations such as
`https://developer.android.com/reference/android/widget/TextView#setMinEms(int)` or `https://developer.android.com/reference/android/widget/TextView#setEms(int)`.


The value given here is different than `https://developer.android.com/reference/android/view/View#setMinimumWidth(int)`. Between
`minWidth` and the value set in `https://developer.android.com/reference/android/view/View#setMinimumWidth(int)`, the greater one is used
to decide the final width.

<br />

**Related XML Attributes:**

- [android:minWidth](https://developer.android.com/reference/android/widget/TextView#attr_android:minWidth)

| Parameters ||
|---|---|
| `minPixels` | `int`: the minimum width of TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMinWidth()`
- `https://developer.android.com/reference/android/widget/TextView#setWidth(int)`

### setMinimumFontMetrics

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinimumFontMetrics (Paint.FontMetrics minimumFontMetrics)
```

Set the minimum font metrics used for line spacing.


`null` is the default value. If `null` is set or left as default, the font
metrics obtained by `https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)` is used.


The minimum meaning here is the minimum value of line spacing: maximum value of
`https://developer.android.com/reference/android/graphics/Paint#ascent()`, minimum value of `https://developer.android.com/reference/android/graphics/Paint#descent()`.


By setting this value, each line will have minimum line spacing regardless of the text
rendered. For example, usually Japanese script has larger vertical metrics than Latin script.
By setting the metrics obtained by `https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)`
for Japanese or leave it `null` if the TextView's locale or system locale is Japanese,
the line spacing for Japanese is reserved if the TextView contains English text. If the
vertical metrics of the text is larger than Japanese, for example Burmese, the bigger font
metrics is used.

<br />

| Parameters ||
|---|---|
| `minimumFontMetrics` | `Paint.FontMetrics`: A minimum font metrics. Passing `null` for using the value obtained by `https://developer.android.com/reference/android/graphics/Paint#getFontMetricsForLocale(android.graphics.Paint.FontMetrics)` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getMinimumFontMetrics()`
- `https://developer.android.com/reference/android/text/Layout#getMinimumFontMetrics()`
- `https://developer.android.com/reference/android/text/Layout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/StaticLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`
- `https://developer.android.com/reference/android/text/DynamicLayout.Builder#setMinimumFontMetrics(android.graphics.Paint.FontMetrics)`

### setMovementMethod

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setMovementMethod (MovementMethod movement)
```

Sets the `https://developer.android.com/reference/android/text/method/MovementMethod` for handling arrow key movement
for this TextView. This can be null to disallow using the arrow keys to move the
cursor or scroll the view.


Be warned that if you want a TextView with a key listener or movement
method not to be focusable, or if you want a TextView without a
key listener or movement method to be focusable, you must call
`https://developer.android.com/reference/android/view/View#setFocusable(boolean)` again after calling this to get the focusability
back the way you want it.

<br />

| Parameters ||
|---|---|
| `movement` | `MovementMethod` <br /> |

### setOnEditorActionListener

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnEditorActionListener (TextView.OnEditorActionListener l)
```

Set a special listener to be called when an action is performed
on the text view. This will be called when the enter key is pressed,
or when an action supplied to the IME is selected by the user. Setting
this means that the normal hard key event will not insert a newline
into the text view, even if it is multi-line; holding down the ALT
modifier will, however, allow the user to insert a newline character.

<br />

| Parameters ||
|---|---|
| `l` | `TextView.OnEditorActionListener` <br /> |

### setPadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPadding (int left, 
                int top, 
                int right, 
                int bottom)
```

Sets the padding. The view may add on the space required to display
the scrollbars, depending on the style and visibility of the scrollbars.
So the values returned from `https://developer.android.com/reference/android/view/View#getPaddingLeft()`, `https://developer.android.com/reference/android/view/View#getPaddingTop()`,
`https://developer.android.com/reference/android/view/View#getPaddingRight()` and `https://developer.android.com/reference/android/view/View#getPaddingBottom()` may be different
from the values set in this call.

<br />

| Parameters ||
|---|---|
| `left` | `int`: the left padding in pixels <br /> |
| `top` | `int`: the top padding in pixels <br /> |
| `right` | `int`: the right padding in pixels <br /> |
| `bottom` | `int`: the bottom padding in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)`

### setPaddingRelative

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPaddingRelative (int start, 
                int top, 
                int end, 
                int bottom)
```

Sets the relative padding. The view may add on the space required to display
the scrollbars, depending on the style and visibility of the scrollbars.
So the values returned from `https://developer.android.com/reference/android/view/View#getPaddingStart()`, `https://developer.android.com/reference/android/view/View#getPaddingTop()`,
`https://developer.android.com/reference/android/view/View#getPaddingEnd()` and `https://developer.android.com/reference/android/view/View#getPaddingBottom()` may be different
from the values set in this call.

<br />

| Parameters ||
|---|---|
| `start` | `int`: the start padding in pixels <br /> |
| `top` | `int`: the top padding in pixels <br /> |
| `end` | `int`: the end padding in pixels <br /> |
| `bottom` | `int`: the bottom padding in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setFirstBaselineToTopHeight(int)`
- `https://developer.android.com/reference/android/widget/TextView#setLastBaselineToBottomHeight(int)`

### setPaintFlags

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPaintFlags (int flags)
```

Sets flags on the Paint being used to display the text and
reflows the text if they are different from the old flags.

<br />

| Parameters ||
|---|---|
| `flags` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/Paint#setFlags(int)`

### setPrivateImeOptions

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPrivateImeOptions (String type)
```

Set the private content type of the text, which is the
`https://developer.android.com/reference/android/view/inputmethod/EditorInfo#privateImeOptions`
field that will be filled in when creating an input connection.

<br />

**Related XML Attributes:**

- [android:privateImeOptions](https://developer.android.com/reference/android/widget/TextView#attr_android:privateImeOptions)

| Parameters ||
|---|---|
| `type` | `String` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getPrivateImeOptions()`
- `https://developer.android.com/reference/android/view/inputmethod/EditorInfo#privateImeOptions`

### setRawInputType

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRawInputType (int type)
```

Directly change the content type integer of the text view, without
modifying any other state.

<br />

**Related XML Attributes:**

- [android:inputType](https://developer.android.com/reference/android/widget/TextView#attr_android:inputType)

| Parameters ||
|---|---|
| `type` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setInputType(int)`
- `https://developer.android.com/reference/android/text/InputType`

### setScroller

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScroller (Scroller s)
```

Sets the Scroller used for producing a scrolling animation

<br />

| Parameters ||
|---|---|
| `s` | `Scroller`: A Scroller instance <br /> |

### setSearchResultHighlightColor

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSearchResultHighlightColor (int color)
```

Sets the search result highlight color.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Parameters ||
|---|---|
| `color` | `int`: a search result highlight color. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlights(int[])`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### setSearchResultHighlights

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSearchResultHighlights (int... ranges)
```

Sets the search result ranges with flatten range representation.

Ranges are represented of flattened inclusive start and exclusive end integers array. The
inclusive start offset of the `i`-th range is stored in `2 * i`-th of the array.
The exclusive end offset of the `i`-th range is stored in `2* i + 1`-th of the
array. For example, the two ranges: (1, 2) and (3, 4) are flattened into single int array
\[1, 2, 3, 4\].

TextView will render the search result with the highlights with specified color in the theme.
If there is a focused search result, it is rendered with focused color. By calling this
method, the focused search index will be cleared.

<br />

**Related XML Attributes:**

- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:searchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:searchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)
- [android:focusedSearchResultHighlightColor](https://developer.android.com/reference/android/widget/TextView#attr_android:focusedSearchResultHighlightColor)

| Parameters ||
|---|---|
| `ranges` | `int`: the flatten ranges of the search result. null for clear. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlights()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultIndex(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultIndex()`
- `https://developer.android.com/reference/android/widget/TextView#setSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getSearchResultHighlightColor()`
- `https://developer.android.com/reference/android/widget/TextView#setFocusedSearchResultHighlightColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getFocusedSearchResultHighlightColor()`

### setSelectAllOnFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSelectAllOnFocus (boolean selectAllOnFocus)
```

Set the TextView so that when it takes focus, all the text is
selected.

<br />

**Related XML Attributes:**

- [android:selectAllOnFocus](https://developer.android.com/reference/android/widget/TextView#attr_android:selectAllOnFocus)

| Parameters ||
|---|---|
| `selectAllOnFocus` | `boolean` <br /> |

### setSelected

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSelected (boolean selected)
```

Changes the selection state of this view. A view can be selected or not.
Note that selection is not the same as focus. Views are typically
selected in the context of an AdapterView like ListView or GridView;
the selected view is the view that is highlighted.

<br />

| Parameters ||
|---|---|
| `selected` | `boolean`: true if the view must be selected, false otherwise <br /> |

### setShadowLayer

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setShadowLayer (float radius, 
                float dx, 
                float dy, 
                int color)
```

Gives the text a shadow of the specified blur radius and color, the specified
distance from its drawn position.


The text shadow produced does not interact with the properties on view
that are responsible for real time shadows,
`https://developer.android.com/reference/android/view/View#getElevation()` and
`https://developer.android.com/reference/android/view/View#getTranslationZ()`.

<br />

**Related XML Attributes:**

- [android:shadowColor](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowColor)
- [android:shadowDx](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDx)
- [android:shadowDy](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowDy)
- [android:shadowRadius](https://developer.android.com/reference/android/widget/TextView#attr_android:shadowRadius)

| Parameters ||
|---|---|
| `radius` | `float` <br /> |
| `dx` | `float` <br /> |
| `dy` | `float` <br /> |
| `color` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/Paint#setShadowLayer(float,%20float,%20float,%20int)`

### setShiftDrawingOffsetForStartOverhang

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setShiftDrawingOffsetForStartOverhang (boolean shiftDrawingOffsetForStartOverhang)
```

Set true for shifting the drawing x offset for showing overhang at the start position.

This flag is ignored if the `https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()` is false.

If this value is false, the TextView draws text from the zero even if there is a glyph stroke
in a region where the x coordinate is negative. TextView clips the stroke in the region where
the X coordinate is negative unless the parents has `https://developer.android.com/reference/android/view/ViewGroup#getClipChildren()` to
true. This is useful for aligning multiple TextViews vertically.

If this value is true, the TextView draws text with shifting the x coordinate of the drawing
bounding box. This prevents the clipping even if the parents doesn't have
`https://developer.android.com/reference/android/view/ViewGroup#getClipChildren()` to true.

This value is false by default.

<br />

| Parameters ||
|---|---|
| `shiftDrawingOffsetForStartOverhang` | `boolean`: true for shifting the drawing offset for showing the stroke that is in the region whre the x coorinate is negative. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setUseBoundsForWidth(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()`

### setShowSoftInputOnFocus

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setShowSoftInputOnFocus (boolean show)
```

Sets whether the soft input method will be made visible when this
TextView gets focused. The default is true.

<br />

| Parameters ||
|---|---|
| `show` | `boolean` <br /> |

### setSingleLine

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSingleLine (boolean singleLine)
```

If true, sets the properties of this field (number of lines, horizontally scrolling,
transformation method) to be for a single-line input; if false, restores these to the default
conditions.

Note that the default conditions are not necessarily those that were in effect prior this
method, and you may want to reset these properties to your custom values.

Note that due to performance reasons, by setting single line for the EditText, the maximum
text length is set to 5000 if no other character limitation are applied.

<br />

**Related XML Attributes:**

- [android:singleLine](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine)

| Parameters ||
|---|---|
| `singleLine` | `boolean` <br /> |

### setSingleLine

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSingleLine ()
```

Sets the properties of this field (lines, horizontally scrolling,
transformation method) to be for a single-line input.

<br />

**Related XML Attributes:**

- [android:singleLine](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine)

### setSpannableFactory

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setSpannableFactory (Spannable.Factory factory)
```

Sets the Factory used to create new `https://developer.android.com/reference/android/text/Spannable`.

<br />

| Parameters ||
|---|---|
| `factory` | `Spannable.Factory`: `https://developer.android.com/reference/android/text/Spannable.Factory` to be used <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/Spannable.Factory`
- `https://developer.android.com/reference/android/widget/TextView.BufferType#SPANNABLE`

### setText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setText (int resid)
```

Sets the text to be displayed using a string resource identifier.

<br />

**Related XML Attributes:**

- [android:text](https://developer.android.com/reference/android/widget/TextView#attr_android:text)

| Parameters ||
|---|---|
| `resid` | `int`: the resource identifier of the string resource to be displayed <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)`

### setText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setText (CharSequence text)
```

Sets the text to be displayed. TextView *does not* accept
HTML-like formatting, which you can do with text strings in XML resource files.
To style your strings, attach android.text.style.\* objects to a
`https://developer.android.com/reference/android/text/SpannableString`, or see the
[Available Resource Types](https://developer.android.com/guide/topics/resources/available-resources#stringresources) documentation for an example of setting
formatted text in the XML resource file.

<br />

When required, TextView will use `https://developer.android.com/reference/android/text/Spannable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Spannable`. Likewise it will use `https://developer.android.com/reference/android/text/Editable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Editable`. If the passed text is a `https://developer.android.com/reference/android/text/PrecomputedText` but the parameters used to create the PrecomputedText mismatches with this TextView, IllegalArgumentException is thrown. To ensure the parameters match, you can call `https://developer.android.com/reference/android/widget/TextView#setTextMetricsParams(android.text.PrecomputedText.Params)` before calling this.

<br />

<br />

**Related XML Attributes:**

- [android:text](https://developer.android.com/reference/android/widget/TextView#attr_android:text)

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be displayed <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the passed text is a `https://developer.android.com/reference/android/text/PrecomputedText` but the parameters used to create the PrecomputedText mismatches with this TextView. |

### setText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setText (CharSequence text, 
                TextView.BufferType type)
```

Sets the text to be displayed and the `https://developer.android.com/reference/android/widget/TextView.BufferType`.

<br />

When required, TextView will use `https://developer.android.com/reference/android/text/Spannable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Spannable`. Likewise it will use `https://developer.android.com/reference/android/text/Editable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Editable`. Subclasses overriding this method should ensure that the following post condition holds, in order to guarantee the safety of the view's measurement and layout operations: regardless of the input, after calling #setText both `mText` and `mTransformed` will be different from `null`.

<br />

<br />

**Related XML Attributes:**

- [android:text](https://developer.android.com/reference/android/widget/TextView#attr_android:text)
- [android:bufferType](https://developer.android.com/reference/android/widget/TextView#attr_android:bufferType)

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be displayed <br /> |
| `type` | `TextView.BufferType`: a `https://developer.android.com/reference/android/widget/TextView.BufferType` which defines whether the text is stored as a static text, styleable/spannable text, or editable text <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/widget/TextView.BufferType`
- `https://developer.android.com/reference/android/widget/TextView#setSpannableFactory(android.text.Spannable.Factory)`
- `https://developer.android.com/reference/android/widget/TextView#setEditableFactory(android.text.Editable.Factory)`

### setText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setText (int resid, 
                TextView.BufferType type)
```

Sets the text to be displayed using a string resource identifier and the
`https://developer.android.com/reference/android/widget/TextView.BufferType`.

<br />

When required, TextView will use `https://developer.android.com/reference/android/text/Spannable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Spannable`. Likewise it will use `https://developer.android.com/reference/android/text/Editable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Editable`.

<br />

<br />

**Related XML Attributes:**

- [android:text](https://developer.android.com/reference/android/widget/TextView#attr_android:text)
- [android:bufferType](https://developer.android.com/reference/android/widget/TextView#attr_android:bufferType)

| Parameters ||
|---|---|
| `resid` | `int`: the resource identifier of the string resource to be displayed <br /> |
| `type` | `TextView.BufferType`: a `https://developer.android.com/reference/android/widget/TextView.BufferType` which defines whether the text is stored as a static text, styleable/spannable text, or editable text <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setText(int)`
- `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/widget/TextView.BufferType`
- `https://developer.android.com/reference/android/widget/TextView#setSpannableFactory(android.text.Spannable.Factory)`
- `https://developer.android.com/reference/android/widget/TextView#setEditableFactory(android.text.Editable.Factory)`

### setText

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setText (char[] text, 
                int start, 
                int len)
```

Sets the TextView to display the specified slice of the specified
char array. You must promise that you will not change the contents
of the array except for right before another call to setText(),
since the TextView has no way to know that the text
has changed and that it needs to invalidate and re-layout.

<br />

| Parameters ||
|---|---|
| `text` | `char`: char array to be displayed. This value cannot be `null`. <br /> |
| `start` | `int`: start index in the char array <br /> |
| `len` | `int`: length of char count after `start` <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IndexOutOfBoundsException` | if start or start+len are not in 0 to text.length |
| `https://developer.android.com/reference/java/lang/NullPointerException` | if text is null |

### setTextAppearance

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextAppearance (Context context, 
                int resId)
```


**This method was deprecated
in API level 23.**   

Use `https://developer.android.com/reference/android/widget/TextView#setTextAppearance(int)` instead.

Sets the text color, size, style, hint color, and highlight color
from the specified TextAppearance resource.

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `resId` | `int` <br /> |

### setTextAppearance

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextAppearance (int resId)
```

Sets the text appearance from the specified style resource.


Use a framework-defined `TextAppearance` style like
`https://developer.android.com/reference/android/R.style#TextAppearance_Material_Body1`
or see `https://developer.android.com/reference/android/R.styleable#TextAppearance` for the
set of attributes that can be used in a custom style.

<br />

**Related XML Attributes:**

- [android:textAppearance](https://developer.android.com/reference/android/widget/TextView#attr_android:textAppearance)

| Parameters ||
|---|---|
| `resId` | `int`: the resource identifier of the style to apply <br /> |

### setTextClassifier

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextClassifier (TextClassifier textClassifier)
```

Sets the `https://developer.android.com/reference/android/view/textclassifier/TextClassifier` for this TextView.

<br />

| Parameters ||
|---|---|
| `textClassifier` | `TextClassifier`: This value may be `null`. <br /> |

### setTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextColor (int color)
```

Sets the text color for all the states (normal, selected,
focused) to be this color.

<br />

**Related XML Attributes:**

- [android:textColor](https://developer.android.com/reference/android/widget/TextView#attr_android:textColor)

| Parameters ||
|---|---|
| `color` | `int`: A color value in the form 0xAARRGGBB. Do not pass a resource ID. To get a color value from a resource ID, call `https://developer.android.com/reference/androidx/core/content/ContextCompat.html#getColor(android.content.Context,%20int)`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#getTextColors()`

### setTextColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextColor (ColorStateList colors)
```

Sets the text color.

<br />

**Related XML Attributes:**

- [android:textColor](https://developer.android.com/reference/android/widget/TextView#attr_android:textColor)

| Parameters ||
|---|---|
| `colors` | `ColorStateList` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextColor(int)`
- `https://developer.android.com/reference/android/widget/TextView#getTextColors()`
- `https://developer.android.com/reference/android/widget/TextView#setHintTextColor(android.content.res.ColorStateList)`
- `https://developer.android.com/reference/android/widget/TextView#setLinkTextColor(android.content.res.ColorStateList)`

### setTextCursorDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextCursorDrawable (Drawable textCursorDrawable)
```

Sets the Drawable corresponding to the text cursor. The Drawable defaults to the
value of the textCursorDrawable attribute.
Note that any change applied to the cursor Drawable will not be visible
until the cursor is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textCursorDrawable](https://developer.android.com/reference/android/widget/TextView#attr_android:textCursorDrawable)

| Parameters ||
|---|---|
| `textCursorDrawable` | `Drawable`: This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(int)`

### setTextCursorDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextCursorDrawable (int textCursorDrawable)
```

Sets the Drawable corresponding to the text cursor. The Drawable defaults to the
value of the textCursorDrawable attribute.
Note that any change applied to the cursor Drawable will not be visible
until the cursor is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textCursorDrawable](https://developer.android.com/reference/android/widget/TextView#attr_android:textCursorDrawable)

| Parameters ||
|---|---|
| `textCursorDrawable` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextCursorDrawable(android.graphics.drawable.Drawable)`

### setTextIsSelectable

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextIsSelectable (boolean selectable)
```

Sets whether the content of this view is selectable by the user. The default is
`false`, meaning that the content is not selectable.


When you use a TextView to display a useful piece of information to the user (such as a
contact's address), make it selectable, so that the user can select and copy its
content. You can also use set the XML attribute
`https://developer.android.com/reference/android/R.styleable#TextView_textIsSelectable` to "true".


When you call this method to set the value of `textIsSelectable`, it sets
the flags `focusable`, `focusableInTouchMode`, `clickable`,
and `longClickable` to the same value. These flags correspond to the attributes
`https://developer.android.com/reference/android/R.styleable#View_focusable`,
`https://developer.android.com/reference/android/R.styleable#View_focusableInTouchMode`,
`https://developer.android.com/reference/android/R.styleable#View_clickable`, and
`https://developer.android.com/reference/android/R.styleable#View_longClickable`. To restore any of these
flags to a state you had set previously, call one or more of the following methods:
`https://developer.android.com/reference/android/view/View#setFocusable(boolean)`,
`https://developer.android.com/reference/android/view/View#setFocusableInTouchMode(boolean)`,
`https://developer.android.com/reference/android/view/View#setClickable(boolean)` or
`https://developer.android.com/reference/android/view/View#setLongClickable(boolean)`.

<br />

| Parameters ||
|---|---|
| `selectable` | `boolean`: Whether the content of this TextView should be selectable. <br /> |

### setTextKeepState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setTextKeepState (CharSequence text)
```

Sets the text to be displayed but retains the cursor position. Same as
`https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)` except that the cursor position (if any) is retained in the
new text.

<br />

When required, TextView will use `https://developer.android.com/reference/android/text/Spannable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Spannable`. Likewise it will use `https://developer.android.com/reference/android/text/Editable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Editable`.

<br />

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be displayed <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence)`

### setTextKeepState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setTextKeepState (CharSequence text, 
                TextView.BufferType type)
```

Sets the text to be displayed and the `https://developer.android.com/reference/android/widget/TextView.BufferType` but retains
the cursor position. Same as
`https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence,%20android.widget.TextView.BufferType)` except that the cursor
position (if any) is retained in the new text.

<br />

When required, TextView will use `https://developer.android.com/reference/android/text/Spannable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Spannable`. Likewise it will use `https://developer.android.com/reference/android/text/Editable.Factory` to create final or intermediate `https://developer.android.com/reference/android/text/Editable`.

<br />

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: text to be displayed <br /> |
| `type` | `TextView.BufferType`: a `https://developer.android.com/reference/android/widget/TextView.BufferType` which defines whether the text is stored as a static text, styleable/spannable text, or editable text <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setText(java.lang.CharSequence,%20android.widget.TextView.BufferType)`

### setTextLocale

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextLocale (Locale locale)
```

Set the default `https://developer.android.com/reference/java/util/Locale` of the text in this TextView to a one-member
`https://developer.android.com/reference/android/os/LocaleList` containing just the given Locale.

<br />

| Parameters ||
|---|---|
| `locale` | `Locale`: the `https://developer.android.com/reference/java/util/Locale` for drawing text, must not be null. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextLocales(android.os.LocaleList)`

### setTextLocales

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextLocales (LocaleList locales)
```

Set the default `https://developer.android.com/reference/android/os/LocaleList` of the text in this TextView to the given value.

This value is used to choose appropriate typefaces for ambiguous characters (typically used
for CJK locales to disambiguate Hanzi/Kanji/Hanja characters). It also affects
other aspects of text display, including line breaking.

<br />

| Parameters ||
|---|---|
| `locales` | `LocaleList`: the `https://developer.android.com/reference/android/os/LocaleList` for drawing text, must not be null or empty. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/Paint#setTextLocales(android.os.LocaleList)`

### setTextMetricsParams

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextMetricsParams (PrecomputedText.Params params)
```

Apply the text layout parameter.

Update the TextView parameters to be compatible with `https://developer.android.com/reference/android/text/PrecomputedText.Params`.

<br />

| Parameters ||
|---|---|
| `params` | `PrecomputedText.Params`: This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/text/PrecomputedText`

### setTextScaleX

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextScaleX (float size)
```

Sets the horizontal scale factor for text. The default value
is 1.0. Values greater than 1.0 stretch the text wider.
Values less than 1.0 make the text narrower. By default, this value is 1.0.

<br />

**Related XML Attributes:**

- [android:textScaleX](https://developer.android.com/reference/android/widget/TextView#attr_android:textScaleX)

| Parameters ||
|---|---|
| `size` | `float`: The horizontal scale factor. <br /> |

### setTextSelectHandle

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandle (int textSelectHandle)
```

Sets the Drawable corresponding to the selection handle used for
positioning the cursor within text. The Drawable defaults to the value
of the textSelectHandle attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandle](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandle)

| Parameters ||
|---|---|
| `textSelectHandle` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(android.graphics.drawable.Drawable)`

### setTextSelectHandle

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandle (Drawable textSelectHandle)
```

Sets the Drawable corresponding to the selection handle used for
positioning the cursor within text. The Drawable defaults to the value
of the textSelectHandle attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandle](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandle)

| Parameters ||
|---|---|
| `textSelectHandle` | `Drawable`: This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandle(int)`

### setTextSelectHandleLeft

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandleLeft (int textSelectHandleLeft)
```

Sets the Drawable corresponding to the left handle used
for selecting text. The Drawable defaults to the value of the
textSelectHandleLeft attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleLeft)

| Parameters ||
|---|---|
| `textSelectHandleLeft` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(android.graphics.drawable.Drawable)`

### setTextSelectHandleLeft

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandleLeft (Drawable textSelectHandleLeft)
```

Sets the Drawable corresponding to the left handle used
for selecting text. The Drawable defaults to the value of the
textSelectHandleLeft attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleLeft](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleLeft)

| Parameters ||
|---|---|
| `textSelectHandleLeft` | `Drawable`: This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleLeft(int)`

### setTextSelectHandleRight

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandleRight (Drawable textSelectHandleRight)
```

Sets the Drawable corresponding to the right handle used
for selecting text. The Drawable defaults to the value of the
textSelectHandleRight attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleRight](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleRight)

| Parameters ||
|---|---|
| `textSelectHandleRight` | `Drawable`: This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(int)`

### setTextSelectHandleRight

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSelectHandleRight (int textSelectHandleRight)
```

Sets the Drawable corresponding to the right handle used
for selecting text. The Drawable defaults to the value of the
textSelectHandleRight attribute.
Note that any change applied to the handle Drawable will not be visible
until the handle is hidden and then drawn again.

<br />

**Related XML Attributes:**

- [android:textSelectHandleRight](https://developer.android.com/reference/android/widget/TextView#attr_android:textSelectHandleRight)

| Parameters ||
|---|---|
| `textSelectHandleRight` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setTextSelectHandleRight(android.graphics.drawable.Drawable)`

### setTextSize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSize (int unit, 
                float size)
```

Set the default text size to a given unit and value. See `https://developer.android.com/reference/android/util/TypedValue` for the possible dimension units.

Note: if this TextView has the auto-size feature enabled, then this function is no-op.

<br />

**Related XML Attributes:**

- [android:textSize](https://developer.android.com/reference/android/widget/TextView#attr_android:textSize)

| Parameters ||
|---|---|
| `unit` | `int`: The desired dimension unit. <br /> |
| `size` | `float`: The desired size in the given units. <br /> |

### setTextSize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextSize (float size)
```

Set the default text size to the given value, interpreted as "scaled
pixel" units. This size is adjusted based on the current density and
user font size preference.

Note: if this TextView has the auto-size feature enabled, then this function is no-op.

<br />

**Related XML Attributes:**

- [android:textSize](https://developer.android.com/reference/android/widget/TextView#attr_android:textSize)

| Parameters ||
|---|---|
| `size` | `float`: The scaled pixel size. <br /> |

### setTransformationMethod

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setTransformationMethod (TransformationMethod method)
```

Sets the transformation that is applied to the text that this
TextView is displaying.

<br />

**Related XML Attributes:**

- [android:password](https://developer.android.com/reference/android/widget/TextView#attr_android:password)
- [android:singleLine](https://developer.android.com/reference/android/widget/TextView#attr_android:singleLine)

| Parameters ||
|---|---|
| `method` | `TransformationMethod` <br /> |

### setTypeface

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTypeface (Typeface tf)
```

Sets the typeface and style in which the text should be displayed.
Note that not all Typeface families actually have bold and italic
variants, so you may need to use
`https://developer.android.com/reference/android/widget/TextView#setTypeface(android.graphics.Typeface,%20int)` to get the appearance
that you actually want.

<br />

**Related XML Attributes:**

- [android:fontFamily](https://developer.android.com/reference/android/widget/TextView#attr_android:fontFamily)
- [android:typeface](https://developer.android.com/reference/android/widget/TextView#attr_android:typeface)
- [android:textStyle](https://developer.android.com/reference/android/widget/TextView#attr_android:textStyle)

| Parameters ||
|---|---|
| `tf` | `Typeface`: This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getTypeface()`

### setTypeface

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTypeface (Typeface tf, 
                int style)
```

Sets the typeface and style in which the text should be displayed,
and turns on the fake bold and italic bits in the Paint if the
Typeface that you provided does not have all the bits in the
style that you specified.

<br />

**Related XML Attributes:**

- [android:typeface](https://developer.android.com/reference/android/widget/TextView#attr_android:typeface)
- [android:textStyle](https://developer.android.com/reference/android/widget/TextView#attr_android:textStyle)

| Parameters ||
|---|---|
| `tf` | `Typeface`: This value may be `null`. <br /> |
| `style` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/graphics/Typeface#NORMAL` - `https://developer.android.com/reference/android/graphics/Typeface#BOLD` - `https://developer.android.com/reference/android/graphics/Typeface#ITALIC` - `https://developer.android.com/reference/android/graphics/Typeface#BOLD_ITALIC` |

### setUseBoundsForWidth

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setUseBoundsForWidth (boolean useBoundsForWidth)
```

Set true for using width of bounding box as a source of automatic line breaking and drawing.

If this value is false, the TextView determines the View width, drawing offset and automatic
line breaking based on total advances as text widths. By setting true, use glyph bound's as a
source of text width.

If the font used for this TextView has glyphs that has negative bearing X or glyph xMax is
greater than advance, the glyph clipping can be happened because the drawing area may be
bigger than advance. By setting this to true, the TextView will reserve more spaces for
drawing are, so clipping can be prevented.

This value is true by default if the target API version is 35 or later.

<br />

| Parameters ||
|---|---|
| `useBoundsForWidth` | `boolean`: true for using bounding box for width. false for using advances for width. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#getUseBoundsForWidth()`
- `https://developer.android.com/reference/android/widget/TextView#setShiftDrawingOffsetForStartOverhang(boolean)`
- `https://developer.android.com/reference/android/widget/TextView#getShiftDrawingOffsetForStartOverhang()`

### setWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setWidth (int pixels)
```

Sets the width of the TextView to be exactly `pixels` wide.


This value is used for width calculation if LayoutParams does not force TextView to have an
exact width. Setting this value overrides previous minimum/maximum width configurations
such as `https://developer.android.com/reference/android/widget/TextView#setMinWidth(int)` or `https://developer.android.com/reference/android/widget/TextView#setMaxWidth(int)`.

<br />

**Related XML Attributes:**

- [android:width](https://developer.android.com/reference/android/widget/TextView#attr_android:width)

| Parameters ||
|---|---|
| `pixels` | `int`: the exact width of the TextView in terms of pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/TextView#setEms(int)`

### showContextMenu

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean showContextMenu ()
```

Shows the context menu for this view.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the context menu was shown, `false` otherwise <br /> |

### showContextMenu

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean showContextMenu (float x, 
                float y)
```

Shows the context menu for this view anchored to the specified
view-relative coordinate.

<br />

| Parameters ||
|---|---|
| `x` | `float`: the X coordinate in pixels relative to the view to which the menu should be anchored, or `https://developer.android.com/reference/java/lang/Float#NaN` to disable anchoring <br /> |
| `y` | `float`: the Y coordinate in pixels relative to the view to which the menu should be anchored, or `https://developer.android.com/reference/java/lang/Float#NaN` to disable anchoring <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the context menu was shown, `false` otherwise <br /> |

## Protected methods

### computeHorizontalScrollRange

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeHorizontalScrollRange ()
```

<br />

Compute the horizontal range that the horizontal scrollbar
represents.

The range is expressed in arbitrary units that must be the same as the
units used by `https://developer.android.com/reference/android/view/View#computeHorizontalScrollExtent()` and
`https://developer.android.com/reference/android/view/View#computeHorizontalScrollOffset()`.

The default range is the drawing width of this view.

<br />

<br />

| Returns ||
|---|---|
| `int` | the total horizontal range represented by the horizontal scrollbar <br /> |

### computeVerticalScrollExtent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeVerticalScrollExtent ()
```

<br />

Compute the vertical extent of the vertical scrollbar's thumb
within the vertical range. This value is used to compute the length
of the thumb within the scrollbar's track.

The range is expressed in arbitrary units that must be the same as the
units used by `https://developer.android.com/reference/android/view/View#computeVerticalScrollRange()` and
`https://developer.android.com/reference/android/view/View#computeVerticalScrollOffset()`.

The default extent is the drawing height of this view.

<br />

<br />

| Returns ||
|---|---|
| `int` | the vertical extent of the scrollbar's thumb <br /> |

### computeVerticalScrollRange

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeVerticalScrollRange ()
```

<br />

Compute the vertical range that the vertical scrollbar represents.

The range is expressed in arbitrary units that must be the same as the
units used by `https://developer.android.com/reference/android/view/View#computeVerticalScrollExtent()` and
`https://developer.android.com/reference/android/view/View#computeVerticalScrollOffset()`.

<br />

<br />

| Returns ||
|---|---|
| `int` | the total vertical range represented by the vertical scrollbar The default range is the drawing height of this view. <br /> |

### drawableStateChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void drawableStateChanged ()
```

This function is called whenever the state of the view changes in such
a way that it impacts the state of drawables being shown.


If the View has a StateListAnimator, it will also be called to run necessary state
change animations.


Be sure to call through to the superclass when overriding this function.


If you override this method you *must* call through to the
superclass implementation.

<br />

### getBottomPaddingOffset

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getBottomPaddingOffset ()
```

Amount by which to extend the bottom fading region. Called only when
`https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()` returns true.

<br />

| Returns ||
|---|---|
| `int` | The bottom padding offset in pixels. <br /> |

### getDefaultEditable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean getDefaultEditable ()
```

Subclasses override this to specify that they have a KeyListener
by default even if not specifically called for in the XML options.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### getDefaultMovementMethod

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected MovementMethod getDefaultMovementMethod ()
```

Subclasses override this to specify a default movement method.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/text/method/MovementMethod` | <br /> |

### getLeftFadingEdgeStrength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected float getLeftFadingEdgeStrength ()
```

Returns the strength, or intensity, of the left faded edge. The strength is
a value between 0.0 (no fade) and 1.0 (full fade). The default implementation
returns 0.0 or 1.0 but no value in between.

Subclasses should override this method to provide a smoother fade transition
when scrolling occurs.

<br />

| Returns ||
|---|---|
| `float` | the intensity of the left fade as a float between 0.0f and 1.0f <br /> |

### getLeftPaddingOffset

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getLeftPaddingOffset ()
```

Amount by which to extend the left fading region. Called only when
`https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()` returns true.

<br />

| Returns ||
|---|---|
| `int` | The left padding offset in pixels. <br /> |

### getRightFadingEdgeStrength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected float getRightFadingEdgeStrength ()
```

Returns the strength, or intensity, of the right faded edge. The strength is
a value between 0.0 (no fade) and 1.0 (full fade). The default implementation
returns 0.0 or 1.0 but no value in between.

Subclasses should override this method to provide a smoother fade transition
when scrolling occurs.

<br />

| Returns ||
|---|---|
| `float` | the intensity of the right fade as a float between 0.0f and 1.0f <br /> |

### getRightPaddingOffset

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getRightPaddingOffset ()
```

Amount by which to extend the right fading region. Called only when
`https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()` returns true.

<br />

| Returns ||
|---|---|
| `int` | The right padding offset in pixels. <br /> |

### getTopPaddingOffset

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getTopPaddingOffset ()
```

Amount by which to extend the top fading region. Called only when
`https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()` returns true.

<br />

| Returns ||
|---|---|
| `int` | The top padding offset in pixels. <br /> |

### isPaddingOffsetRequired

Added in [API level 2](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean isPaddingOffsetRequired ()
```

If the View draws content inside its padding and enables fading edges,
it needs to support padding offsets. Padding offsets are added to the
fading edges to extend the length of the fade so that it covers pixels
drawn inside the padding.

Subclasses of this class should override this method if they need
to draw content inside the padding.

<br />

| Returns ||
|---|---|
| `boolean` | True if padding offset must be applied, false otherwise. <br /> |

### onAttachedToWindow

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onAttachedToWindow ()
```

This is called when the view is attached to a window. At this point it
has a Surface and will start drawing. Note that this function is
guaranteed to be called before `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
however it may be called any time before the first onDraw -- including
before or after `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`.


If you override this method you *must* call through to the
superclass implementation.

<br />

### onConfigurationChanged

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onConfigurationChanged (Configuration newConfig)
```

Called when the current configuration of the resources being used
by the application have changed. You can use this to decide when
to reload resources that can changed based on orientation and other
configuration characteristics. You only need to use this if you are
not relying on the normal `https://developer.android.com/reference/android/app/Activity` mechanism of
recreating the activity instance upon a configuration change.

<br />

| Parameters ||
|---|---|
| `newConfig` | `Configuration`: The new resource configuration. <br /> |

### onCreateContextMenu

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onCreateContextMenu (ContextMenu menu)
```

Views should implement this if the view itself is going to add items to
the context menu.

<br />

| Parameters ||
|---|---|
| `menu` | `ContextMenu`: the context menu to populate <br /> |

### onCreateDrawableState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int[] onCreateDrawableState (int extraSpace)
```

Generate the new `https://developer.android.com/reference/android/graphics/drawable/Drawable` state for
this view. This is called by the view
system when the cached Drawable state is determined to be invalid. To
retrieve the current state, you should use `https://developer.android.com/reference/android/view/View#getDrawableState()`.

<br />

| Parameters ||
|---|---|
| `extraSpace` | `int`: if non-zero, this is the number of extra entries you would like in the returned array in which you can place your own states. <br /> |

| Returns ||
|---|---|
| `int[]` | Returns an array holding the current `https://developer.android.com/reference/android/graphics/drawable/Drawable` state of the view. <br /> |

### onDraw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onDraw (Canvas canvas)
```

Implement this to do your drawing.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas on which the background will be drawn. This value cannot be `null`. <br /> |

### onFocusChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onFocusChanged (boolean focused, 
                int direction, 
                Rect previouslyFocusedRect)
```

Called by the view system when the focus state of this view changes.
When the focus change event is caused by directional navigation, direction
and previouslyFocusedRect provide insight into where the focus is coming from.
When overriding, be sure to call up through to the super class so that
the standard focus handling will occur.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `focused` | `boolean`: True if the View has focus; false otherwise. <br /> |
| `direction` | `int`: The direction focus has moved when requestFocus() is called to give this view focus. Values are `https://developer.android.com/reference/android/view/View#FOCUS_UP`, `https://developer.android.com/reference/android/view/View#FOCUS_DOWN`, `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`, `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT`, `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD`, or `https://developer.android.com/reference/android/view/View#FOCUS_BACKWARD`. It may not always apply, in which case use the default. Value is one of the following: - `https://developer.android.com/reference/android/view/View#FOCUS_BACKWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD` - `https://developer.android.com/reference/android/view/View#FOCUS_LEFT` - `https://developer.android.com/reference/android/view/View#FOCUS_UP` - `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT` - `https://developer.android.com/reference/android/view/View#FOCUS_DOWN` |
| `previouslyFocusedRect` | `Rect`: The rectangle, in this view's coordinate system, of the previously focused view. If applicable, this will be passed in as finer grained information about where the focus is coming from (in addition to direction). Will be `null` otherwise. <br /> |

### onLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onLayout (boolean changed, 
                int left, 
                int top, 
                int right, 
                int bottom)
```

Called from layout when this view should
assign a size and position to each of its children.

Derived classes with children should override
this method and call layout on each of
their children.

<br />

| Parameters ||
|---|---|
| `changed` | `boolean`: This is a new size or position for this view <br /> |
| `left` | `int`: Left position, relative to parent <br /> |
| `top` | `int`: Top position, relative to parent <br /> |
| `right` | `int`: Right position, relative to parent <br /> |
| `bottom` | `int`: Bottom position, relative to parent <br /> |

### onMeasure

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onMeasure (int widthMeasureSpec, 
                int heightMeasureSpec)
```

<br />


Measure the view and its content to determine the measured width and the
measured height. This method is invoked by `https://developer.android.com/reference/android/view/View#measure(int,%20int)` and
should be overridden by subclasses to provide accurate and efficient
measurement of their contents.


**CONTRACT:** When overriding this method, you
*must* call `https://developer.android.com/reference/android/view/View#setMeasuredDimension(int,%20int)` to store the
measured width and height of this view. Failure to do so will trigger an
`IllegalStateException`, thrown by
`https://developer.android.com/reference/android/view/View#measure(int,%20int)`. Calling the superclass'
`https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` is a valid use.


The base class implementation of measure defaults to the background size,
unless a larger size is allowed by the MeasureSpec. Subclasses should
override `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` to provide better measurements of
their content.


If this method is overridden, it is the subclass's responsibility to make
sure the measured height and width are at least the view's minimum height
and width (`https://developer.android.com/reference/android/view/View#getSuggestedMinimumHeight()` and
`https://developer.android.com/reference/android/view/View#getSuggestedMinimumWidth()`).

<br />

<br />

| Parameters ||
|---|---|
| `widthMeasureSpec` | `int`: horizontal space requirements as imposed by the parent. The requirements are encoded with `https://developer.android.com/reference/android/view/View.MeasureSpec`. <br /> |
| `heightMeasureSpec` | `int`: vertical space requirements as imposed by the parent. The requirements are encoded with `https://developer.android.com/reference/android/view/View.MeasureSpec`. <br /> |

### onScrollChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onScrollChanged (int horiz, 
                int vert, 
                int oldHoriz, 
                int oldVert)
```

This is called in response to an internal scroll in this view (i.e., the
view scrolled its own contents). This is typically as a result of
`https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)` or `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)` having been
called.

<br />

| Parameters ||
|---|---|
| `horiz` | `int`: Current horizontal scroll origin. <br /> |
| `vert` | `int`: Current vertical scroll origin. <br /> |
| `oldHoriz` | `int`: Previous horizontal scroll origin. <br /> |
| `oldVert` | `int`: Previous vertical scroll origin. <br /> |

### onSelectionChanged

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onSelectionChanged (int selStart, 
                int selEnd)
```

This method is called when the selection has changed, in case any
subclasses would like to know.

**Note:** Always call the super implementation, which informs
the accessibility subsystem about the selection change.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

| Parameters ||
|---|---|
| `selStart` | `int`: The new selection start location. <br /> |
| `selEnd` | `int`: The new selection end location. <br /> |

### onTextChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onTextChanged (CharSequence text, 
                int start, 
                int lengthBefore, 
                int lengthAfter)
```

This method is called when the text is changed, in case any subclasses
would like to know.

Within `text`, the `lengthAfter` characters
beginning at `start` have just replaced old text that had
length `lengthBefore`. It is an error to attempt to make
changes to `text` from this callback.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: The text the TextView is displaying <br /> |
| `start` | `int`: The offset of the start of the range of the text that was modified <br /> |
| `lengthBefore` | `int`: The length of the former text that has been replaced <br /> |
| `lengthAfter` | `int`: The length of the replacement modified text <br /> |

### onVisibilityChanged

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onVisibilityChanged (View changedView, 
                int visibility)
```

Called when the visibility of the view or an ancestor of the view has
changed.

<br />

| Parameters ||
|---|---|
| `changedView` | `View`: The view whose visibility changed. May be `this` or an ancestor view. This value cannot be `null`. <br /> |
| `visibility` | `int`: The new visibility, one of `https://developer.android.com/reference/android/view/View#VISIBLE`, `https://developer.android.com/reference/android/view/View#INVISIBLE` or `https://developer.android.com/reference/android/view/View#GONE`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#VISIBLE` - `https://developer.android.com/reference/android/view/View#INVISIBLE` - `https://developer.android.com/reference/android/view/View#GONE` |

### setFrame

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean setFrame (int l, 
                int t, 
                int r, 
                int b)
```

<br />

<br />

| Parameters ||
|---|---|
| `l` | `int` <br /> |
| `t` | `int` <br /> |
| `r` | `int` <br /> |
| `b` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### verifyDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean verifyDrawable (Drawable who)
```

If your view subclass is displaying its own Drawable objects, it should
override this function and return true for any Drawable it is
displaying. This allows animations for those drawables to be
scheduled.

Be sure to call through to the super class when overriding this
function.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `who` | `Drawable`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | boolean If true then the Drawable is being displayed in the view; else false and it is not allowed to animate. <br /> |