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/view/View#nestedclasses) \| [XML Attrs](https://developer.android.com/reference/android/view/View#lattrs) \| [Constants](https://developer.android.com/reference/android/view/View#constants) \| [Fields](https://developer.android.com/reference/android/view/View#lfields) \| [Ctors](https://developer.android.com/reference/android/view/View#pubctors) \| [Methods](https://developer.android.com/reference/android/view/View#pubmethods) \| [Protected Methods](https://developer.android.com/reference/android/view/View#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/view/View#inhmethods)

# View

*** ** * ** ***


`
public


class
View
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource,

https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback,

https://developer.android.com/reference/android/view/KeyEvent.Callback


`

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

Known direct subclasses [AnalogClock](https://developer.android.com/reference/android/widget/AnalogClock), [ImageView](https://developer.android.com/reference/android/widget/ImageView), [KeyboardView](https://developer.android.com/reference/android/inputmethodservice/KeyboardView), [MediaRouteButton](https://developer.android.com/reference/android/app/MediaRouteButton), [ProgressBar](https://developer.android.com/reference/android/widget/ProgressBar), [Space](https://developer.android.com/reference/android/widget/Space), [SurfaceView](https://developer.android.com/reference/android/view/SurfaceView), [TextView](https://developer.android.com/reference/android/widget/TextView), [TextureView](https://developer.android.com/reference/android/view/TextureView), [ViewGroup](https://developer.android.com/reference/android/view/ViewGroup), [ViewStub](https://developer.android.com/reference/android/view/ViewStub) [AnalogClock](https://developer.android.com/reference/android/widget/AnalogClock) *This class was deprecated
in API level 23.
This widget is no longer supported; except for
`https://developer.android.com/reference/android/widget/RemoteViews` use cases like
[app widgets](https://developer.android.com/develop/ui/views/appwidgets/overview).* [ImageView](https://developer.android.com/reference/android/widget/ImageView) Displays image resources, for example `https://developer.android.com/reference/android/graphics/Bitmap` or `https://developer.android.com/reference/android/graphics/drawable/Drawable` resources. [KeyboardView](https://developer.android.com/reference/android/inputmethodservice/KeyboardView) *This class was deprecated
in API level 29.
This class is deprecated because this is just a convenient UI widget class that
application developers can re-implement on top of existing public APIs. If you have
already depended on this class, consider copying the implementation from AOSP into
your project or re-implementing a similar widget by yourselves* [MediaRouteButton](https://developer.android.com/reference/android/app/MediaRouteButton) [ProgressBar](https://developer.android.com/reference/android/widget/ProgressBar)
A user interface element that indicates the progress of an operation.


[Space](https://developer.android.com/reference/android/widget/Space) Space is a lightweight View subclass that may be used to create gaps between components in general purpose layouts. [SurfaceView](https://developer.android.com/reference/android/view/SurfaceView) Provides a dedicated drawing surface embedded inside of a view hierarchy. [TextView](https://developer.android.com/reference/android/widget/TextView) A user interface element that displays text to the user. [TextureView](https://developer.android.com/reference/android/view/TextureView) A TextureView can be used to display a content stream, such as that
coming from a camera preview, a video, or an OpenGL scene.


[ViewGroup](https://developer.android.com/reference/android/view/ViewGroup)
A `ViewGroup` is a special view that can contain other views
(called children.) The view group is the base class for layouts and views
containers.


[ViewStub](https://developer.android.com/reference/android/view/ViewStub) A ViewStub is an invisible, zero-sized View that can be used to lazily inflate layout resources at runtime. Known indirect subclasses [AbsListView](https://developer.android.com/reference/android/widget/AbsListView), [AbsSeekBar](https://developer.android.com/reference/android/widget/AbsSeekBar), [AbsSpinner](https://developer.android.com/reference/android/widget/AbsSpinner), [AbsoluteLayout](https://developer.android.com/reference/android/widget/AbsoluteLayout), [ActionMenuView](https://developer.android.com/reference/android/widget/ActionMenuView), [AdapterView](https://developer.android.com/reference/android/widget/AdapterView)\<T extends [Adapter](https://developer.android.com/reference/android/widget/Adapter)\>, [AdapterViewAnimator](https://developer.android.com/reference/android/widget/AdapterViewAnimator), [AdapterViewFlipper](https://developer.android.com/reference/android/widget/AdapterViewFlipper), [AppWidgetHostView](https://developer.android.com/reference/android/appwidget/AppWidgetHostView), [AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView), [Button](https://developer.android.com/reference/android/widget/Button), [CalendarView](https://developer.android.com/reference/android/widget/CalendarView), [CheckBox](https://developer.android.com/reference/android/widget/CheckBox), [CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView), [Chronometer](https://developer.android.com/reference/android/widget/Chronometer), and 56 others. [AbsListView](https://developer.android.com/reference/android/widget/AbsListView) Base class that can be used to implement virtualized lists of items. [AbsSeekBar](https://developer.android.com/reference/android/widget/AbsSeekBar) AbsSeekBar extends the capabilities of ProgressBar by adding a draggable thumb. [AbsSpinner](https://developer.android.com/reference/android/widget/AbsSpinner) An abstract base class for spinner widgets. [AbsoluteLayout](https://developer.android.com/reference/android/widget/AbsoluteLayout) *This class was deprecated
in API level 3.
Use `https://developer.android.com/reference/android/widget/FrameLayout`, `https://developer.android.com/reference/android/widget/RelativeLayout`
or a custom layout instead.* [ActionMenuView](https://developer.android.com/reference/android/widget/ActionMenuView) ActionMenuView is a presentation of a series of menu options as a View. [AdapterView](https://developer.android.com/reference/android/widget/AdapterView)\<T extends [Adapter](https://developer.android.com/reference/android/widget/Adapter)\> An AdapterView is a view whose children are determined by an `https://developer.android.com/reference/android/widget/Adapter`. [AdapterViewAnimator](https://developer.android.com/reference/android/widget/AdapterViewAnimator) Base class for a `https://developer.android.com/reference/android/widget/AdapterView` that will perform animations when switching between its views. [AdapterViewFlipper](https://developer.android.com/reference/android/widget/AdapterViewFlipper) Simple `https://developer.android.com/reference/android/widget/ViewAnimator` that will animate between two or more views that have been added to it. [AppWidgetHostView](https://developer.android.com/reference/android/appwidget/AppWidgetHostView) Provides the glue to show AppWidget views. [AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView) An editable text view that shows completion suggestions automatically
while the user is typing.


[Button](https://developer.android.com/reference/android/widget/Button) A user interface element the user can tap or click to perform an action. [CalendarView](https://developer.android.com/reference/android/widget/CalendarView) This class is a calendar widget for displaying and selecting dates. [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.


[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. [CompoundButton](https://developer.android.com/reference/android/widget/CompoundButton)
A button with two states, checked and unchecked.


[DatePicker](https://developer.android.com/reference/android/widget/DatePicker) Provides a widget for selecting a date. [DialerFilter](https://developer.android.com/reference/android/widget/DialerFilter) *This class was deprecated
in API level 26.
Use a custom view or layout to handle this functionality instead* [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. [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView) A view that shows items in a vertically scrolling two-level list. [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. [FragmentBreadCrumbs](https://developer.android.com/reference/android/app/FragmentBreadCrumbs) *This class was deprecated
in API level 21.
This widget is no longer supported.* [FrameLayout](https://developer.android.com/reference/android/widget/FrameLayout) FrameLayout is designed to block out an area on the screen to display a single item. [GLSurfaceView](https://developer.android.com/reference/android/opengl/GLSurfaceView) An implementation of SurfaceView that uses the dedicated surface for displaying OpenGL rendering. [Gallery](https://developer.android.com/reference/android/widget/Gallery) *This class was deprecated
in API level 16.
This widget is no longer supported. Other horizontally scrolling
widgets include `https://developer.android.com/reference/android/widget/HorizontalScrollView` and `https://developer.android.com/reference/androidx/viewpager/widget/ViewPager.html`
from the support library.* [GestureOverlayView](https://developer.android.com/reference/android/gesture/GestureOverlayView) A transparent overlay for gesture input that can be placed on top of other widgets or contain other widgets. [GridLayout](https://developer.android.com/reference/android/widget/GridLayout) A layout that places its children in a rectangular *grid*. [GridView](https://developer.android.com/reference/android/widget/GridView) A view that shows items in two-dimensional scrolling grid. [HorizontalScrollView](https://developer.android.com/reference/android/widget/HorizontalScrollView) Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. [ImageButton](https://developer.android.com/reference/android/widget/ImageButton)
Displays a button with an image (instead of text) that can be pressed
or clicked by the user.


[ImageSwitcher](https://developer.android.com/reference/android/widget/ImageSwitcher) `https://developer.android.com/reference/android/widget/ViewSwitcher` that switches between two ImageViews when a new image is set on it. [InlineContentView](https://developer.android.com/reference/android/widget/inline/InlineContentView) This class represents a view that holds opaque content from another app that you can inline in your UI. [LinearLayout](https://developer.android.com/reference/android/widget/LinearLayout) A layout that arranges other views either horizontally in a single column or vertically in a single row. [ListView](https://developer.android.com/reference/android/widget/ListView) Displays a vertically-scrollable collection of views, where each view is positioned
immediately below the previous view in the list.


[MediaController](https://developer.android.com/reference/android/widget/MediaController) A view containing controls for a MediaPlayer. [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. [NumberPicker](https://developer.android.com/reference/android/widget/NumberPicker) A widget that enables the user to select a number from a predefined range. [QuickContactBadge](https://developer.android.com/reference/android/widget/QuickContactBadge) Widget used to show an image with the standard QuickContact badge and on-click behavior. [RadioButton](https://developer.android.com/reference/android/widget/RadioButton)
A radio button is a two-states button that can be either checked or
unchecked.


[RadioGroup](https://developer.android.com/reference/android/widget/RadioGroup) This class is used to create a multiple-exclusion scope for a set of radio
buttons.


[RatingBar](https://developer.android.com/reference/android/widget/RatingBar) A RatingBar is an extension of SeekBar and ProgressBar that shows a rating in stars. [RelativeLayout](https://developer.android.com/reference/android/widget/RelativeLayout) A Layout where the positions of the children can be described in relation to each other or to the parent. [ScrollView](https://developer.android.com/reference/android/widget/ScrollView) A view group that allows the view hierarchy placed within it to be scrolled. [SearchView](https://developer.android.com/reference/android/widget/SearchView) A widget that provides a user interface for the user to enter a search query and submit a request to a search provider. [SeekBar](https://developer.android.com/reference/android/widget/SeekBar) A SeekBar is an extension of ProgressBar that adds a draggable thumb. [SlidingDrawer](https://developer.android.com/reference/android/widget/SlidingDrawer) *This class was deprecated
in API level 17.
This class is not supported anymore. It is recommended you
base your own implementation on the source code for the Android Open
Source Project if you must use it in your application.* [Spinner](https://developer.android.com/reference/android/widget/Spinner) A view that displays one child at a time and lets the user pick among them. [SplashScreenView](https://developer.android.com/reference/android/window/SplashScreenView) The view which allows an activity to customize its splash screen exit animation.


[StackView](https://developer.android.com/reference/android/widget/StackView) A view that displays its children in a stack and allows users to discretely swipe through the children. [Switch](https://developer.android.com/reference/android/widget/Switch) A Switch is a two-state toggle widget. [TabHost](https://developer.android.com/reference/android/widget/TabHost) *This class was deprecated
in API level 30.
new applications should use fragment APIs instead of this class:
Use [TabLayout and ViewPager](https://developer.android.com/guide/navigation/navigation-swipe-view)
instead.* [TabWidget](https://developer.android.com/reference/android/widget/TabWidget) *This class was deprecated
in API level 30.
new applications should use fragment APIs instead of this class:
Use [TabLayout and ViewPager](https://developer.android.com/guide/navigation/navigation-swipe-view)
instead.* [TableLayout](https://developer.android.com/reference/android/widget/TableLayout) A layout that arranges its children into rows and columns.


[TableRow](https://developer.android.com/reference/android/widget/TableRow) A layout that arranges its children horizontally.


[TextClock](https://developer.android.com/reference/android/widget/TextClock) `TextClock` can display the current date and/or time as
a formatted string.


[TextSwitcher](https://developer.android.com/reference/android/widget/TextSwitcher) Specialized `https://developer.android.com/reference/android/widget/ViewSwitcher` that contains only children of type `https://developer.android.com/reference/android/widget/TextView`. [TimePicker](https://developer.android.com/reference/android/widget/TimePicker) A widget for selecting the time of day, in either 24-hour or AM/PM mode. [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". [Toolbar](https://developer.android.com/reference/android/widget/Toolbar) A standard toolbar for use within application content. [TvAdView](https://developer.android.com/reference/android/media/tv/ad/TvAdView) Displays contents of TV advertisement services. [TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView) Displays contents of interactive TV applications. [TvView](https://developer.android.com/reference/android/media/tv/TvView) Displays TV contents. [TwoLineListItem](https://developer.android.com/reference/android/widget/TwoLineListItem) *This class was deprecated
in API level 17.
This class can be implemented easily by apps using a `https://developer.android.com/reference/android/widget/RelativeLayout`
or a `https://developer.android.com/reference/android/widget/LinearLayout`.* [VideoView](https://developer.android.com/reference/android/widget/VideoView) Displays a video file. [ViewAnimator](https://developer.android.com/reference/android/widget/ViewAnimator) Base class for a `https://developer.android.com/reference/android/widget/FrameLayout` container that will perform animations when switching between its views. [ViewFlipper](https://developer.android.com/reference/android/widget/ViewFlipper) Simple `https://developer.android.com/reference/android/widget/ViewAnimator` that will animate between two or more views that have been added to it. [ViewSwitcher](https://developer.android.com/reference/android/widget/ViewSwitcher) `https://developer.android.com/reference/android/widget/ViewAnimator` that switches between two views, and has a factory from which these views are created. [WebView](https://developer.android.com/reference/android/webkit/WebView) A View that displays web pages. [ZoomButton](https://developer.android.com/reference/android/widget/ZoomButton) *This class was deprecated
in API level 26.
Use other means to handle this functionality. This widget is merely a
simple wrapper around a long-press handler.* [ZoomControls](https://developer.android.com/reference/android/widget/ZoomControls) *This class was deprecated
in API level 29.
This functionality and UI is better handled with custom views and layouts
rather than a dedicated zoom-control widget*   

*** ** * ** ***

<br />


This class represents the basic building block for user interface components. A View
occupies a rectangular area on the screen and is responsible for drawing and
event handling. View is the base class for *widgets* , which are
used to create interactive UI components (buttons, text fields, etc.). The
`https://developer.android.com/reference/android/view/ViewGroup` subclass is the base class for *layouts*, which
are invisible containers that hold other Views (or other ViewGroups) and define
their layout properties.

### Developer Guides

For information about using this class to develop your application's user interface,
read the [User Interface](https://developer.android.com/guide/topics/ui) developer guide.

### Using Views


All of the views in a window are arranged in a single tree. You can add views
either from code or by specifying a tree of views in one or more XML layout
files. There are many specialized subclasses of views that act as controls or
are capable of displaying text, images, or other content.


Once you have created a tree of views, there are typically a few types of
common operations you may wish to perform:

- **Set properties:** for example setting the text of a `https://developer.android.com/reference/android/widget/TextView`. The available properties and the methods that set them will vary among the different subclasses of views. Note that properties that are known at build time can be set in the XML layout files.
- **Set focus:** The framework will handle moving focus in response to user input. To force focus to a specific view, call `https://developer.android.com/reference/android/view/View#requestFocus()`.
- **Set up listeners:** Views allow clients to set listeners that will be notified when something interesting happens to the view. For example, all views will let you set a listener to be notified when the view gains or loses focus. You can register such a listener using `https://developer.android.com/reference/android/view/View#setOnFocusChangeListener(android.view.View.OnFocusChangeListener)`. Other view subclasses offer more specialized listeners. For example, a Button exposes a listener to notify clients when the button is clicked.
- **Set visibility:** You can hide or show views using `https://developer.android.com/reference/android/view/View#setVisibility(int)`.

<br />

*Note: The Android framework is responsible for measuring, laying out and
drawing views. You should not call methods that perform these actions on
views yourself unless you are actually implementing a
`https://developer.android.com/reference/android/view/ViewGroup`.*

### Implementing a Custom View


To implement a custom view, you will usually begin by providing overrides for
some of the standard methods that the framework calls on all views. You do
not need to override all of these methods. In fact, you can start by just
overriding `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`.

| Category | Methods | Description |
|---|---|---|
| Creation | Constructors | There is a form of the constructor that are called when the view is created from code and a form that is called when the view is inflated from a layout file. The second form should parse and apply any attributes defined in the layout file. |
| Creation | `` `https://developer.android.com/reference/android/view/View#onFinishInflate()` `` | Called after a view and all of its children has been inflated from XML. |
| Layout | `` `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` `` | Called to determine the size requirements for this view and all of its children. |
| Layout | `` `https://developer.android.com/reference/android/view/View#onLayout(boolean,%20int,%20int,%20int,%20int)` `` | Called when this view should assign a size and position to all of its children. |
| Layout | `` `https://developer.android.com/reference/android/view/View#onSizeChanged(int,%20int,%20int,%20int)` `` | Called when the size of this view has changed. |
| Drawing | `` `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)` `` | Called when the view should render its content. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onKeyDown(int,%20android.view.KeyEvent)` `` | Called when a new hardware key event occurs. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onKeyUp(int,%20android.view.KeyEvent)` `` | Called when a hardware key up event occurs. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onTrackballEvent(android.view.MotionEvent)` `` | Called when a trackball motion event occurs. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)` `` | Called when a motion event occurs with pointers down on the view. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onGenericMotionEvent(android.view.MotionEvent)` `` | Called when a generic motion event occurs. |
| Event processing | `` `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)` `` | Called when a hover motion event occurs. |
| Focus | `` `https://developer.android.com/reference/android/view/View#onFocusChanged(boolean,%20int,%20android.graphics.Rect)` `` | Called when the view gains or loses focus. |
| Focus | `` `https://developer.android.com/reference/android/view/View#onWindowFocusChanged(boolean)` `` | Called when the window containing the view gains or loses focus. |
| Attaching | `` `https://developer.android.com/reference/android/view/View#onAttachedToWindow()` `` | Called when the view is attached to a window. |
| Attaching | `` `https://developer.android.com/reference/android/view/View#onDetachedFromWindow()` `` | Called when the view is detached from its window. |
| Attaching | `` `https://developer.android.com/reference/android/view/View#onWindowVisibilityChanged(int)` `` | Called when the visibility of the window containing the view has changed. |

<br />

### IDs

Views may have an integer id associated with them. These ids are typically assigned in the layout XML files, and are used to find specific views within the view tree. A common pattern is to:

- Define a Button in the layout file and assign it a unique ID.

  ```
  <Button
      android:id="@+id/my_button"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/my_button_text"/>
  ```
- From the onCreate method of an Activity, find the Button

  ```
       Button myButton = findViewById(R.id.my_button);
  ```


View IDs need not be unique throughout the tree, but it is good practice to
ensure that they are at least unique within the part of the tree you are
searching.

### Position


The geometry of a view is that of a rectangle. A view has a location,
expressed as a pair of *left* and *top* coordinates, and
two dimensions, expressed as a width and a height. The unit for location
and dimensions is the pixel.


It is possible to retrieve the location of a view by invoking the methods
`https://developer.android.com/reference/android/view/View#getLeft()` and `https://developer.android.com/reference/android/view/View#getTop()`. The former returns the left, or X,
coordinate of the rectangle representing the view. The latter returns the
top, or Y, coordinate of the rectangle representing the view. These methods
both return the location of the view relative to its parent. For instance,
when getLeft() returns 20, that means the view is located 20 pixels to the
right of the left edge of its direct parent.


In addition, several convenience methods are offered to avoid unnecessary
computations, namely `https://developer.android.com/reference/android/view/View#getRight()` and `https://developer.android.com/reference/android/view/View#getBottom()`.
These methods return the coordinates of the right and bottom edges of the
rectangle representing the view. For instance, calling `https://developer.android.com/reference/android/view/View#getRight()`
is similar to the following computation: `getLeft() + getWidth()`
(see [Size](https://developer.android.com/reference/android/view/View#SizePaddingMargins) for more information about the width.)

### Size, padding and margins


The size of a view is expressed with a width and a height. A view actually
possess two pairs of width and height values.


The first pair is known as *measured width* and
*measured height* . These dimensions define how big a view wants to be
within its parent (see [Layout](https://developer.android.com/reference/android/view/View#Layout) for more details.) The
measured dimensions can be obtained by calling `https://developer.android.com/reference/android/view/View#getMeasuredWidth()`
and `https://developer.android.com/reference/android/view/View#getMeasuredHeight()`.


The second pair is simply known as *width* and *height* , or
sometimes *drawing width* and *drawing height* . These
dimensions define the actual size of the view on screen, at drawing time and
after layout. These values may, but do not have to, be different from the
measured width and height. The width and height can be obtained by calling
`https://developer.android.com/reference/android/view/View#getWidth()` and `https://developer.android.com/reference/android/view/View#getHeight()`.


To measure its dimensions, a view takes into account its padding. The padding
is expressed in pixels for the left, top, right and bottom parts of the view.
Padding can be used to offset the content of the view by a specific amount of
pixels. For instance, a left padding of 2 will push the view's content by
2 pixels to the right of the left edge. Padding can be set using the
`https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)` or `https://developer.android.com/reference/android/view/View#setPaddingRelative(int,%20int,%20int,%20int)`
method and queried by calling `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()`, `https://developer.android.com/reference/android/view/View#getPaddingBottom()`, `https://developer.android.com/reference/android/view/View#getPaddingStart()`,
`https://developer.android.com/reference/android/view/View#getPaddingEnd()`.


Even though a view can define a padding, it does not provide any support for
margins. However, view groups provide such a support. Refer to
`https://developer.android.com/reference/android/view/ViewGroup` and
`https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams` for further information.

### Layout


Layout is a two pass process: a measure pass and a layout pass. The measuring
pass is implemented in `https://developer.android.com/reference/android/view/View#measure(int,%20int)` and is a top-down traversal
of the view tree. Each view pushes dimension specifications down the tree
during the recursion. At the end of the measure pass, every view has stored
its measurements. The second pass happens in
`https://developer.android.com/reference/android/view/View#layout(int,%20int,%20int,%20int)` and is also top-down. During
this pass each parent is responsible for positioning all of its children
using the sizes computed in the measure pass.


When a view's measure() method returns, its `https://developer.android.com/reference/android/view/View#getMeasuredWidth()` and
`https://developer.android.com/reference/android/view/View#getMeasuredHeight()` values must be set, along with those for all of
that view's descendants. A view's measured width and measured height values
must respect the constraints imposed by the view's parents. This guarantees
that at the end of the measure pass, all parents accept all of their
children's measurements. A parent view may call measure() more than once on
its children. For example, the parent may measure each child once with
unspecified dimensions to find out how big they want to be, then call
measure() on them again with actual numbers if the sum of all the children's
unconstrained sizes is too big or too small.


The measure pass uses two classes to communicate dimensions. The
`https://developer.android.com/reference/android/view/View.MeasureSpec` class is used by views to tell their parents how they
want to be measured and positioned. The base LayoutParams class just
describes how big the view wants to be for both width and height. For each
dimension, it can specify one of:

- an exact number
- MATCH_PARENT, which means the view wants to be as big as its parent (minus padding)
- WRAP_CONTENT, which means that the view wants to be just big enough to enclose its content (plus padding).

There are subclasses of LayoutParams for different subclasses of ViewGroup. For example, AbsoluteLayout has its own subclass of LayoutParams which adds an X and Y value.

<br />


MeasureSpecs are used to push requirements down the tree from parent to
child. A MeasureSpec can be in one of three modes:

- UNSPECIFIED: This is used by a parent to determine the desired dimension of a child view. For example, a LinearLayout may call measure() on its child with the height set to UNSPECIFIED and a width of EXACTLY 240 to find out how tall the child view wants to be given a width of 240 pixels.
- EXACTLY: This is used by the parent to impose an exact size on the child. The child must use this size, and guarantee that all of its descendants will fit within this size.
- AT_MOST: This is used by the parent to impose a maximum size on the child. The child must guarantee that it and all of its descendants will fit within this size.

<br />


To initiate a layout, call `https://developer.android.com/reference/android/view/View#requestLayout()`. This method is typically
called by a view on itself when it believes that it can no longer fit within
its current bounds.

### Drawing


Drawing is handled by walking the tree and recording the drawing commands of
any View that needs to update. After this, the drawing commands of the
entire tree are issued to screen, clipped to the newly damaged area.


The tree is largely recorded and drawn in order, with parents drawn before
(i.e., behind) their children, with siblings drawn in the order they appear
in the tree. If you set a background drawable for a View, then the View will
draw it before calling back to its `onDraw()` method. The child
drawing order can be overridden with
`https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingOrderEnabled(boolean)`
in a ViewGroup, and with `https://developer.android.com/reference/android/view/View#setZ(float)` custom Z values} set on Views.


To force a view to draw, call `https://developer.android.com/reference/android/view/View#invalidate()`.

### Event Handling and Threading


The basic cycle of a view is as follows:

1. An event comes in and is dispatched to the appropriate view. The view handles the event and notifies any listeners.
2. If in the course of processing the event, the view's bounds may need to be changed, the view will call `https://developer.android.com/reference/android/view/View#requestLayout()`.
3. Similarly, if in the course of processing the event the view's appearance may need to be changed, the view will call `https://developer.android.com/reference/android/view/View#invalidate()`.
4. If either `https://developer.android.com/reference/android/view/View#requestLayout()` or `https://developer.android.com/reference/android/view/View#invalidate()` were called, the framework will take care of measuring, laying out, and drawing the tree as appropriate.

<br />

*Note: The entire view tree is single threaded. You must always be on
the UI thread when calling any method on any view.*
If you are doing work on other threads and want to update the state of a view
from that thread, you should use a `https://developer.android.com/reference/android/os/Handler`.

### Focus Handling


The framework will handle routine focus movement in response to user input.
This includes changing the focus as views are removed or hidden, or as new
views become available. Views indicate their willingness to take focus
through the `https://developer.android.com/reference/android/view/View#isFocusable()` method. To change whether a view can take
focus, call `https://developer.android.com/reference/android/view/View#setFocusable(boolean)`. When in touch mode (see notes below)
views indicate whether they still would like focus via `https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()`
and can change this via `https://developer.android.com/reference/android/view/View#setFocusableInTouchMode(boolean)`.


Focus movement is based on an algorithm which finds the nearest neighbor in a
given direction. In rare cases, the default algorithm may not match the
intended behavior of the developer. In these situations, you can provide
explicit overrides by using these XML attributes in the layout file:

```
nextFocusDown
nextFocusLeft
nextFocusRight
nextFocusUp
```

<br />


To get a particular view to take focus, call `https://developer.android.com/reference/android/view/View#requestFocus()`.

### Touch Mode


When a user is navigating a user interface via directional keys such as a D-pad, it is
necessary to give focus to actionable items such as buttons so the user can see
what will take input. If the device has touch capabilities, however, and the user
begins interacting with the interface by touching it, it is no longer necessary to
always highlight, or give focus to, a particular view. This motivates a mode
for interaction named 'touch mode'.


For a touch capable device, once the user touches the screen, the device
will enter touch mode. From this point onward, only views for which
`https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()` is true will be focusable, such as text editing widgets.
Other views that are touchable, like buttons, will not take focus when touched; they will
only fire the on click listeners.


Any time a user hits a directional key, such as a D-pad direction, the view device will
exit touch mode, and find a view to take focus, so that the user may resume interacting
with the user interface without touching the screen again.


The touch mode state is maintained across `https://developer.android.com/reference/android/app/Activity`s. Call
`https://developer.android.com/reference/android/view/View#isInTouchMode()` to see whether the device is currently in touch mode.

### Scrolling


The framework provides basic support for views that wish to internally
scroll their content. This includes keeping track of the X and Y scroll
offset as well as mechanisms for drawing scrollbars. See
`https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)`, `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)`, and
`https://developer.android.com/reference/android/view/View#awakenScrollBars()` for more details.

### Tags


Unlike IDs, tags are not used to identify views. Tags are essentially an
extra piece of information that can be associated with a view. They are most
often used as a convenience to store data related to views in the views
themselves rather than by putting them in a separate structure.


Tags may be specified with character sequence values in layout XML as either
a single tag using the `https://developer.android.com/reference/android/R.styleable#View_tag`
attribute or multiple tags using the `<tag>` child element:

```
    <View ...
          android:tag="@string/mytag_value" />
    <View ...>
        <tag android:id="@+id/mytag"
             android:value="@string/mytag_value" />
    </View>
```

<br />


Tags may also be specified with arbitrary objects from code using
`https://developer.android.com/reference/android/view/View#setTag(java.lang.Object)` or `https://developer.android.com/reference/android/view/View#setTag(int,%20java.lang.Object)`.

### Themes


By default, Views are created using the theme of the Context object supplied
to their constructor; however, a different theme may be specified by using
the `https://developer.android.com/reference/android/R.styleable#View_theme` attribute in layout
XML or by passing a `https://developer.android.com/reference/android/view/ContextThemeWrapper` to the constructor from
code.


When the `https://developer.android.com/reference/android/R.styleable#View_theme` attribute is
used in XML, the specified theme is applied on top of the inflation
context's theme (see `https://developer.android.com/reference/android/view/LayoutInflater`) and used for the view itself as
well as any child elements.


In the following example, both views will be created using the Material dark
color scheme; however, because an overlay theme is used which only defines a
subset of attributes, the value of
`https://developer.android.com/reference/android/R.styleable#Theme_colorAccent` defined on
the inflation context's theme (e.g. the Activity theme) will be preserved.

```
    <LinearLayout
            ...
            android:theme="@android:theme/ThemeOverlay.Material.Dark">
        <View ...>
    </LinearLayout>
```

<br />

### Properties


The View class exposes an `https://developer.android.com/reference/android/view/View#ALPHA` property, as well as several transform-related
properties, such as `https://developer.android.com/reference/android/view/View#TRANSLATION_X` and `https://developer.android.com/reference/android/view/View#TRANSLATION_Y`. These properties are
available both in the `https://developer.android.com/reference/android/util/Property` form as well as in similarly-named setter/getter
methods (such as `https://developer.android.com/reference/android/view/View#setAlpha(float)` for `https://developer.android.com/reference/android/view/View#ALPHA`). These properties can
be used to set persistent state associated with these rendering-related properties on the view.
The properties and methods can also be used in conjunction with
`https://developer.android.com/reference/android/animation/Animator`-based animations, described more in the
[Animation](https://developer.android.com/reference/android/view/View#Animation) section.

### Animation


Starting with Android 3.0, the preferred way of animating views is to use the
`https://developer.android.com/reference/android/animation/package-summary` package APIs. These `https://developer.android.com/reference/android/animation/Animator`-based
classes change actual properties of the View object, such as `https://developer.android.com/reference/android/view/View#setAlpha(float)` and
`https://developer.android.com/reference/android/view/View#setTranslationX(float)`. This behavior is contrasted to that of the pre-3.0
`https://developer.android.com/reference/android/view/animation/Animation`-based classes, which instead animate only
how the view is drawn on the display. In particular, the `https://developer.android.com/reference/android/view/ViewPropertyAnimator` class
makes animating these View properties particularly easy and efficient.


Alternatively, you can use the pre-3.0 animation classes to animate how Views are rendered.
You can attach an `https://developer.android.com/reference/android/view/animation/Animation` object to a view using
`https://developer.android.com/reference/android/view/View#setAnimation(android.view.animation.Animation)` or
`https://developer.android.com/reference/android/view/View#startAnimation(android.view.animation.Animation)`. The animation can alter the scale,
rotation, translation and alpha of a view over time. If the animation is
attached to a view that has children, the animation will affect the entire
subtree rooted by that node. When an animation is started, the framework will
take care of redrawing the appropriate views until the animation completes.

### Security


Sometimes it is essential that an application be able to verify that an action
is being performed with the full knowledge and consent of the user, such as
granting a permission request, making a purchase or clicking on an advertisement.
Unfortunately, a malicious application could try to spoof the user into
performing these actions, unaware, by concealing the intended purpose of the view.
As a remedy, the framework offers a touch filtering mechanism that can be used to
improve the security of views that provide access to sensitive functionality.


To enable touch filtering, call `https://developer.android.com/reference/android/view/View#setFilterTouchesWhenObscured(boolean)` or set the
android:filterTouchesWhenObscured layout attribute to true. When enabled, the framework
will discard touches that are received whenever the view's window is obscured by
another visible window at the touched location. As a result, the view will not receive touches
whenever the touch passed through a toast, dialog or other window that appears above the view's
window.


For more fine-grained control over security, consider overriding the
`https://developer.android.com/reference/android/view/View#onFilterTouchEventForSecurity(android.view.MotionEvent)` method to implement your own
security policy. See also `https://developer.android.com/reference/android/view/MotionEvent#FLAG_WINDOW_IS_OBSCURED`.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup`

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/view/View.AccessibilityDelegate` <br /> This class represents a delegate that can be registered in a `https://developer.android.com/reference/android/view/View` to enhance accessibility support via composition rather via inheritance. |
| ` class` | `https://developer.android.com/reference/android/view/View.BaseSavedState` Base class for derived classes that want to save and restore their own state in `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`. |
| ` interface` | `https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener` A listener that is notified when certain View APIs are called from the wrong thread. |
| ` class` | `https://developer.android.com/reference/android/view/View.DragShadowBuilder` Creates an image that the system displays during the drag and drop operation. |
| ` class` | `https://developer.android.com/reference/android/view/View.MeasureSpec` A MeasureSpec encapsulates the layout requirements passed from parent to child. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` Listener for applying window insets on a view in a custom way. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnAttachStateChangeListener` Interface definition for a callback to be invoked when this view is attached or detached from its window. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnCapturedPointerListener` Interface definition for a callback to be invoked when a captured pointer event is being dispatched this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnClickListener` Interface definition for a callback to be invoked when a view is clicked. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnContextClickListener` Interface definition for a callback to be invoked when a view is context clicked. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener` Interface definition for a callback to be invoked when the context menu for this view is being built. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnDragListener` Interface definition for a listener that's invoked when a drag event is dispatched to this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnFocusChangeListener` Interface definition for a callback to be invoked when the focus state of a view changed. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnGenericMotionListener` Interface definition for a callback to be invoked when a generic motion event is dispatched to this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnHoverListener` Interface definition for a callback to be invoked when a hover event is dispatched to this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnKeyListener` Interface definition for a callback to be invoked when a hardware key event is dispatched to this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnLayoutChangeListener` Interface definition for a callback to be invoked when the layout bounds of a view changes due to layout processing. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnLongClickListener` Interface definition for a callback to be invoked when a view has been clicked and held. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnScrollChangeListener` Interface definition for a callback to be invoked when the scroll X or Y positions of a view change. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener` *This interface 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.* |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnTouchListener` Interface definition for a callback to be invoked when a touch event is dispatched to this view. |
| ` interface` | `https://developer.android.com/reference/android/view/View.OnUnhandledKeyEventListener` Interface definition for a callback to be invoked when a hardware key event hasn't been handled by the view hierarchy. |

| ### XML attributes ||
|---|---|
| [`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/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. |

| ### Fields ||
|---|---|
| ` 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/view/View#View(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Simple constructor to use when creating a view from code. |
| ` https://developer.android.com/reference/android/view/View#View(android.content.Context,%20android.util.AttributeSet)(https://developer.android.com/reference/android/content/Context context, https://developer.android.com/reference/android/util/AttributeSet attrs) ` Constructor that is called when inflating a view from XML. |
| ` https://developer.android.com/reference/android/view/View#View(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) ` Perform inflation from XML and apply a class-specific base style from a theme attribute. |
| ` https://developer.android.com/reference/android/view/View#View(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) ` Perform inflation from XML and apply a class-specific base style from a theme attribute or style resource. |

| ### Public methods ||
|---|---|
| ` 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. |
| ` 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()`. |
| ` 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. |
| ` 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#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#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#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#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#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#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. |
| ` 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. |
| ` 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#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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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#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. |
| ` 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. |
| ` 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#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. |
| ` 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. |
| ` 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#onDrawForeground(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas) ` Draw any foreground content for this view. |
| ` 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#onFinishTemporaryDetach()() ` Called after `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()` when the container is done changing the view. |
| ` 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#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#onRtlPropertiesChanged(int)(int layoutDirection) ` Called when any RTL property (layout direction or text direction or text alignment) has been changed. |
| ` 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#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#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.* |
| ` 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. |
| ` 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#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. |

| ### Protected methods ||
|---|---|
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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#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. |
| ` 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#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#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#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. |
| ` 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.* |
| ` 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. |
| ` 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. |
| ` int` | ` https://developer.android.com/reference/android/view/View#getHorizontalScrollbarHeight()() ` Returns the height of the horizontal scrollbar. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` int` | ` https://developer.android.com/reference/android/view/View#getWindowAttachCount()() ` |
| ` 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. |
| ` 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#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. |
| ` 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#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. |
| ` 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. |
| ` 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. |
| ` 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. |
| ` 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#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. |
| ` 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#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()`. |
| ` 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#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#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#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. |
| ` 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. |
| ` 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. |

### Inherited methods

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.


## XML attributes

### android:accessibilityHeading

Whether or not this view is a heading for accessibility purposes.

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

<br />

**Related methods:**

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

### android:accessibilityLiveRegion

Indicates to accessibility services whether the user should be notified when
this view changes.

May be an integer value, such as "`100`".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| assertive | 2 | Accessibility services should interrupt ongoing speech to immediately announce changes to this view. |
| none | 0 | Accessibility services should not announce changes to this view. |
| polite | 1 | Accessibility services should announce changes to this view. |

<br />

<br />

**Related methods:**

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

### android:accessibilityPaneTitle

The title this view should present to accessibility as a pane title.
See `https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)`

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/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)`

### android:accessibilityTraversalAfter

Sets the id of a view that screen readers are requested to visit before this view.
Requests that a screen-reader visits the content of the other view before the content
of this one. This does nothing if either view is not important for accessibility.

<br />

**Related methods:**

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

### android:accessibilityTraversalBefore

Sets the id of a view that screen readers are requested to visit after this view.
Requests that a screen-reader visits the content of this view before the content of the
one it precedes. This does nothing if either view is not important for accessibility.

<br />

**Related methods:**

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

### android:allowClickWhenDisabled

Whether or not allow clicks on disabled view.

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

<br />

**Related methods:**

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

### android:alpha

alpha property of the view, as a value between 0 (completely transparent) and 1
(completely opaque).

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:autoHandwritingEnabled

<br />

Whether or not the auto handwriting initiation is enabled in this View.

For a view with an active `https://developer.android.com/reference/android/view/inputmethod/InputConnection`,
if auto handwriting initiation is enabled, stylus movement within its view boundary
will automatically trigger the handwriting mode.
See `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`.

The default value of this flag is configurable by the device manufacturer.

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

<br />

**Related methods:**

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

### android:autofillHints

Describes the content of a view so that a autofill service can fill in the appropriate
data. Multiple hints can be combined in a comma separated list or an array of strings
to mean e.g. emailAddress or postalAddress.

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;

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])`

### 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*`".

<br />

**Related methods:**

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

### android:background

A drawable to use as the background. This can be either a reference
to a full drawable resource (such as a PNG image, 9-patch,
XML state list description, etc), or a solid color such as "#ff000000"
(black).

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/view/View#setBackgroundResource(int)`

### android:backgroundTint

Tint to apply to the background.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

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

### android:backgroundTintMode

Blending mode used to apply the background 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/view/View#setBackgroundTintMode(android.graphics.PorterDuff.Mode)`

### android:clickable

Defines whether this view reacts to click events.

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

<br />

**Related methods:**

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

### android:clipToOutline

<br />

Whether the View's Outline should be used to clip the contents of the View.

Only a single non-rectangular clip can be applied on a View at any time. Circular
clips from a
`https://developer.android.com/reference/android/view/ViewAnimationUtils#createCircularReveal(android.view.View,%20int,%20int,%20float,%20float)` circular reveal animation take priority over Outline clipping, and child
Outline clipping takes priority over Outline clipping done by a parent.

Note that this flag will only be respected if the View's Outline returns true from
`https://developer.android.com/reference/android/graphics/Outline#canClip()`.

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

<br />

**Related methods:**

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

### android:contentDescription

Defines text that briefly describes content of the view. This property is used
primarily for accessibility. Since some views do not have textual
representation this attribute can be used for providing such.

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/view/View#setContentDescription(java.lang.CharSequence)`

### android:contextClickable

Defines whether this view reacts to context click events.

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

<br />

**Related methods:**

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

### 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.

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

<br />

**Related methods:**

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

### android:drawingCacheQuality

Defines the quality of translucent drawing caches. This property is used
only when the drawing cache is enabled and translucent. The default value is auto.
Deprecated: The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| auto | 0 | Lets the framework decide what quality level should be used for the drawing cache. Deprecated: The view drawing cache was largely made obsolete with the introduction of hardware-accelerated rendering in API 11. |
| high | 2 | High quality. When set to high quality, the drawing cache uses a higher color depth but uses more memory. Deprecated: The view drawing cache was largely made obsolete with the introduction of hardware-accelerated rendering in API 11. |
| low | 1 | Low quality. When set to low quality, the drawing cache uses a lower color depth, thus losing precision in rendering gradients, but uses less memory. Deprecated: The view drawing cache was largely made obsolete with the introduction of hardware-accelerated rendering in API 11. |

<br />

<br />

**Related methods:**

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

### 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.

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

<br />

### android:elevation

base z depth of the view.

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/view/View#setElevation(float)`

### android:fadeScrollbars

Defines whether to fade out scrollbars when they are not in use.

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

<br />

**Related methods:**

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

### android:fadingEdgeLength

Defines the length of the fading edges.

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/view/View#getVerticalFadingEdgeLength()`

### android:filterTouchesWhenObscured

Specifies whether to filter touches when the view's window is obscured by
another visible window. When set to true, the view will not receive touches
whenever a toast, dialog or other window appears above the view's window.
Refer to the `https://developer.android.com/reference/android/view/View` security documentation for more details.

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

<br />

**Related methods:**

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

### android:fitsSystemWindows

Boolean internal attribute to adjust view layout based on
system windows such as the status bar.
If true, adjusts the padding of this view to leave space for the system windows.
Will only take effect if this view is in a non-embedded activity.

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

<br />

**Related methods:**

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

### android:focusable

Controls whether a view can take focus. By default, this is "auto" which lets the
framework determine whether a user can move focus to a view. By setting this attribute
to true the view is allowed to take focus. By setting it to "false" the view will not
take focus. This value does not impact the behavior of
directly calling `https://developer.android.com/reference/android/view/View#requestFocus()`, which will
always request focus regardless of this view. It only impacts where
focus navigation will try to move focus.

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

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| auto | 10 |   |

<br />

<br />

**Related methods:**

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

### android:focusableInTouchMode

Boolean that controls whether a view can take focus while in touch mode.
If this is true for a view, that view can gain focus when clicked on, and can keep
focus if another view is clicked on that doesn't have this attribute set to true.

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

<br />

**Related methods:**

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

### android:focusedByDefault

Whether this view is a default-focus view.
Only one view per keyboard navigation cluster can have this attribute set to true.
See `https://developer.android.com/reference/android/view/View#setFocusedByDefault(boolean)`.

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

<br />

**Related methods:**

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

### android:forceHasOverlappingRendering

Whether this view has elements that may overlap when drawn. See
`https://developer.android.com/reference/android/view/View#forceHasOverlappingRendering(boolean)`.

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

<br />

**Related methods:**

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

### android:foreground

Defines the drawable to draw over the content. This can be used as an overlay.
The foreground drawable participates in the padding of the content if the gravity
is set to fill.

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/view/View#setForeground(android.graphics.drawable.Drawable)`

### android:foregroundGravity

Defines the gravity to apply to the foreground drawable. The gravity defaults
to fill.

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. |
| 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. |
| top | 30 | Push object to the top of its container, not changing its size. |

<br />

<br />

**Related methods:**

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

### android:foregroundTint

Tint to apply to the foreground.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

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

### android:foregroundTintMode

Blending mode used to apply the foreground 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/view/View#setForegroundTintMode(android.graphics.PorterDuff.Mode)`

### android:hapticFeedbackEnabled

Boolean that controls whether a view should have haptic feedback
enabled for events such as long presses.

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

<br />

**Related methods:**

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

### 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)`.
This must be a
resource reference; typically you set this using the
`@+` syntax to create a new ID resources.
For example: `android:id="@+id/my_id"` which
allows you to later retrieve the view
with `findViewById(R.id.my_id)`.

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/view/View#setId(int)`

### android:importantForAccessibility

Describes whether or not this view is important for accessibility.
If it is important, the view fires accessibility events and is
reported to accessibility services that query the screen. Note:
While not recommended, an accessibility service may decide to
ignore this attribute and operate on all views in the view tree.

May be an integer value, such as "`100`".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| auto | 0 | The system determines whether the view is important for accessibility - default (recommended). |
| no | 2 | The view is not important for accessibility. |
| noHideDescendants | 4 | The view is not important for accessibility, nor are any of its descendant views. |
| yes | 1 | The view is important for accessibility. |

<br />

<br />

**Related methods:**

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

### 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.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| auto | 0 | Let the Android System use its heuristics to determine if the view is important for autofill. |
| no | 2 | Hint the Android System that this view is \*not\* important for autofill, but its children (if any) will be traversed.. |
| noExcludeDescendants | 8 | Hint the Android System that this view is \*not\* important for autofill, and its children (if any) will not be traversed. |
| yes | 1 | Hint the Android System that this view is important for autofill, and its children (if any) will be traversed.. |
| yesExcludeDescendants | 4 | Hint the Android System that this view is important for autofill, but its children (if any) will not be traversed. |

<br />

<br />

**Related methods:**

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

### android:importantForContentCapture

Hints the Android System whether the view node associated with this View should be
use for content capture purposes.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| auto | 0 | Let the Android System use its heuristics to determine if the view is important for content capture. |
| no | 2 | Hint the Android System that this view is \*not\* important for content capture, but its children (if any) will be traversed.. |
| noExcludeDescendants | 8 | Hint the Android System that this view is \*not\* important for content capture, and its children (if any) will not be traversed. |
| yes | 1 | Hint the Android System that this view is important for content capture, and its children (if any) will be traversed.. |
| yesExcludeDescendants | 4 | Hint the Android System that this view is important for content capture, but its children (if any) will not be traversed. |

<br />

<br />

**Related methods:**

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

### android:isCredential


**This is deprecated.**   

The isCredential attr is no longer needed.

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

Boolean that hints the Android System that the view is credential and associated with
CredentialManager.

<br />

**Related methods:**

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

### 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. If not set, the default
value will be true if "scrollbars" has the vertical scrollbar
set, else it will be false.

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

<br />

**Related methods:**

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

### android:keepScreenOn

Controls whether the view's window should keep the screen on
while visible.

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

<br />

**Related methods:**

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

### android:keyboardNavigationCluster

Whether this view is a root of a keyboard navigation cluster.
See `https://developer.android.com/reference/android/view/View#setKeyboardNavigationCluster(boolean)`.

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

<br />

**Related methods:**

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

### android:layerType

Specifies the type of layer backing this view. The default value is none.
Refer to `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
for more information.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| hardware | 2 | Use a hardware layer. Refer to `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` for more information. |
| none | 0 | Don't use a layer. |
| software | 1 | Use a software layer. Refer to `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` for more information. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`

### android:layoutDirection

Defines the direction of layout drawing. This typically is associated with writing
direction of the language script used. The possible values are "ltr" for Left-to-Right,
"rtl" for Right-to-Left, "locale", and "inherit" from parent view. If there is nothing
to inherit, "locale" is used. "locale" falls back to "en-US". "ltr" is the direction
used in "en-US". The default for this attribute is "inherit".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| inherit | 2 | Inherit from parent. |
| locale | 3 | Locale. |
| ltr | 0 | Left-to-Right. |
| rtl | 1 | Right-to-Left. |

<br />

<br />

**Related methods:**

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

### android:longClickable

Defines whether this view reacts to long click events.

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

<br />

**Related methods:**

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

### android:minHeight

Defines the minimum height of the view. It is not guaranteed
the view will be able to achieve this minimum height (for example,
if its parent layout constrains it with less available height).

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/view/View#setMinimumHeight(int)`

### android:minWidth

Defines the minimum width of the view. It is not guaranteed
the view will be able to achieve this minimum width (for example,
if its parent layout constrains it with less available width).

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/view/View#setMinimumWidth(int)`

### android:nextClusterForward

Defines the next keyboard navigation cluster.
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.

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/view/View#setNextClusterForwardId(int)`

### 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.

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/view/View#setNextFocusDownId(int)`

### 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.

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/view/View#setNextFocusForwardId(int)`

### 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`.
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.

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/view/View#setNextFocusLeftId(int)`

### 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.

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/view/View#setNextFocusRightId(int)`

### 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.

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/view/View#setNextFocusUpId(int)`

### 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;

Name of the method in this View's context to invoke when the view is
clicked. This name must correspond to a public method that takes
exactly one parameter of type View. For instance, if you specify
`android:onClick="sayHello"`, you must declare a
`public void sayHello(View v)` method of your context
(typically, your Activity).

<br />

### android:outlineAmbientShadowColor

Sets the color of the ambient shadow that is drawn when the view has a positive Z
or elevation value.


By default the shadow color is black. Generally, this color will be opaque so the
intensity of the shadow is consistent between different views with different colors.


The opacity of the final ambient shadow is a function of the shadow caster height,
the alpha channel of the outlineAmbientShadowColor (typically opaque), and the
`https://developer.android.com/reference/android/R.attr#ambientShadowAlpha` theme attribute.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

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

### android:outlineSpotShadowColor

Sets the color of the spot shadow that is drawn when the view has a positive Z or
elevation value.


By default the shadow color is black. Generally, this color will be opaque so the
intensity of the shadow is consistent between different views with different colors.


The opacity of the final spot shadow is a function of the shadow caster height, the
alpha channel of the outlineSpotShadowColor (typically opaque), and the
`https://developer.android.com/reference/android/R.attr#spotShadowAlpha` theme attribute.

May be a color value, in the form of "`#*rgb*`",
"`#*argb*`", "`#*rrggbb*`", or
"`#*aarrggbb*`".

<br />

**Related methods:**

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

### android:padding

Sets the padding, in pixels, of all four edges. Padding is defined as
space between the edges of the view and the view's content. This value will take
precedence over any of the edge-specific values (paddingLeft, paddingTop,
paddingRight, paddingBottom, paddingHorizontal and paddingVertical), but will
not override paddingStart or paddingEnd, if set. A view's size
will include its padding. If a `https://developer.android.com/reference/android/R.attr#background`
is provided, the padding will initially be set to that (0 if the
drawable does not have padding). Explicitly setting a padding value
will override the corresponding padding found in the background.

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/view/View#setPaddingRelative(int,%20int,%20int,%20int)`

### android:paddingBottom

Sets the padding, in pixels, of the bottom edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPaddingRelative(int,%20int,%20int,%20int)`

### android:paddingEnd

Sets the padding, in pixels, of the end edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPaddingRelative(int,%20int,%20int,%20int)`

### android:paddingHorizontal

Sets the padding, in pixels, of the left and right edges; see
`https://developer.android.com/reference/android/R.attr#padding`. This value will take precedence over
paddingLeft and paddingRight, but not paddingStart or paddingEnd (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 />

### android:paddingLeft

Sets the padding, in pixels, of the left edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPadding(int,%20int,%20int,%20int)`

### android:paddingRight

Sets the padding, in pixels, of the right edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPadding(int,%20int,%20int,%20int)`

### android:paddingStart

Sets the padding, in pixels, of the start edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPaddingRelative(int,%20int,%20int,%20int)`

### android:paddingTop

Sets the padding, in pixels, of the top edge; see `https://developer.android.com/reference/android/R.attr#padding`.

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/view/View#setPaddingRelative(int,%20int,%20int,%20int)`

### android:paddingVertical

Sets the padding, in pixels, of the top and bottom edges; see
`https://developer.android.com/reference/android/R.attr#padding`. This value will take precedence over
paddingTop and paddingBottom, 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 />

### android:preferKeepClear

<br />

Sets a preference to keep the bounds of this view clear from floating windows
above this view's window. This informs the system that the view is considered a vital
area for the user and that ideally it should not be covered. Setting this is only
appropriate for UI where the user would likely take action to uncover it.

The system will try to respect this, but when not possible will ignore it.

This is equivalent to `https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)`.

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

<br />

**Related methods:**

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

### android:requiresFadingEdge

Defines which edges should be faded on scrolling.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| horizontal | 1000 | Fades horizontal edges only. |
| none | 0 | No edge is faded. |
| vertical | 2000 | Fades vertical edges only. |

<br />

<br />

**Related methods:**

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

### android:rotation

rotation of the view, in degrees.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:rotationX

rotation of the view around the x axis, in degrees.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:rotationY

rotation of the view around the y axis, in degrees.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:saveEnabled

If false, no state will be saved for this view when it is being
frozen. The default is true, allowing the view to be saved
(however it also must have an ID assigned to it for its
state to be saved). Setting this to false only disables the
state for this view, not for its children which may still
be saved.

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

<br />

**Related methods:**

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

### android:scaleX

scale of the view in the x direction.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:scaleY

scale of the view in the y direction.

May be a floating point value, such as "`1.2`".

<br />

**Related methods:**

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

### android:screenReaderFocusable

Whether this view should be treated as a focusable unit by screen reader accessibility
tools. See `https://developer.android.com/reference/android/view/View#setScreenReaderFocusable(boolean)`. The default
value, `false`, leaves the screen reader to consider other signals, such as
focusability or the presence of text, to decide what it focus.

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

<br />

**Related methods:**

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

### android:scrollIndicators

Defines which scroll indicators should be displayed when the view
can be scrolled. Multiple values may be combined using logical OR,
for example "top\|bottom".

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| bottom | 2 | Displays bottom scroll indicator when vew can be scrolled down. |
| end | 20 | Displays right scroll indicator when vew can be scrolled in the end direction. |
| left | 4 | Displays left scroll indicator when vew can be scrolled left. |
| none | 0 | No scroll indicators are displayed. |
| right | 8 | Displays right scroll indicator when vew can be scrolled right. |
| start | 10 | Displays right scroll indicator when vew can be scrolled in the start direction. |
| top | 1 | Displays top scroll indicator when view can be scrolled up. |

<br />

<br />

**Related methods:**

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

### android:scrollX

The initial horizontal scroll offset, in pixels.

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 />

### android:scrollY

The initial vertical scroll offset, in pixels.

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 />

### android:scrollbarAlwaysDrawHorizontalTrack

Defines whether the horizontal scrollbar track should always be drawn.

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

<br />

### android:scrollbarAlwaysDrawVerticalTrack

Defines whether the vertical scrollbar track should always be drawn.

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

<br />

### android:scrollbarDefaultDelayBeforeFade

Defines the delay in milliseconds that a scrollbar waits before fade out.

May be an integer value, such as "`100`".

<br />

**Related methods:**

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

### android:scrollbarFadeDuration

Defines the delay in milliseconds that a scrollbar takes to fade out.

May be an integer value, such as "`100`".

<br />

**Related methods:**

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

### android:scrollbarSize

Sets the width of vertical scrollbars and height of horizontal scrollbars.

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/view/View#setScrollBarSize(int)`

### android:scrollbarStyle

Controls the scrollbar style and position. The scrollbars can be overlaid or
inset. When inset, they add to the padding of the view. And the
scrollbars can be drawn inside the padding area or on the edge of
the view. For example, if a view has a background drawable and you
want to draw the scrollbars inside the padding specified by the
drawable, you can use insideOverlay or insideInset. If you want them
to appear at the edge of the view, ignoring the padding, then you can
use outsideOverlay or outsideInset.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| insideInset | 1000000 | Inside the padding and inset. |
| insideOverlay | 0 | Inside the padding and overlaid. |
| outsideInset | 3000000 | Edge of the view and inset. |
| outsideOverlay | 2000000 | Edge of the view and overlaid. |

<br />

<br />

**Related methods:**

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

### android:scrollbarThumbHorizontal

Defines the horizontal scrollbar thumb drawable.

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/view/View#setHorizontalScrollbarThumbDrawable(android.graphics.drawable.Drawable)`

### android:scrollbarThumbVertical

Defines the vertical scrollbar thumb drawable.

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/view/View#setVerticalScrollbarThumbDrawable(android.graphics.drawable.Drawable)`

### android:scrollbarTrackHorizontal

Defines the horizontal scrollbar track drawable.

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/view/View#setHorizontalScrollbarTrackDrawable(android.graphics.drawable.Drawable)`

### android:scrollbarTrackVertical

Defines the vertical scrollbar track drawable.

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/view/View#setVerticalScrollbarTrackDrawable(android.graphics.drawable.Drawable)`

### android:scrollbars

Defines which scrollbars should be displayed on scrolling or not.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| horizontal | 100 | Displays horizontal scrollbar only. |
| none | 0 | No scrollbar is displayed. |
| vertical | 200 | Displays vertical scrollbar only. |

<br />

<br />

### android:soundEffectsEnabled

Boolean that controls whether a view should have sound effects
enabled for events such as clicking and touching.

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

<br />

**Related methods:**

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

### android:stateListAnimator

Sets the state-based animator for the View.

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

<br />

### 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.
This property is used primarily for accessibility.

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/view/View#setSupplementalDescription(java.lang.CharSequence)`

### 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)`. It is generally preferable to use
IDs (through the android:id attribute) instead of tags because
they are faster and allow for compile-time type checking.

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

<br />

### android:textAlignment

Defines the alignment of the text.

May be an integer value, such as "`100`".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| center | 4 | Center the paragraph, for example: ALIGN_CENTER. |
| gravity | 1 | Default for the root view. The gravity determines the alignment, ALIGN_NORMAL, ALIGN_CENTER, or ALIGN_OPPOSITE, which are relative to each paragraph\\u2019s text direction. |
| inherit | 0 | Default. |
| textEnd | 3 | Align to the end of the paragraph, for example: ALIGN_OPPOSITE. |
| textStart | 2 | Align to the start of the paragraph, for example: ALIGN_NORMAL. |
| viewEnd | 6 | Align to the end of the view, which is ALIGN_RIGHT if the view\\u2019s resolved layoutDirection is LTR, and ALIGN_LEFT otherwise. |
| viewStart | 5 | Align to the start of the view, which is ALIGN_LEFT if the view\\u2019s resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise. |

<br />

<br />

**Related methods:**

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

### android:textDirection

Defines the direction of the text.

May be an integer value, such as "`100`".

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| anyRtl | 2 | The paragraph direction is RTL if it contains any strong RTL character, otherwise it is LTR if it contains any strong LTR characters. If there are neither, the paragraph direction is the view\\u2019s resolved layout direction. |
| firstStrong | 1 | Default for the root view. The first strong directional character determines the paragraph direction. If there is no strong directional character, the paragraph direction is the view\\u2019s resolved layout direction. |
| firstStrongLtr | 6 | The first strong directional character determines the paragraph direction. If there is no strong directional character, the paragraph direction is LTR. |
| firstStrongRtl | 7 | The first strong directional character determines the paragraph direction. If there is no strong directional character, the paragraph direction is RTL. |
| inherit | 0 | Default. |
| locale | 5 | The paragraph direction is coming from the system Locale. |
| ltr | 3 | The paragraph direction is left to right. |
| rtl | 4 | The paragraph direction is right to left. |

<br />

<br />

**Related methods:**

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

### android:theme

Specifies a theme override for a view. When a theme override is set, the
view will be inflated using a `https://developer.android.com/reference/android/content/Context` themed with
the specified resource. During XML inflation, any child views under the
view with a theme override will inherit the themed context.

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

<br />

### android:tooltipText

Defines text displayed in a small popup window on hover or long press.

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/view/View#setTooltipText(java.lang.CharSequence)`

### android:transformPivotX

x location of the pivot point around which the view will rotate and scale.
This xml attribute sets the pivotX property of the View.

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/view/View#setPivotX(float)`

### android:transformPivotY

y location of the pivot point around which the view will rotate and scale.
This xml attribute sets the pivotY property of the View.

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/view/View#setPivotY(float)`

### android:transitionName

Names a View such that it can be identified for Transitions. Names should be
unique in the View hierarchy.

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

<br />

### android:translationX

translation in x of the view. This value is added post-layout to the left
property of the view, which is set by its layout.

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/view/View#setTranslationX(float)`

### android:translationY

translation in y of the view. This value is added post-layout to the top
property of the view, which is set by its layout.

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/view/View#setTranslationY(float)`

### android:translationZ

translation in z of the view. This value is added to its elevation.

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/view/View#setTranslationZ(float)`

### android:visibility

Controls the initial visibility of the view.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| gone | 2 | Completely hidden, as if the view had not been added. |
| invisible | 1 | Not displayed, but taken into account during layout (space is left for it). |
| visible | 0 | Visible on screen; the default value. |

<br />

<br />

**Related methods:**

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

## Constants

### ACCESSIBILITY_DATA_SENSITIVE_AUTO

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.


Accessibility interactions from services without `isAccessibilityTool` set to true are
disallowed for any of the following conditions:
- this view sets `https://developer.android.com/reference/android/view/View#getFilterTouchesWhenObscured()`.
- any parent of this view returns true from `https://developer.android.com/reference/android/view/View#isAccessibilityDataSensitive()`.
- Constant Value: 0 (0x00000000)

### ACCESSIBILITY_DATA_SENSITIVE_NO

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

2
(0x00000002)


### ACCESSIBILITY_DATA_SENSITIVE_YES

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

1
(0x00000001)


### ACCESSIBILITY_LIVE_REGION_ASSERTIVE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACCESSIBILITY_LIVE_REGION_ASSERTIVE
```

Live region mode specifying that accessibility services should immediately notify users of
changes to this view. For example, a screen reader may interrupt ongoing speech to
immediately announce these changes.


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

<br />

Constant Value:

2
(0x00000002)


### ACCESSIBILITY_LIVE_REGION_NONE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACCESSIBILITY_LIVE_REGION_NONE
```

Live region mode specifying that accessibility services should not
automatically announce changes to this view. This is the default live
region mode for most views.


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

<br />

Constant Value:

0
(0x00000000)


### ACCESSIBILITY_LIVE_REGION_POLITE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ACCESSIBILITY_LIVE_REGION_POLITE
```

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


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

<br />

Constant Value:

1
(0x00000001)


### AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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`.

<br />

Constant Value:

1
(0x00000001)


### AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE
```

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

It should be used when the credit card expiration date is represented by just one view;
if it is represented by more than one (for example, one view for the month and another view
for the year), then each of these views should use the hint specific for the unit
(`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH`,
or `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR`).

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE` ``).

When annotating a view with this hint, it's recommended to use a date autofill value to
avoid ambiguity when the autofill service provides a value for it. To understand why a
value can be ambiguous, consider "April of 2020", which could be represented as either of
the following options:

- `"04/2020"`
- `"4/2020"`
- `"2020/04"`
- `"2020/4"`
- `"April/2020"`
- `"Apr/2020"`

You define a date autofill value for the view by overriding the following methods:

1. `https://developer.android.com/reference/android/view/View#getAutofillType()` to return `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_DATE`.
2. `https://developer.android.com/reference/android/view/View#getAutofillValue()` to return a `https://developer.android.com/reference/android/view/autofill/AutofillValue#forDate(long)`.
3. `https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)` to expect a data autofillvalue.

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardExpirationDate"


### AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardExpirationDay"


### AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH` ``).

When annotating a view with this hint, it's recommended to use a text autofill value
whose value is the numerical representation of the month, starting on `1` to avoid
ambiguity when the autofill service provides a value for it. To understand why a
value can be ambiguous, consider "January", which could be represented as either of

- `"1"`: recommended way.
- `"0"`: if following the `https://developer.android.com/reference/java/util/Calendar#MONTH` convention.
- `"January"`: full name, in English.
- `"jan"`: abbreviated name, in English.
- `"Janeiro"`: full name, in another language.

Another recommended approach is to use a date autofill value - see
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE` for more details.

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardExpirationMonth"


### AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardExpirationYear"


### AUTOFILL_HINT_CREDIT_CARD_NUMBER

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_NUMBER
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_NUMBER` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardNumber"


### AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"creditCardSecurityCode"


### AUTOFILL_HINT_EMAIL_ADDRESS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_EMAIL_ADDRESS
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_EMAIL_ADDRESS` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"emailAddress"


### AUTOFILL_HINT_NAME

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_NAME
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_NAME` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"name"


### AUTOFILL_HINT_PASSWORD

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_PASSWORD
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PASSWORD` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"password"


### AUTOFILL_HINT_PHONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_PHONE
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PHONE` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"phone"


### AUTOFILL_HINT_POSTAL_ADDRESS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_POSTAL_ADDRESS
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_ADDRESS` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"postalAddress"


### AUTOFILL_HINT_POSTAL_CODE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_POSTAL_CODE
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_CODE` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"postalCode"


### AUTOFILL_HINT_USERNAME

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final String AUTOFILL_HINT_USERNAME
```

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

Can be used with either `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` or
[`android:autofillHint`](https://developer.android.com/reference/android/view/View#attr_android:autofillHint) (in which case the
value should be `` `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_USERNAME` ``).

See `https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])` for more info about autofill hints.

<br />

Constant Value:

"username"


### AUTOFILL_TYPE_DATE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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()`.

`https://developer.android.com/reference/android/view/autofill/AutofillValue` instances for autofilling a `https://developer.android.com/reference/android/view/View` can be obtained through
`https://developer.android.com/reference/android/view/autofill/AutofillValue#forDate(long)`, and the values passed to
autofill a `https://developer.android.com/reference/android/view/View` can be fetched through `https://developer.android.com/reference/android/view/autofill/AutofillValue#getDateValue()`.

<br />

**See also:**

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

Constant Value:

4
(0x00000004)


### AUTOFILL_TYPE_LIST

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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`).

`https://developer.android.com/reference/android/view/autofill/AutofillValue` instances for autofilling a `https://developer.android.com/reference/android/view/View` can be obtained through
`https://developer.android.com/reference/android/view/autofill/AutofillValue#forList(int)`, and the value passed to autofill a
`https://developer.android.com/reference/android/view/View` can be fetched through `https://developer.android.com/reference/android/view/autofill/AutofillValue#getListValue()`.

The available options in the selection list are typically provided by
`https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode#getAutofillOptions()`.

<br />

**See also:**

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

Constant Value:

3
(0x00000003)


### AUTOFILL_TYPE_NONE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUTOFILL_TYPE_NONE
```

Autofill type for views that cannot be autofilled.

Typically used when the view is read-only; for example, a text label.

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### AUTOFILL_TYPE_TEXT

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUTOFILL_TYPE_TEXT
```

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

`https://developer.android.com/reference/android/view/autofill/AutofillValue` instances for autofilling a `https://developer.android.com/reference/android/view/View` can be obtained through
`https://developer.android.com/reference/android/view/autofill/AutofillValue#forText(java.lang.CharSequence)`, and the value passed to autofill a
`https://developer.android.com/reference/android/view/View` can be fetched through `https://developer.android.com/reference/android/view/autofill/AutofillValue#getTextValue()`.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### AUTOFILL_TYPE_TOGGLE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int AUTOFILL_TYPE_TOGGLE
```

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

`https://developer.android.com/reference/android/view/autofill/AutofillValue` instances for autofilling a `https://developer.android.com/reference/android/view/View` can be obtained through
`https://developer.android.com/reference/android/view/autofill/AutofillValue#forToggle(boolean)`, and the value passed to autofill a
`https://developer.android.com/reference/android/view/View` can be fetched through `https://developer.android.com/reference/android/view/autofill/AutofillValue#getToggleValue()`.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### CONTENT_SENSITIVITY_AUTO

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CONTENT_SENSITIVITY_AUTO
```

Content sensitivity is determined by the framework. The framework uses a heuristic to
determine if this view displays sensitive content.
Autofill hints i.e. `https://developer.android.com/reference/android/view/View#getAutofillHints()` are used in the heuristic
to determine if this view should be considered as a sensitive view.


`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_USERNAME`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PASSWORD`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_NUMBER`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR`
are considered sensitive hints by the framework, and the list may include more hints
in the future.

The window hosting a sensitive view will be marked as secure during an active media
projection session. This would be equivalent to applying
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_SECURE` to the window.

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### CONTENT_SENSITIVITY_NOT_SENSITIVE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CONTENT_SENSITIVITY_NOT_SENSITIVE
```

The view doesn't display sensitive content.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### CONTENT_SENSITIVITY_SENSITIVE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CONTENT_SENSITIVITY_SENSITIVE
```

The view displays sensitive content.

The window hosting a sensitive view will be marked as secure during an active media
projection session. This would be equivalent to applying
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_SECURE` to the window.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### DRAG_FLAG_ACCESSIBILITY_ACTION

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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`. When
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` is called, this
is used by the system to perform a drag without animations.

<br />

Constant Value:

1024
(0x00000400)


### DRAG_FLAG_GLOBAL

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DRAG_FLAG_GLOBAL
```

Flag indicating that a drag can cross window boundaries. When
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` is called
with this flag set, all visible applications with targetSdkVersion \>=
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#N` will be able to participate
in the drag operation and receive the dragged content.

Global drags require a valid non-null `https://developer.android.com/reference/android/content/ClipData`.

If this is the only flag set, then the drag recipient will only have access to text data
and intents contained in the `https://developer.android.com/reference/android/content/ClipData` object. Access to URIs contained in the
`https://developer.android.com/reference/android/content/ClipData` is determined by other DRAG_FLAG_GLOBAL_\* flags

<br />

<br />

Constant Value:

256
(0x00000100)


### DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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}.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION`

Constant Value:

64
(0x00000040)


### DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_PREFIX_URI_PERMISSION`

Constant Value:

128
(0x00000080)


### DRAG_FLAG_GLOBAL_SAME_APPLICATION

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DRAG_FLAG_GLOBAL_SAME_APPLICATION
```

Flag indicating that a drag can cross window boundaries (within the same application). When
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` is called
with this flag set, only visible windows belonging to the same application (ie. share the
same UID) with targetSdkVersion \>= `https://developer.android.com/reference/android/os/Build.VERSION_CODES#N` will be
able to participate in the drag operation and receive the dragged content.

If both DRAG_FLAG_GLOBAL_SAME_APPLICATION and DRAG_FLAG_GLOBAL are set, then
DRAG_FLAG_GLOBAL_SAME_APPLICATION takes precedence and the drag will only go to visible
windows from the same application.

<br />

Constant Value:

4096
(0x00001000)


### DRAG_FLAG_GLOBAL_URI_READ

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_READ_URI_PERMISSION`

Constant Value:

1
(0x00000001)


### DRAG_FLAG_GLOBAL_URI_WRITE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

**See also:**

- `https://developer.android.com/reference/android/content/Intent#FLAG_GRANT_WRITE_URI_PERMISSION`

Constant Value:

2
(0x00000002)


### DRAG_FLAG_HIDE_CALLING_TASK_ON_DRAG_START

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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. Only the current
`https://developer.android.com/reference/android/service/voice/VoiceInteractionService` may use this flag.

<br />

Constant Value:

16384
(0x00004000)


### DRAG_FLAG_OPAQUE

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int DRAG_FLAG_OPAQUE
```

Flag indicating that the drag shadow will be opaque. When
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` is called
with this flag set, the drag shadow will be opaque, otherwise, it will be semitransparent.

<br />

Constant Value:

512
(0x00000200)


### DRAG_FLAG_START_INTENT_SENDER_ON_UNHANDLED_DRAG

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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. When using this flag, the caller must provide
ClipData with an Item that contains an immutable IntentSender to an activity to be launched
(not a broadcast, service, etc). See
`https://developer.android.com/reference/android/content/ClipData.Item.Builder#setIntentSender(android.content.IntentSender)`.

The system can decide to launch the intent or not based on factors like the current screen
size or windowing mode. If the system does not launch the intent, it will be canceled via the
normal drag and drop flow.

<br />

Constant Value:

8192
(0x00002000)


### DRAWING_CACHE_QUALITY_AUTO

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Enables automatic quality mode for the drawing cache.

<br />

<br />

Constant Value:

0
(0x00000000)


### DRAWING_CACHE_QUALITY_HIGH

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Enables high quality mode for the drawing cache.

<br />

<br />

Constant Value:

1048576
(0x00100000)


### DRAWING_CACHE_QUALITY_LOW

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Enables low quality mode for the drawing cache.

<br />

<br />

Constant Value:

524288
(0x00080000)


### FIND_VIEWS_WITH_CONTENT_DESCRIPTION

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FIND_VIEWS_WITH_CONTENT_DESCRIPTION
```

Find find views that contain the specified content description.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### FIND_VIEWS_WITH_TEXT

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FIND_VIEWS_WITH_TEXT
```

Find views that render the specified text.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### FOCUSABLE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUSABLE
```

This view wants keystrokes.


Use with `https://developer.android.com/reference/android/view/View#setFocusable(int)` and [`android:focusable`.](https://developer.android.com/reference/android/view/View#attr_android:focusable)

<br />

[Constant Value:
1
(0x00000001)](https://developer.android.com/reference/android/view/View#attr_android:focusable)[](https://developer.android.com/reference/android/view/View#attr_android:focusable)[### FOCUSABLES_ALL](https://developer.android.com/reference/android/view/View#attr_android:focusable)[Added in](https://developer.android.com/reference/android/view/View#attr_android:focusable)[API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

0
(0x00000000)


### FOCUSABLES_TOUCH_MODE

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

1
(0x00000001)


### FOCUSABLE_AUTO

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUSABLE_AUTO
```

This view determines focusability automatically. This is the default.


Use with `https://developer.android.com/reference/android/view/View#setFocusable(int)` and [`android:focusable`.](https://developer.android.com/reference/android/view/View#attr_android:focusable)

<br />

[Constant Value:
16
(0x00000010)](https://developer.android.com/reference/android/view/View#attr_android:focusable)[](https://developer.android.com/reference/android/view/View#attr_android:focusable)[### FOCUS_BACKWARD](https://developer.android.com/reference/android/view/View#attr_android:focusable)[Added in](https://developer.android.com/reference/android/view/View#attr_android:focusable)[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_BACKWARD
```

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`. Move focus to the previous selectable
item.

<br />

Constant Value:

1
(0x00000001)


### FOCUS_DOWN

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_DOWN
```

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

<br />

Constant Value:

130
(0x00000082)


### FOCUS_FORWARD

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_FORWARD
```

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`. Move focus to the next selectable
item.

<br />

Constant Value:

2
(0x00000002)


### FOCUS_LEFT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_LEFT
```

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`. Move focus to the left.

<br />

Constant Value:

17
(0x00000011)


### FOCUS_RIGHT

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_RIGHT
```

Use with `https://developer.android.com/reference/android/view/View#focusSearch(int)`. Move focus to the right.

<br />

Constant Value:

66
(0x00000042)


### FOCUS_UP

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_UP
```

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

<br />

Constant Value:

33
(0x00000021)


### GONE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int GONE
```

This view is invisible, and it doesn't take any space for layout
purposes. Use with `https://developer.android.com/reference/android/view/View#setVisibility(int)` and [`android:visibility`.](https://developer.android.com/reference/android/view/View#attr_android:visibility)

<br />

[Constant Value:
8
(0x00000008)](https://developer.android.com/reference/android/view/View#attr_android:visibility)[](https://developer.android.com/reference/android/view/View#attr_android:visibility)[### HAPTIC_FEEDBACK_ENABLED](https://developer.android.com/reference/android/view/View#attr_android:visibility)[Added in](https://developer.android.com/reference/android/view/View#attr_android:visibility)[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int HAPTIC_FEEDBACK_ENABLED
```

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

<br />

Constant Value:

268435456
(0x10000000)


### IMPORTANT_FOR_ACCESSIBILITY_AUTO

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_ACCESSIBILITY_AUTO
```

Automatically determine whether a view is important for accessibility.

<br />

Constant Value:

0
(0x00000000)


### IMPORTANT_FOR_ACCESSIBILITY_NO

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_ACCESSIBILITY_NO
```

The view is not important for accessibility.

<br />

Constant Value:

2
(0x00000002)


### IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
```

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

<br />

Constant Value:

4
(0x00000004)


### IMPORTANT_FOR_ACCESSIBILITY_YES

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_ACCESSIBILITY_YES
```

The view is important for accessibility.

<br />

Constant Value:

1
(0x00000001)


### IMPORTANT_FOR_AUTOFILL_AUTO

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_AUTOFILL_AUTO
```

Automatically determine whether a view is important for autofill.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
- `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`

Constant Value:

0
(0x00000000)


### IMPORTANT_FOR_AUTOFILL_NO

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_AUTOFILL_NO
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
- `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`

Constant Value:

2
(0x00000002)


### IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
- `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`

Constant Value:

8
(0x00000008)


### IMPORTANT_FOR_AUTOFILL_YES

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_AUTOFILL_YES
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
- `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`

Constant Value:

1
(0x00000001)


### IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
- `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`

Constant Value:

4
(0x00000004)


### IMPORTANT_FOR_CONTENT_CAPTURE_AUTO

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_CONTENT_CAPTURE_AUTO
```

Automatically determine whether a view is important for content capture.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`
- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`

Constant Value:

0
(0x00000000)


### IMPORTANT_FOR_CONTENT_CAPTURE_NO

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`
- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`

Constant Value:

2
(0x00000002)


### IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`
- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`

Constant Value:

8
(0x00000008)


### IMPORTANT_FOR_CONTENT_CAPTURE_YES

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`
- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`

Constant Value:

1
(0x00000001)


### IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`
- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`

Constant Value:

4
(0x00000004)


### INVISIBLE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int INVISIBLE
```

This view is invisible, but it still takes up space for layout purposes.
Use with `https://developer.android.com/reference/android/view/View#setVisibility(int)` and [`android:visibility`.](https://developer.android.com/reference/android/view/View#attr_android:visibility)

<br />

[Constant Value:
4
(0x00000004)](https://developer.android.com/reference/android/view/View#attr_android:visibility)[](https://developer.android.com/reference/android/view/View#attr_android:visibility)[### KEEP_SCREEN_ON](https://developer.android.com/reference/android/view/View#attr_android:visibility)[Added in](https://developer.android.com/reference/android/view/View#attr_android:visibility)[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int KEEP_SCREEN_ON
```

View flag indicating that the screen should remain on while the
window containing this view is visible to the user. This effectively
takes care of automatically setting the WindowManager's
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON`.

<br />

Constant Value:

67108864
(0x04000000)


### LAYER_TYPE_HARDWARE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYER_TYPE_HARDWARE
```

<br />

Indicates that the view has a hardware layer. A hardware layer is backed
by a hardware specific texture (generally Frame Buffer Objects or FBO on
OpenGL hardware) and causes the view to be rendered using Android's hardware
rendering pipeline, but only if hardware acceleration is turned on for the
view hierarchy. When hardware acceleration is turned off, hardware layers
behave exactly as `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`.

A hardware layer is useful to apply a specific color filter and/or
blending mode and/or translucency to a view and all its children.

A hardware layer can be used to cache a complex view tree into a
texture and reduce the complexity of drawing operations. For instance,
when animating a complex view tree with a translation, a hardware layer can
be used to render the view tree only once.

A hardware layer can also be used to increase the rendering quality when
rotation transformations are applied on a view. It can also be used to
prevent potential clipping issues when applying 3D transforms on a view.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#getLayerType()`
- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`

Constant Value:

2
(0x00000002)


### LAYER_TYPE_NONE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYER_TYPE_NONE
```

Indicates that the view does not have a layer.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#getLayerType()`
- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`

Constant Value:

0
(0x00000000)


### LAYER_TYPE_SOFTWARE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYER_TYPE_SOFTWARE
```

<br />

Indicates that the view has a software layer. A software layer is backed
by a bitmap and causes the view to be rendered using Android's software
rendering pipeline, even if hardware acceleration is enabled.

Software layers have various usages:

When the application is not using hardware acceleration, a software layer
is useful to apply a specific color filter and/or blending mode and/or
translucency to a view and all its children.

When the application is using hardware acceleration, a software layer
is useful to render drawing primitives not supported by the hardware
accelerated pipeline. It can also be used to cache a complex view tree
into a texture and reduce the complexity of drawing operations. For instance,
when animating a complex view tree with a translation, a software layer can
be used to render the view tree only once.

Software layers should be avoided when the affected view tree updates
often. Every update will require to re-render the software layer, which can
potentially be slow (particularly when hardware acceleration is turned on
since the layer will have to be uploaded into a hardware texture after every
update.)

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#getLayerType()`
- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`

Constant Value:

1
(0x00000001)


### LAYOUT_DIRECTION_INHERIT

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_DIRECTION_INHERIT
```

Horizontal layout direction of this view is inherited from its parent.
Use with `https://developer.android.com/reference/android/view/View#setLayoutDirection(int)`.

<br />

Constant Value:

2
(0x00000002)


### LAYOUT_DIRECTION_LOCALE

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_DIRECTION_LOCALE
```

Horizontal layout direction of this view is from deduced from the default language
script for the locale. Use with `https://developer.android.com/reference/android/view/View#setLayoutDirection(int)`.

<br />

Constant Value:

3
(0x00000003)


### LAYOUT_DIRECTION_LTR

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_DIRECTION_LTR
```

Horizontal layout direction of this view is from Left to Right.
Use with `https://developer.android.com/reference/android/view/View#setLayoutDirection(int)`.

<br />

Constant Value:

0
(0x00000000)


### LAYOUT_DIRECTION_RTL

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_DIRECTION_RTL
```

Horizontal layout direction of this view is from Right to Left.
Use with `https://developer.android.com/reference/android/view/View#setLayoutDirection(int)`.

<br />

Constant Value:

1
(0x00000001)


### MEASURED_HEIGHT_STATE_SHIFT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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)`.

<br />

Constant Value:

16
(0x00000010)


### MEASURED_SIZE_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

16777215
(0x00ffffff)


### MEASURED_STATE_MASK

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

-16777216
(0xff000000)


### MEASURED_STATE_TOO_SMALL

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

Constant Value:

16777216
(0x01000000)


### NOT_FOCUSABLE

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NOT_FOCUSABLE
```

This view does not want keystrokes.


Use with `https://developer.android.com/reference/android/view/View#setFocusable(int)` and [`android:focusable`.](https://developer.android.com/reference/android/view/View#attr_android:focusable)

<br />

[Constant Value:
0
(0x00000000)](https://developer.android.com/reference/android/view/View#attr_android:focusable)[](https://developer.android.com/reference/android/view/View#attr_android:focusable)[### NO_ID](https://developer.android.com/reference/android/view/View#attr_android:focusable)[Added in](https://developer.android.com/reference/android/view/View#attr_android:focusable)[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int NO_ID
```

Used to mark a View that has no ID.

<br />

Constant Value:

-1
(0xffffffff)


### OVER_SCROLL_ALWAYS

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OVER_SCROLL_ALWAYS
```

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

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### OVER_SCROLL_IF_CONTENT_SCROLLS

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### OVER_SCROLL_NEVER

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int OVER_SCROLL_NEVER
```

Never allow a user to over-scroll this view.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### POINTER_CAPTURE_MODE_ABSOLUTE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int POINTER_CAPTURE_MODE_ABSOLUTE
```

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


In this capture mode, no attempt is made to recognize gestures from touchpad input. Instead,
the absolute location of each touch on the pad is reported directly to the View, in the same
way that other touches on devices with `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_POINTER` are reported.


Events will be delivered with the source `https://developer.android.com/reference/android/view/InputDevice#SOURCE_TOUCHPAD`. The absolute
position of each touch will be available through `https://developer.android.com/reference/android/view/MotionEvent#getX(int)` and `https://developer.android.com/reference/android/view/MotionEvent#getY(int)`, and their relative movements through `https://developer.android.com/reference/android/view/MotionEvent#AXIS_RELATIVE_X` and `https://developer.android.com/reference/android/view/MotionEvent#AXIS_RELATIVE_Y`. If the touchpad
supports them, touch dimension information may be available through the `https://developer.android.com/reference/android/view/MotionEvent#AXIS_PRESSURE`, `https://developer.android.com/reference/android/view/MotionEvent#AXIS_TOUCH_MAJOR`, `https://developer.android.com/reference/android/view/MotionEvent#AXIS_TOUCH_MINOR`, `https://developer.android.com/reference/android/view/MotionEvent#AXIS_TOOL_MAJOR`, `https://developer.android.com/reference/android/view/MotionEvent#AXIS_TOOL_MINOR`, and `https://developer.android.com/reference/android/view/MotionEvent#AXIS_ORIENTATION` axes.


Events from mice are always reported in the same way regardless of capture mode.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### POINTER_CAPTURE_MODE_RELATIVE

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int POINTER_CAPTURE_MODE_RELATIVE
```

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


In this capture mode, the following gestures made on a captured touchpad will be recognized
and reported:

- Pointer movement gestures (such as moving a single finger on the pad) will be reported like mouse movements, with the `https://developer.android.com/reference/android/view/MotionEvent#ACTION_MOVE` action and their relative position changes available through `https://developer.android.com/reference/android/view/MotionEvent#getX()` and `https://developer.android.com/reference/android/view/MotionEvent#getY()`.
- Scrolling gestures (such as two-finger swipes) will be reported like scroll wheel movements on a mouse, with the `https://developer.android.com/reference/android/view/MotionEvent#ACTION_SCROLL` action and the scroll amounts available through the `https://developer.android.com/reference/android/view/MotionEvent#AXIS_VSCROLL` and `https://developer.android.com/reference/android/view/MotionEvent#AXIS_HSCROLL` axes.


Motion values are proportional to the physical motion of the gesturing finger(s), and the
physical movement in mm can be found using the resolution reported by `https://developer.android.com/reference/android/view/InputDevice.MotionRange#getResolution()` for the relevant axis.


These events will be reported with `https://developer.android.com/reference/android/view/InputDevice#SOURCE_MOUSE_RELATIVE`.


Events from mice are always reported in the same way regardless of capture mode.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### POINTER_CAPTURE_MODE_UNCAPTURED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int POINTER_CAPTURE_MODE_UNCAPTURED
```

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


Passing this to `https://developer.android.com/reference/android/view/View#requestPointerCapture(int)` is equivalent to calling
`https://developer.android.com/reference/android/view/View#releasePointerCapture()`.

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### RECTANGLE_ON_SCREEN_REQUEST_SOURCE_INPUT_FOCUS

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int 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.

<br />

Constant Value:

3
(0x00000003)


### RECTANGLE_ON_SCREEN_REQUEST_SOURCE_SCROLL_ONLY

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int 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.

<br />

Constant Value:

1
(0x00000001)


### RECTANGLE_ON_SCREEN_REQUEST_SOURCE_TEXT_CURSOR

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int 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).

<br />

Constant Value:

2
(0x00000002)


### RECTANGLE_ON_SCREEN_REQUEST_SOURCE_UNDEFINED

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int 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.
RECTANGLE_ON_SCREEN_REQUEST_SOURCE_UNDEFINED should be reserved for backward
compatibility and should only be provided from calls to the original API.

<br />

Constant Value:

0
(0x00000000)


### REQUESTED_FRAME_RATE_CATEGORY_DEFAULT

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float REQUESTED_FRAME_RATE_CATEGORY_DEFAULT
```

<br />

<br />

Constant Value:

NaN


### REQUESTED_FRAME_RATE_CATEGORY_HIGH

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float REQUESTED_FRAME_RATE_CATEGORY_HIGH
```

<br />

<br />

Constant Value:

-4.0


### REQUESTED_FRAME_RATE_CATEGORY_LOW

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float REQUESTED_FRAME_RATE_CATEGORY_LOW
```

<br />

<br />

Constant Value:

-2.0


### REQUESTED_FRAME_RATE_CATEGORY_NORMAL

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float REQUESTED_FRAME_RATE_CATEGORY_NORMAL
```

<br />

<br />

Constant Value:

-3.0


### REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final float REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE
```

<br />

<br />

Constant Value:

-1.0


### SCREEN_STATE_OFF

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREEN_STATE_OFF
```

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

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### SCREEN_STATE_ON

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCREEN_STATE_ON
```

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

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### SCROLLBARS_INSIDE_INSET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBARS_INSIDE_INSET
```

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

<br />

Constant Value:

16777216
(0x01000000)


### SCROLLBARS_INSIDE_OVERLAY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBARS_INSIDE_OVERLAY
```

The scrollbar style to display the scrollbars inside the content area,
without increasing the padding. The scrollbars will be overlaid with
translucency on the view's content.

<br />

Constant Value:

0
(0x00000000)


### SCROLLBARS_OUTSIDE_INSET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBARS_OUTSIDE_INSET
```

The scrollbar style to display the scrollbars at the edge of the view,
increasing the padding of the view. The scrollbars will only overlap the
background, if any.

<br />

Constant Value:

50331648
(0x03000000)


### SCROLLBARS_OUTSIDE_OVERLAY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBARS_OUTSIDE_OVERLAY
```

The scrollbar style to display the scrollbars at the edge of the view,
without increasing the padding. The scrollbars will be overlaid with
translucency.

<br />

Constant Value:

33554432
(0x02000000)


### SCROLLBAR_POSITION_DEFAULT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBAR_POSITION_DEFAULT
```

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

<br />

Constant Value:

0
(0x00000000)


### SCROLLBAR_POSITION_LEFT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBAR_POSITION_LEFT
```

Position the scroll bar along the left edge.

<br />

Constant Value:

1
(0x00000001)


### SCROLLBAR_POSITION_RIGHT

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLLBAR_POSITION_RIGHT
```

Position the scroll bar along the right edge.

<br />

Constant Value:

2
(0x00000002)


### SCROLL_AXIS_HORIZONTAL

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_AXIS_HORIZONTAL
```

Indicates scrolling along the horizontal axis.

<br />

Constant Value:

1
(0x00000001)


### SCROLL_AXIS_NONE

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_AXIS_NONE
```

Indicates no axis of view scrolling.

<br />

Constant Value:

0
(0x00000000)


### SCROLL_AXIS_VERTICAL

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_AXIS_VERTICAL
```

Indicates scrolling along the vertical axis.

<br />

Constant Value:

2
(0x00000002)


### SCROLL_CAPTURE_HINT_AUTO

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_CAPTURE_HINT_AUTO
```

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

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### SCROLL_CAPTURE_HINT_EXCLUDE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_CAPTURE_HINT_EXCLUDE
```

Explicitly exclude this view as a potential scroll capture target. The system will not
consider it. Mutually exclusive with `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE`, which this flag
takes precedence over.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS
```

Explicitly exclude all children of this view as potential scroll capture targets. This view
is unaffected. Note: Excluded children are not considered, regardless of `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE`.

<br />

**See also:**

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

Constant Value:

4
(0x00000004)


### SCROLL_CAPTURE_HINT_INCLUDE

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_CAPTURE_HINT_INCLUDE
```

Explicitly include this view as a potential scroll capture target. When locating a scroll
capture target, this view will be prioritized before others without this flag. Mutually
exclusive with `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE`, which takes precedence.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### SCROLL_INDICATOR_BOTTOM

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_BOTTOM
```

Scroll indicator direction for the bottom edge of the view.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

2
(0x00000002)


### SCROLL_INDICATOR_END

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_END
```

Scroll indicator direction for the ending edge of the view.


Resolved according to the view's layout direction, see
`https://developer.android.com/reference/android/view/View#getLayoutDirection()` for more information.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

32
(0x00000020)


### SCROLL_INDICATOR_LEFT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_LEFT
```

Scroll indicator direction for the left edge of the view.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

4
(0x00000004)


### SCROLL_INDICATOR_RIGHT

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_RIGHT
```

Scroll indicator direction for the right edge of the view.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

8
(0x00000008)


### SCROLL_INDICATOR_START

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_START
```

Scroll indicator direction for the starting edge of the view.


Resolved according to the view's layout direction, see
`https://developer.android.com/reference/android/view/View#getLayoutDirection()` for more information.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

16
(0x00000010)


### SCROLL_INDICATOR_TOP

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SCROLL_INDICATOR_TOP
```

Scroll indicator direction for the top edge of the view.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`
- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

Constant Value:

1
(0x00000001)


### SOUND_EFFECTS_ENABLED

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SOUND_EFFECTS_ENABLED
```

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

<br />

Constant Value:

134217728
(0x08000000)


### STATUS_BAR_HIDDEN

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

<br />

Constant Value:

1
(0x00000001)


### STATUS_BAR_VISIBLE

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

<br />

<br />

Constant Value:

0
(0x00000000)


### SYSTEM_UI_FLAG_FULLSCREEN

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View has requested to go
into the normal fullscreen mode so that its content can take over the screen
while still allowing the user to interact with the application.

This has the same visual effect as
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN`,
meaning that non-critical screen decorations (such as the status bar) will be
hidden while the user is in the View's window, focusing the experience on
that content. Unlike the window flag, if you are using ActionBar in
overlay mode with `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR_OVERLAY`, then enabling this flag will also
hide the action bar.

This approach to going fullscreen is best used over the window flag when
it is a transient state -- that is, the application does this at certain
points in its user interaction where it wants to allow the user to focus
on content, but not as a continuous state. For situations where the application
would like to simply stay full screen the entire time (such as a game that
wants to take over the screen), the
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN`
is usually a better approach. The state set here will be removed by the system
in various situations (such as the user moving to another application) like
the other system UI states.

When using this flag, the application should provide some easy facility
for the user to go out of it. A common example would be in an e-book
reader, where tapping on the screen brings back whatever screen and UI
decorations that had been hidden while the user was immersed in reading
the book.

<br />

**See also:**

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

Constant Value:

4
(0x00000004)


### SYSTEM_UI_FLAG_HIDE_NAVIGATION

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View has requested that the
system navigation be temporarily hidden.

This is an even less obtrusive state than that called for by
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE`; on devices that draw essential navigation controls
(Home, Back, and the like) on screen, `SYSTEM_UI_FLAG_HIDE_NAVIGATION` will cause
those to disappear. This is useful (in conjunction with the
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN` and
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN`
window flags) for displaying content using every last pixel on the display.

There is a limitation: because navigation controls are so important, the least user
interaction will cause them to reappear immediately. When this happens, both
this flag and `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` will be cleared automatically,
so that both elements reappear at the same time.

<br />

**See also:**

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

Constant Value:

2
(0x00000002)


### SYSTEM_UI_FLAG_IMMERSIVE

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYSTEM_UI_FLAG_IMMERSIVE
```


**This constant was deprecated
in API level 30.**   

Use `https://developer.android.com/reference/android/view/WindowInsetsController#BEHAVIOR_DEFAULT` instead.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View would like to remain interactive when
hiding the navigation bar with `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`. If this flag is
not set, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION` will be force cleared by the system on any
user interaction.

Since this flag is a modifier for `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`, it only
has an effect when used in combination with that flag.

<br />

<br />

Constant Value:

2048
(0x00000800)


### SYSTEM_UI_FLAG_IMMERSIVE_STICKY

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View would like to remain interactive when
hiding the status bar with `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` and/or hiding the navigation
bar with `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`. Use this flag to create an immersive
experience while also hiding the system bars. If this flag is not set,
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION` will be force cleared by the system on any user
interaction, and `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` will be force-cleared by the system
if the user swipes from the top of the screen.

When system bars are hidden in immersive mode, they can be revealed temporarily with
system gestures, such as swiping from the top of the screen. These transient system bars
will overlay app's content, may have some degree of transparency, and will automatically
hide after a short timeout.

Since this flag is a modifier for `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` and
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`, it only has an effect when used in combination
with one or both of those flags.

<br />

<br />

Constant Value:

4096
(0x00001000)


### SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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`.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View would like its window
to be laid out as if it has requested
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`, even if it currently hasn't. This
allows it to avoid artifacts when switching in and out of that mode, at
the expense that some of its user interface may be covered by screen
decorations when they are shown. You can perform layout of your inner
UI elements to account for non-fullscreen system UI through the
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` method.

Note: on displays that have a `https://developer.android.com/reference/android/view/DisplayCutout`, the window may still be placed
differently than if `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` was set, if the
window's `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#layoutInDisplayCutoutMode` is
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT`. To avoid this, use either of the other modes.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#layoutInDisplayCutoutMode`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER`

Constant Value:

1024
(0x00000400)


### SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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`.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View would like its window
to be laid out as if it has requested
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`, even if it currently hasn't. This
allows it to avoid artifacts when switching in and out of that mode, at
the expense that some of its user interface may be covered by screen
decorations when they are shown. You can perform layout of your inner
UI elements to account for the navigation system UI through the
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` method.

<br />

Constant Value:

512
(0x00000200)


### SYSTEM_UI_FLAG_LAYOUT_STABLE

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: When using other layout
flags, we would like a stable view of the content insets given to
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`. This means that the insets seen there
will always represent the worst case that the application can expect
as a continuous state. In the stock Android UI this is the space for
the system bar, nav bar, and status bar, but not more transient elements
such as an input method.

The stable layout your UI sees is based on the system UI modes you can
switch to. That is, if you specify `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`
then you will get a stable layout for changes of the
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` mode; if you specify
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN` and
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`, then you can transition
to `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN` and `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`
with a stable layout. (Note that you should avoid using
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION` by itself.)

If you have set the window flag `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_FULLSCREEN`
to hide the status bar (instead of using `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`),
then a hidden status bar will be considered a "stable" state for purposes
here. This allows your UI to continually hide the status bar, while still
using the system UI flags to hide the action bar while still retaining
a stable layout. Note that changing the window fullscreen flag will never
provide a stable layout for a clean transition.

If you are using ActionBar in
overlay mode with `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR_OVERLAY`, this flag will also impact the
insets it adds to those given to the application.

<br />

Constant Value:

256
(0x00000100)


### SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: Requests the navigation bar to draw in a mode
that is compatible with light navigation bar backgrounds.

For this to take effect, the window must request
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS` but not
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION`.

<br />

**See also:**

- `https://developer.android.com/reference/android/R.attr#windowLightNavigationBar`

Constant Value:

16
(0x00000010)


### SYSTEM_UI_FLAG_LIGHT_STATUS_BAR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: Requests the status bar to draw in a mode that
is compatible with light status bar backgrounds.

For this to take effect, the window must request
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS` but not
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS`.

<br />

**See also:**

- `https://developer.android.com/reference/android/R.attr#windowLightStatusBar`

Constant Value:

8192
(0x00002000)


### SYSTEM_UI_FLAG_LOW_PROFILE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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()`.

Flag for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View has requested the
system UI to enter an unobtrusive "low profile" mode.

This is for use in games, book readers, video players, or any other
"immersive" application where the usual system chrome is deemed too distracting.

In low profile mode, the status bar and/or navigation icons may dim.

<br />

**See also:**

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

Constant Value:

1
(0x00000001)


### SYSTEM_UI_FLAG_VISIBLE

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

Special constant for `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`: View has
requested the system UI (status bar) to be visible (the default).

<br />

**See also:**

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

Constant Value:

0
(0x00000000)


### SYSTEM_UI_LAYOUT_FLAGS

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SYSTEM_UI_LAYOUT_FLAGS
```


**This constant was deprecated
in API level 30.**   

System UI layout flags are deprecated.

Flags that can impact the layout in relation to system UI.

<br />

Constant Value:

1536
(0x00000600)


### TEXT_ALIGNMENT_CENTER

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_ALIGNMENT_CENTER
```

Center the paragraph, e.g. ALIGN_CENTER.

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

<br />

Constant Value:

4
(0x00000004)


### TEXT_ALIGNMENT_GRAVITY

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_ALIGNMENT_GRAVITY
```

Default for the root view. The gravity determines the text alignment, ALIGN_NORMAL,
ALIGN_CENTER, or ALIGN_OPPOSITE, which are relative to each paragraph's text direction.

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

<br />

Constant Value:

1
(0x00000001)


### TEXT_ALIGNMENT_INHERIT

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_ALIGNMENT_INHERIT
```

Default text alignment. The text alignment of this View is inherited from its parent.
Use with `https://developer.android.com/reference/android/view/View#setTextAlignment(int)`

<br />

Constant Value:

0
(0x00000000)


### TEXT_ALIGNMENT_TEXT_END

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_ALIGNMENT_TEXT_END
```

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

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

<br />

Constant Value:

3
(0x00000003)


### TEXT_ALIGNMENT_TEXT_START

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_ALIGNMENT_TEXT_START
```

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

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

<br />

Constant Value:

2
(0x00000002)


### TEXT_ALIGNMENT_VIEW_END

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

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

<br />

Constant Value:

6
(0x00000006)


### TEXT_ALIGNMENT_VIEW_START

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int 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.

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

<br />

Constant Value:

5
(0x00000005)


### TEXT_DIRECTION_ANY_RTL

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_ANY_RTL
```

Text direction is using "any-RTL" algorithm. The paragraph direction is RTL if it contains
any strong RTL character, otherwise it is LTR if it contains any strong LTR characters.
If there are neither, the paragraph direction is the view's resolved layout direction.

<br />

Constant Value:

2
(0x00000002)


### TEXT_DIRECTION_FIRST_STRONG

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_FIRST_STRONG
```

Text direction is using "first strong algorithm". The first strong directional character
determines the paragraph direction. If there is no strong directional character, the
paragraph direction is the view's resolved layout direction.

<br />

Constant Value:

1
(0x00000001)


### TEXT_DIRECTION_FIRST_STRONG_LTR

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_FIRST_STRONG_LTR
```

Text direction is using "first strong algorithm". The first strong directional character
determines the paragraph direction. If there is no strong directional character, the
paragraph direction is LTR.

<br />

Constant Value:

6
(0x00000006)


### TEXT_DIRECTION_FIRST_STRONG_RTL

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_FIRST_STRONG_RTL
```

Text direction is using "first strong algorithm". The first strong directional character
determines the paragraph direction. If there is no strong directional character, the
paragraph direction is RTL.

<br />

Constant Value:

7
(0x00000007)


### TEXT_DIRECTION_INHERIT

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_INHERIT
```

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

<br />

Constant Value:

0
(0x00000000)


### TEXT_DIRECTION_LOCALE

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_LOCALE
```

Text direction is coming from the system Locale.

<br />

Constant Value:

5
(0x00000005)


### TEXT_DIRECTION_LTR

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_LTR
```

Text direction is forced to LTR.

<br />

Constant Value:

3
(0x00000003)


### TEXT_DIRECTION_RTL

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int TEXT_DIRECTION_RTL
```

Text direction is forced to RTL.

<br />

Constant Value:

4
(0x00000004)


### VIEW_LOG_TAG

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final String VIEW_LOG_TAG
```

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

<br />

Constant Value:

"View"


### VISIBLE

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int VISIBLE
```

This view is visible.
Use with `https://developer.android.com/reference/android/view/View#setVisibility(int)` and [`android:visibility`.](https://developer.android.com/reference/android/view/View#attr_android:visibility)

<br />

[Constant Value:
0
(0x00000000)](https://developer.android.com/reference/android/view/View#attr_android:visibility)[## Fields](https://developer.android.com/reference/android/view/View#attr_android:visibility)[### ALPHA](https://developer.android.com/reference/android/view/View#attr_android:visibility)[Added in](https://developer.android.com/reference/android/view/View#attr_android:visibility)[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### EMPTY_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] EMPTY_STATE_SET
```

Indicates the view has no states set. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### ENABLED_FOCUSED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_FOCUSED_SELECTED_STATE_SET
```

Indicates the view is enabled, focused and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

### ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### ENABLED_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_FOCUSED_STATE_SET
```

Indicates the view is enabled and has the focus.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

### ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### ENABLED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_SELECTED_STATE_SET
```

Indicates the view is enabled and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

### ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### ENABLED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_STATE_SET
```

Indicates the view is enabled. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### ENABLED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] ENABLED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### FOCUSED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] FOCUSED_SELECTED_STATE_SET
```

Indicates the view is focused and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

### FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] FOCUSED_STATE_SET
```

Indicates the view is focused. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### FOCUSED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] FOCUSED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

### PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_ENABLED_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_FOCUSED_STATE_SET
```

Indicates the view is pressed, enabled and focused.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

### PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_ENABLED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_SELECTED_STATE_SET
```

Indicates the view is pressed, enabled and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

### PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_ENABLED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_STATE_SET
```

Indicates the view is pressed and enabled.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`

### PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#ENABLED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_FOCUSED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_FOCUSED_SELECTED_STATE_SET
```

Indicates the view is pressed, focused and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

### PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_FOCUSED_STATE_SET
```

Indicates the view is pressed and focused.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`

### PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#FOCUSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_SELECTED_STATE_SET
```

Indicates the view is pressed and selected.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`

### PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### PRESSED_STATE_SET

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_STATE_SET
```

Indicates the view is pressed. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### PRESSED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] PRESSED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#PRESSED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### ROTATION

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### ROTATION_X

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### ROTATION_Y

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### SCALE_X

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### SCALE_Y

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### SELECTED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] SELECTED_STATE_SET
```

Indicates the view is selected. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### SELECTED_WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] SELECTED_WINDOW_FOCUSED_STATE_SET
```

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

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#SELECTED_STATE_SET`
- `https://developer.android.com/reference/android/view/View#WINDOW_FOCUSED_STATE_SET`

### TRANSLATION_X

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### TRANSLATION_Y

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### TRANSLATION_Z

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### WINDOW_FOCUSED_STATE_SET

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int[] WINDOW_FOCUSED_STATE_SET
```

Indicates the view's window has focus. States are used with
`https://developer.android.com/reference/android/graphics/drawable/Drawable` to change the drawing of the
view depending on its state.

<br />

**See also:**

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

### X

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### Y

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

### Z

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Property<View, Float> 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.

<br />

## Public constructors

### View

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View (Context context)
```

Simple constructor to use when creating a view from code.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context the view is running in, through which it can access the current theme, resources, etc. <br /> |

### View

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View (Context context, 
                AttributeSet attrs)
```

Constructor that is called when inflating a view from XML. This is called
when a view is being constructed from an XML file, supplying attributes
that were specified in the XML file. This version uses a default style of
0, so the only attribute values applied are those in the Context's Theme
and the given AttributeSet.


The method onFinishInflate() will be called after all children have been
added.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context the view is running in, through which it can access the current theme, resources, etc. <br /> |
| `attrs` | `AttributeSet`: The attributes of the XML tag that is inflating the view. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#View(android.content.Context,%20android.util.AttributeSet,%20int)`

### View

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)
```

Perform inflation from XML and apply a class-specific base style from a
theme attribute. This constructor of View allows subclasses to use their
own base style when they are inflating. For example, a Button class's
constructor would call this version of the super class constructor and
supply `R.attr.buttonStyle` for <var translate="no">defStyleAttr</var>; this
allows the theme's button style to modify all of the base view attributes
(in particular its background) as well as the Button class's attributes.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context the view is running in, through which it can access the current theme, resources, etc. <br /> |
| `attrs` | `AttributeSet`: The attributes of the XML tag that is inflating the view. This value may be `null`. <br /> |
| `defStyleAttr` | `int`: An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#View(android.content.Context,%20android.util.AttributeSet)`

### View

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)
```

Perform inflation from XML and apply a class-specific base style from a
theme attribute or style resource. This constructor of View allows
subclasses to use their own base style when they are inflating.


When determining the final value of a particular attribute, there are
four inputs that come into play:

1. Any attribute values in the given AttributeSet.
2. The style resource specified in the AttributeSet (named "style").
3. The default style specified by <var translate="no">defStyleAttr</var>.
4. The default style specified by <var translate="no">defStyleRes</var>.
5. The base values in this theme.


Each of these inputs is considered in-order, with the first listed taking
precedence over the following ones. In other words, if in the
AttributeSet you have supplied `<Button * textColor="#ff000000">`
, then the button's text will *always* be black, regardless of
what is specified in any of the styles.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context the view is running in, through which it can access the current theme, resources, etc. <br /> |
| `attrs` | `AttributeSet`: The attributes of the XML tag that is inflating the view. This value may be `null`. <br /> |
| `defStyleAttr` | `int`: An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults. <br /> |
| `defStyleRes` | `int`: A resource identifier of a style resource that supplies default values for the view, used only if defStyleAttr is 0 or can not be found in the theme. Can be 0 to not look for defaults. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#View(android.content.Context,%20android.util.AttributeSet,%20int)`

## Public methods

### addChildrenForAccessibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addChildrenForAccessibility (ArrayList<View> outChildren)
```

Adds the children of this View relevant for accessibility to the given list
as output. Since some Views are not important for accessibility the added
child views are not necessarily direct children of this view, rather they are
the first level of descendants important for accessibility.

<br />

| Parameters ||
|---|---|
| `outChildren` | `ArrayList`: The output list that will receive children for accessibility. <br /> |

### 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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setAvailableExtraData(java.util.List<java.lang.String>)`

### addFocusables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addFocusables (ArrayList<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. If we are in touch mode,
only add views that are also focusable in touch mode.

<br />

| Parameters ||
|---|---|
| `views` | `ArrayList`: Focusable views found so far <br /> |
| `direction` | `int`: The direction of the focus. 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` |

### addFocusables

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addFocusables (ArrayList<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. This method
adds all focusable views regardless if we are in touch mode or
only views focusable in touch mode if we are in touch mode or
only views that can take accessibility focus if accessibility is enabled
depending on the focusable mode parameter.

<br />

| Parameters ||
|---|---|
| `views` | `ArrayList`: Focusable views found so far or null if all we are interested is the number of focusables. <br /> |
| `direction` | `int`: The direction of the focus. 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` |
| `focusableMode` | `int`: The type of focusables to be added. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#FOCUSABLES_ALL` - `https://developer.android.com/reference/android/view/View#FOCUSABLES_TOUCH_MODE` |

**See also:**

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

### addKeyboardNavigationClusters

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addKeyboardNavigationClusters (Collection<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.

<br />

| Parameters ||
|---|---|
| `views` | `Collection`: Keyboard navigation cluster roots found so far. This value cannot be `null`. <br /> |
| `direction` | `int`: Direction to look <br /> |

### addOnAttachStateChangeListener

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addOnAttachStateChangeListener (View.OnAttachStateChangeListener listener)
```

Add a listener for attach state changes.

This listener will be called whenever this view is attached or detached
from a window. Remove the listener using
`https://developer.android.com/reference/android/view/View#removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener)`.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnAttachStateChangeListener`: Listener to attach <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener)`

### addOnLayoutChangeListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addOnLayoutChangeListener (View.OnLayoutChangeListener listener)
```

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

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnLayoutChangeListener`: The listener that will be called when layout bounds change. <br /> |

### addOnUnhandledKeyEventListener

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addOnUnhandledKeyEventListener (View.OnUnhandledKeyEventListener listener)
```

Adds a listener which will receive unhandled `https://developer.android.com/reference/android/view/KeyEvent`s. This must be called on the
UI thread.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnUnhandledKeyEventListener`: a receiver of unhandled `https://developer.android.com/reference/android/view/KeyEvent`s. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#removeOnUnhandledKeyEventListener(android.view.View.OnUnhandledKeyEventListener)`

### addTouchables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addTouchables (ArrayList<View> views)
```

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

<br />

| Parameters ||
|---|---|
| `views` | `ArrayList`: Touchable views found so far <br /> |

### animate

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewPropertyAnimator animate ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewPropertyAnimator` | ViewPropertyAnimator The ViewPropertyAnimator associated with this View. <br /> |

### announceForAccessibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void announceForAccessibility (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.

Convenience method for sending a `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_ANNOUNCEMENT` `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` to suggest that an accessibility service announce the specified text to
its users.

Note: The event generated with this API carries no semantic meaning, and accessibility
services may choose to ignore it. Apps that accurately supply accessibility with the
semantics of their UI should not need to specify what exactly is announced.

In general, do not attempt to generate announcements as confirmation message for simple
actions like a button press. Label your controls concisely and precisely instead.

To convey significant UI changes like window changes, use `https://developer.android.com/reference/android/app/Activity#setTitle(java.lang.CharSequence)` and `https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)`.

Use `https://developer.android.com/reference/android/view/View#setAccessibilityLiveRegion(int)` to inform the user of changes to critical
views within the user interface. These should still be used sparingly as they may generate
announcements every time a View is updated.

Use `https://developer.android.com/reference/android/view/View#setStateDescription(java.lang.CharSequence)` to convey state changes to views within the
user interface. While a live region may send different types of events generated by the view,
state description will send `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED` events of
type `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_STATE_DESCRIPTION`.

For notifying users about errors, such as in a login screen with text that displays an
"incorrect password" notification, set `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setError(java.lang.CharSequence)`
and dispatch an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED` event with a change
type of `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR`, instead. Some widgets may
expose methods that convey error states to accessibility automatically, such as `https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence)`, which manages these accessibility semantics
and event dispatch for callers.

<br />

| Parameters ||
|---|---|
| `text` | `CharSequence`: The announcement text. <br /> |

### 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 /> |

### autofill

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void autofill (SparseArray<AutofillValue> values)
```

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

Views with virtual children support the Autofill Framework mainly by:

- Providing the metadata defining what the virtual children mean and how they can be autofilled.
- Implementing the methods that autofill the virtual children.

`https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)` is responsible for the
former, this method is responsible for the latter - see `https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)` and
`https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)` for more info about autofill.

If a child value is updated asynchronously, the next call to
`https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyValueChanged(android.view.View,%20int,%20android.view.autofill.AutofillValue)` must happen
**after** the value was changed to the autofilled value. If not, the child will not be
considered autofilled.

**Note:** To indicate that a virtual view was autofilled,
`?android:attr/autofilledHighlight` should be drawn over it until the data
changes.

<br />

**Related XML Attributes:**

- [android:autofilledHighlight](https://developer.android.com/reference/android/view/View#attr_android:autofilledHighlight)

| Parameters ||
|---|---|
| `values` | `SparseArray`: map of values to be autofilled, keyed by virtual child id. This value cannot be `null`. <br /> |

### bringToFront

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bringToFront ()
```

Change the view's z order in the tree, so it's on top of other sibling
views. This ordering change may affect layout, if the parent container
uses an order-dependent layout scheme (e.g., LinearLayout). Prior
to `https://developer.android.com/reference/android/os/Build.VERSION_CODES#KITKAT` this
method should be followed by calls to `https://developer.android.com/reference/android/view/View#requestLayout()` and
`https://developer.android.com/reference/android/view/View#invalidate()` on the view's parent to force the parent to redraw
with the new child ordering.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#bringChildToFront(android.view.View)`

### buildDrawingCache

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void buildDrawingCache (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.

<br />

Forces the drawing cache to be built if the drawing cache is invalid.

If you call `https://developer.android.com/reference/android/view/View#buildDrawingCache()` manually without calling
`https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`, you
should cleanup the cache by calling `https://developer.android.com/reference/android/view/View#destroyDrawingCache()` afterwards.

Note about auto scaling in compatibility mode: When auto scaling is not enabled,
this method will create a bitmap of the same size as this view. Because this bitmap
will be drawn scaled by the parent ViewGroup, the result on screen might show
scaling artifacts. To avoid such artifacts, you should call this method by setting
the auto scaling to true. Doing so, however, will generate a bitmap of a different
size than the view. This implies that your application must be able to handle this
size.

You should avoid calling this method when hardware acceleration is enabled. If
you do not need the drawing cache bitmap, calling this method will increase memory
usage and cause the view to be rendered in software once, thus negatively impacting
performance.

<br />

<br />

| Parameters ||
|---|---|
| `autoScale` | `boolean` <br /> |

**See also:**

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

### buildDrawingCache

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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.

<br />

Calling this method is equivalent to calling `buildDrawingCache(false)`.

<br />

<br />

**See also:**

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

### buildLayer

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void buildLayer ()
```

Forces this view's layer to be created and this view to be rendered
into its layer. If this view's layer type is set to `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`,
invoking this method will have no effect.

This method can for instance be used to render a view into its layer before
starting an animation. If this view is complex, rendering into the layer
before starting the animation will avoid skipping frames.

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | If this view is not attached to a window |

**See also:**

- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`

### callOnClick

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean callOnClick ()
```

Directly call any attached OnClickListener. Unlike `https://developer.android.com/reference/android/view/View#performClick()`,
this only calls the listener, and does not do any associated clicking
actions like reporting an accessibility event.

<br />

| Returns ||
|---|---|
| `boolean` | True there was an assigned OnClickListener that was called, false otherwise is returned. <br /> |

### canResolveLayoutDirection

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean canResolveLayoutDirection ()
```

Check if layout direction resolution can be done.

<br />

| Returns ||
|---|---|
| `boolean` | true if layout direction resolution can be done otherwise return false. <br /> |

### canResolveTextAlignment

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean canResolveTextAlignment ()
```

Check if text alignment resolution can be done.

<br />

| Returns ||
|---|---|
| `boolean` | true if text alignment resolution can be done otherwise return false. <br /> |

### canResolveTextDirection

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean canResolveTextDirection ()
```

Check if text direction resolution can be done.

<br />

| Returns ||
|---|---|
| `boolean` | true if text direction resolution can be done otherwise return false. <br /> |

### canScrollHorizontally

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean canScrollHorizontally (int direction)
```

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

This is without regard to whether the view is enabled or not, or if it will scroll
in response to user input or not.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: Negative to check scrolling left, positive to check scrolling right. <br /> |

| Returns ||
|---|---|
| `boolean` | true if this view can be scrolled in the specified direction, false otherwise. <br /> |

### canScrollVertically

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean canScrollVertically (int direction)
```

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

This is without regard to whether the view is enabled or not, or if it will scroll
in response to user input or not.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: Negative to check scrolling up, positive to check scrolling down. <br /> |

| Returns ||
|---|---|
| `boolean` | true if this view can be scrolled in the specified direction, false otherwise. <br /> |

### cancelDragAndDrop

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void cancelDragAndDrop ()
```

Cancels an ongoing drag and drop operation.


A `https://developer.android.com/reference/android/view/DragEvent` object with
`https://developer.android.com/reference/android/view/DragEvent#getAction()` value of
`https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_ENDED` and
`https://developer.android.com/reference/android/view/DragEvent#getResult()` value of `false`
will be sent to every
View that received `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED`
even if they are not currently visible.


This method can be called on any View in the same window as the View on which
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`
was called.

<br />

<br />

### 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 />

### cancelPendingInputEvents

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void cancelPendingInputEvents ()
```

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

Many views post high-level events such as click handlers to the event queue
to run deferred in order to preserve a desired user experience - clearing visible
pressed states before executing, etc. This method will abort any events of this nature
that are currently in flight.

Custom views that generate their own high-level deferred input events should override
`https://developer.android.com/reference/android/view/View#onCancelPendingInputEvents()` and remove those pending events from the queue.

This will also cancel pending input events for any child views.

Note that this may not be sufficient as a debouncing strategy for clicks in all cases.
This will not impact newer events posted after this call that may occur as a result of
lower-level input events still waiting in the queue. If you are trying to prevent
double-submitted events for the duration of some sort of asynchronous transaction
you should also take other steps to protect against unexpected double inputs e.g. calling
`https://developer.android.com/reference/android/view/View#setEnabled(boolean)` and re-enabling the view when
the transaction completes, tracking already submitted transaction IDs, etc.

<br />

<br />

### checkInputConnectionProxy

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean checkInputConnectionProxy (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. The
default implementation returns false; you can override this to return
true for certain views if you are performing InputConnection proxying
to them.

<br />

| Parameters ||
|---|---|
| `view` | `View`: The View that is making the InputMethodManager call. <br /> |

| Returns ||
|---|---|
| `boolean` | Return true to allow the call, false to reject. <br /> |

### clearAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearAnimation ()
```

Cancels any animations for this view.

<br />

### clearFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearFocus ()
```

Called when this view wants to give up focus. If focus is cleared
`https://developer.android.com/reference/android/view/View#onFocusChanged(boolean,%20int,%20android.graphics.Rect)` is called.


**Note:** When not in touch-mode, the framework will try to give focus
to the first focusable View from the top after focus is cleared. Hence, if this
View is the first from the top that can take focus, then all callbacks
related to clearing focus will be invoked after which the framework will
give focus to this view.

<br />

<br />

### clearPendingCredentialRequest

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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>)`.
Once this API is invoked, there will be no request fired to `https://developer.android.com/reference/android/credentials/CredentialManager`
on future view focus events.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)`

### clearViewTranslationCallback

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearViewTranslationCallback ()
```

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

<br />

### combineMeasuredStates

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int combineMeasuredStates (int curState, 
                int newState)
```

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

<br />

| Parameters ||
|---|---|
| `curState` | `int`: The current state as returned from a view or the result of combining multiple views. <br /> |
| `newState` | `int`: The new view state to combine. <br /> |

| Returns ||
|---|---|
| `int` | Returns a new integer reflecting the combination of the two states. <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 />

### computeSystemWindowInsets

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets computeSystemWindowInsets (WindowInsets in, 
                Rect outLocalInsets)
```

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

<br />

| Parameters ||
|---|---|
| `in` | `WindowInsets`: Insets currently being processed by this View, likely received as a parameter to `https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)`. <br /> |
| `outLocalInsets` | `Rect`: A Rect that will receive the insets that should be consumed by this view <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | Insets that should be passed along to views under this one <br /> |

### createAccessibilityNodeInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeInfo 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`.
This method is responsible for obtaining an accessibility node info from a
pool of reusable instances and calling
`https://developer.android.com/reference/android/view/View#onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)` on this view to
initialize the former.


Note: The client is responsible for recycling the obtained instance by calling
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#recycle()` to minimize object creation.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` | A populated `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo`

### createContextMenu

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void createContextMenu (ContextMenu menu)
```

Show the context menu for this view. It is not safe to hold on to the
menu after returning from this method.

You should normally not overload this method. Overload
`https://developer.android.com/reference/android/view/View#onCreateContextMenu(android.view.ContextMenu)` or define an
`https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener` to add items to the context menu.

<br />

| Parameters ||
|---|---|
| `menu` | `ContextMenu`: The context menu to populate <br /> |

### destroyDrawingCache

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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.

<br />

Frees the resources used by the drawing cache. If you call
`https://developer.android.com/reference/android/view/View#buildDrawingCache()` manually without calling
`https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`, you
should cleanup the cache with this method afterwards.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#buildDrawingCache()`
- `https://developer.android.com/reference/android/view/View#getDrawingCache()`

### dispatchApplyWindowInsets

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets dispatchApplyWindowInsets (WindowInsets insets)
```

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

This method should be called by clients wishing to apply insets corresponding to areas
obscured by window decorations or overlays. This can include the status and navigation bars,
action bars, input methods and more. New inset categories may be added in the future.
The method returns the insets provided minus any that were applied by this view or its
children.

Clients wishing to provide custom behavior should override the
`https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` method or alternatively provide a
`https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` via the
`https://developer.android.com/reference/android/view/View#setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener)`
method.

This method replaces the older `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` method.

<br />

<br />

| Parameters ||
|---|---|
| `insets` | `WindowInsets`: Insets to apply <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | The provided insets minus the insets that were consumed <br /> |

### dispatchCapturedPointerEvent

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchCapturedPointerEvent (MotionEvent event)
```

Pass a captured pointer event down to the focused view.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### dispatchConfigurationChanged

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchConfigurationChanged (Configuration newConfig)
```

Dispatch a notification about a resource configuration change down
the view hierarchy.
ViewGroups should override to route to their children.

<br />

| Parameters ||
|---|---|
| `newConfig` | `Configuration`: The new resource configuration. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onConfigurationChanged(android.content.res.Configuration)`

### dispatchCreateViewTranslationRequest

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchCreateViewTranslationRequest (Map<AutofillId, long[]> viewIds, 
                int[] supportedFormats, 
                TranslationCapability capability, 
                List<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. Typically, this method should only be
overridden by subclasses that provide a view hierarchy (such as `https://developer.android.com/reference/android/view/ViewGroup`). Other
classes should override `https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` for normal view or
override `https://developer.android.com/reference/android/view/View#onVirtualViewTranslationResponses(android.util.LongSparseArray<android.view.translation.ViewTranslationResponse>)` for view contains virtual children.
When requested to start the ui translation, the system will call this method to traverse the
view hierarchy to collect `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s and create a
`https://developer.android.com/reference/android/view/translation/Translator` to translate the requests. All the
`https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s must be added when the traversal is done.

The default implementation calls `https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` for normal
view or calls `https://developer.android.com/reference/android/view/View#onVirtualViewTranslationResponses(android.util.LongSparseArray<android.view.translation.ViewTranslationResponse>)` for view contains virtual
children to build `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` if the view should be translated.
The view is marked as having `https://developer.android.com/reference/android/view/View#setHasTransientState(boolean)` so that
recycling of views doesn't prevent the system from attaching the response to it. Therefore,
if overriding this method, you should set or reset the transient state.

<br />

<br />

| Parameters ||
|---|---|
| `viewIds` | `Map`: a map for the view's `https://developer.android.com/reference/android/view/autofill/AutofillId` and its virtual child ids or `null` if the view doesn't have virtual child that should be translated. The virtual child ids are the same virtual ids provided by ContentCapture. <br /> |
| `supportedFormats` | `int`: the supported translation formats. For now, the only possible value is the `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT`. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT` |
| `capability` | `TranslationCapability`: a `https://developer.android.com/reference/android/view/translation/TranslationCapability` that holds translation capability. information, e.g. source spec, target spec. This value cannot be `null`. <br /> |
| `requests` | `List`: fill in with `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s for translation purpose. This value cannot be `null`. <br /> |

### dispatchDisplayHint

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchDisplayHint (int hint)
```

Dispatch a hint about whether this view is displayed. For instance, when
a View moves out of the screen, it might receives a display hint indicating
the view is not displayed. Applications should not *rely* on this hint
as there is no guarantee that they will receive one.

<br />

| Parameters ||
|---|---|
| `hint` | `int`: A hint about whether or not this view is displayed: `https://developer.android.com/reference/android/view/View#VISIBLE` or `https://developer.android.com/reference/android/view/View#INVISIBLE`. 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` |

### dispatchDragEvent

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchDragEvent (DragEvent event)
```

Detects if this View is enabled and has a drag event listener.
If both are true, then it calls the drag event listener with the
`https://developer.android.com/reference/android/view/DragEvent` it received. If the drag event listener returns
`true`, then dispatchDragEvent() returns `true`.


For all other cases, the method calls the
`https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)` drag event handler
method and returns its result.


This ensures that a drag event is always consumed, even if the View does not have a drag
event listener. However, if the View has a listener and the listener returns true, then
onDragEvent() is not called.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `DragEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### dispatchDrawableHotspotChanged

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchDrawableHotspotChanged (float x, 
                float y)
```

Dispatches drawableHotspotChanged to all of this View's children.

<br />

| Parameters ||
|---|---|
| `x` | `float`: hotspot x coordinate <br /> |
| `y` | `float`: hotspot y coordinate <br /> |

**See also:**

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

### dispatchFinishTemporaryDetach

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchFinishTemporaryDetach ()
```

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


If you override this method you *must* call through to the
superclass implementation.

<br />

### dispatchGenericMotionEvent

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchGenericMotionEvent (MotionEvent event)
```

Dispatch a generic motion event.


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. Hover events are handled specially and are delivered
to `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)` first.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)`
- `https://developer.android.com/reference/android/view/View#onGenericMotionEvent(android.view.MotionEvent)`

### dispatchKeyEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchKeyEvent (KeyEvent event)
```

Dispatch a key event to the next view on the focus path. This path runs
from the top of the view tree down to the currently focused view. If this
view has focus, it will dispatch to itself. Otherwise it will dispatch
the next node down the focus path. This method also fires any key
listeners.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The key event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

### dispatchKeyEventPreIme

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchKeyEventPreIme (KeyEvent event)
```

Dispatch 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.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The key event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

### dispatchKeyShortcutEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchKeyShortcutEvent (KeyEvent event)
```

Dispatches a key shortcut event.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent`: The key event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### dispatchNestedFling

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchNestedFling (float velocityX, 
                float velocityY, 
                boolean consumed)
```

Dispatch a fling to a nested scrolling parent.

This method should be used to indicate that a nested scrolling child has detected
suitable conditions for a fling. Generally this means that a touch scroll has ended with a
`https://developer.android.com/reference/android/view/VelocityTracker` in the direction of scrolling that meets or exceeds
the `https://developer.android.com/reference/android/view/ViewConfiguration#getScaledMinimumFlingVelocity()`
along a scrollable axis.

If a nested scrolling child view would normally fling but it is at the edge of
its own content, it can use this method to delegate the fling to its nested scrolling
parent instead. The parent may optionally consume the fling or observe a child fling.

<br />

<br />

| Parameters ||
|---|---|
| `velocityX` | `float`: Horizontal fling velocity in pixels per second <br /> |
| `velocityY` | `float`: Vertical fling velocity in pixels per second <br /> |
| `consumed` | `boolean`: true if the child consumed the fling, false otherwise <br /> |

| Returns ||
|---|---|
| `boolean` | true if the nested scrolling parent consumed or otherwise reacted to the fling <br /> |

### dispatchNestedPreFling

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchNestedPreFling (float velocityX, 
                float velocityY)
```

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

Nested pre-fling events are to nested fling events what touch intercept is to touch
and what nested pre-scroll is to nested scroll. `dispatchNestedPreFling`
offsets an opportunity for the parent view in a nested fling to fully consume the fling
before the child view consumes it. If this method returns `true`, a nested
parent view consumed the fling and this view should not scroll as a result.

For a better user experience, only one view in a nested scrolling chain should consume
the fling at a time. If a parent view consumed the fling this method will return false.
Custom view implementations should account for this in two ways:

- If a custom view is paged and needs to settle to a fixed page-point, do not call `dispatchNestedPreFling`; consume the fling and settle to a valid position regardless.
- If a nested parent does consume the fling, this view should not scroll at all, even to settle back to a valid idle position.

Views should also not offer fling velocities to nested parent views along an axis
where scrolling is not currently supported; a `https://developer.android.com/reference/android/widget/ScrollView`
should not offer a horizontal fling velocity to its parents since scrolling along that
axis is not permitted and carrying velocity along that motion does not make sense.

<br />

<br />

| Parameters ||
|---|---|
| `velocityX` | `float`: Horizontal fling velocity in pixels per second <br /> |
| `velocityY` | `float`: Vertical fling velocity in pixels per second <br /> |

| Returns ||
|---|---|
| `boolean` | true if a nested scrolling parent consumed the fling <br /> |

### dispatchNestedPrePerformAccessibilityAction

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchNestedPrePerformAccessibilityAction (int action, 
                Bundle arguments)
```

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

Implementations of `https://developer.android.com/reference/android/view/View#performAccessibilityAction(int,%20android.os.Bundle)` may internally
call this method to delegate an accessibility action to a supporting parent. If the parent
returns true from its
`https://developer.android.com/reference/android/view/ViewParent#onNestedPrePerformAccessibilityAction(android.view.View,%20int,%20android.os.Bundle)`
method this method will return true to signify that the action was consumed.

This method is useful for implementing nested scrolling child views. If
`https://developer.android.com/reference/android/view/View#isNestedScrollingEnabled()` returns true and the action is a scrolling action
a custom view implementation may invoke this method to allow a parent to consume the
scroll first. If this method returns true the custom view should skip its own scrolling
behavior.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `int`: Accessibility action to delegate <br /> |
| `arguments` | `Bundle`: Optional action arguments. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the action was consumed by a parent <br /> |

### dispatchNestedPreScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchNestedPreScroll (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.

Nested pre-scroll events are to nested scroll events what touch intercept is to touch.
`dispatchNestedPreScroll` offers an opportunity for the parent view in a nested
scrolling operation to consume some or all of the scroll operation before the child view
consumes it.

<br />

<br />

| Parameters ||
|---|---|
| `dx` | `int`: Horizontal scroll distance in pixels <br /> |
| `dy` | `int`: Vertical scroll distance in pixels <br /> |
| `consumed` | `int`: Output. If not null, consumed\[0\] will contain the consumed component of dx and consumed\[1\] the consumed dy. <br /> |
| `offsetInWindow` | `int`: Optional. If not null, on return this will contain the offset in local view coordinates of this view from before this operation to after it completes. View implementations may use this to adjust expected input coordinate tracking. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the parent consumed some or all of the scroll delta <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#dispatchNestedScroll(int,%20int,%20int,%20int,%20int[])`

### dispatchNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchNestedScroll (int dxConsumed, 
                int dyConsumed, 
                int dxUnconsumed, 
                int dyUnconsumed, 
                int[] offsetInWindow)
```

Dispatch one step of a nested scroll in progress.

Implementations of views that support nested scrolling should call this to report
info about a scroll in progress to the current nested scrolling parent. If a nested scroll
is not currently in progress or nested scrolling is not
`https://developer.android.com/reference/android/view/View#isNestedScrollingEnabled()` for this view this method does nothing.

Compatible View implementations should also call
`https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])` before
consuming a component of the scroll event themselves.

<br />

<br />

| Parameters ||
|---|---|
| `dxConsumed` | `int`: Horizontal distance in pixels consumed by this view during this scroll step <br /> |
| `dyConsumed` | `int`: Vertical distance in pixels consumed by this view during this scroll step <br /> |
| `dxUnconsumed` | `int`: Horizontal scroll distance in pixels not consumed by this view <br /> |
| `dyUnconsumed` | `int`: Horizontal scroll distance in pixels not consumed by this view <br /> |
| `offsetInWindow` | `int`: Optional. If not null, on return this will contain the offset in local view coordinates of this view from before this operation to after it completes. View implementations may use this to adjust expected input coordinate tracking. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the event was dispatched, false if it could not be dispatched. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])`

### dispatchPointerCaptureChanged

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchPointerCaptureChanged (boolean hasCapture)
```

<br />

<br />

| Parameters ||
|---|---|
| `hasCapture` | `boolean` <br /> |

**See also:**

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

### dispatchPopulateAccessibilityEvent

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchPopulateAccessibilityEvent (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.


**Note:** This method should only be used with event.setText().
Avoid mutating other event state in this method. In general, put UI metadata in the node for
services to easily query.

- If you are modifying other event properties, you may be eliminating semantics accessibility services may want. Instead, send a separate event using `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)` and override `https://developer.android.com/reference/android/view/View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`.
- If you are checking for type `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED` to generate window/title announcements, you may be causing disruptive announcements (or making no announcements at all). Instead, follow the practices described in `https://developer.android.com/reference/android/view/View#announceForAccessibility(java.lang.CharSequence)`. **Note:** this does not suggest calling announceForAccessibility(), but using the suggestions listed in its documentation.
- If you are making changes based on the state of accessibility, such as checking for an event type to trigger a UI update, while well-intentioned, you are creating brittle, less well-maintained code that works for some users but not others. Instead, leverage existing code for equitable experiences and less technical debt. See `https://developer.android.com/reference/android/view/accessibility/AccessibilityManager#isEnabled()` for an example.


Note that the event text is populated in a separate dispatch path
(`https://developer.android.com/reference/android/view/View#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`) since we add to the
event not only the text of the source but also the text of all its descendants.


A typical implementation will call
`https://developer.android.com/reference/android/view/View#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)` on this view
and then call the `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`
on each child or the first child that is visible. Override this method if custom population
of the event text content is required.


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#dispatchPopulateAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
is responsible for handling this call.


If this view sets `https://developer.android.com/reference/android/view/View#isAccessibilityDataSensitive()` then this view should only append
sensitive information to an event that also sets
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#isAccessibilityDataSensitive()`.


*Note:* Accessibility events of certain types are not dispatched for
populating the event text via this method. For details refer to `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `AccessibilityEvent`: The event. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event population was completed. <br /> |

### dispatchProvideAutofillStructure

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchProvideAutofillStructure (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.

The default implementation does the following:

- Sets the `https://developer.android.com/reference/android/view/autofill/AutofillId` in the structure.
- Calls `https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)`.
- Calls `https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)`.

Typically, this method should only be overridden by subclasses that provide a view
hierarchy (such as `https://developer.android.com/reference/android/view/ViewGroup`) - other classes should override
`https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)` or
`https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)` instead.

When overridden, it must:

- Either call `super.dispatchProvideAutofillStructure(structure, flags)` or explicitly set the `https://developer.android.com/reference/android/view/autofill/AutofillId` in the structure (for example, by calling `structure.setAutofillId(getAutofillId())`).
- Decide how to handle the `https://developer.android.com/reference/android/view/View#AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS` flag - when set, all views in the structure should be considered important for autofill, regardless of what `https://developer.android.com/reference/android/view/View#isImportantForAutofill()` returns. We encourage you to respect this flag to provide a better user experience - this flag is typically used when an user explicitly requested autofill. If the flag is not set, then only views marked as important for autofill should be included in the structure - skipping non-important views optimizes the overall autofill performance.

<br />

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: fill in with structured view data for autofill purposes. This value cannot be `null`. <br /> |
| `flags` | `int`: optional flags. Value is either `0` or - `https://developer.android.com/reference/android/view/View#AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS` |

**See also:**

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

### dispatchProvideStructure

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchProvideStructure (ViewStructure structure)
```

Dispatch creation of `https://developer.android.com/reference/android/view/ViewStructure` down the hierarchy. The default
implementation calls `https://developer.android.com/reference/android/view/View#onProvideStructure(android.view.ViewStructure)` and
`https://developer.android.com/reference/android/view/View#onProvideVirtualStructure(android.view.ViewStructure)`.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure` <br /> |

### dispatchScrollCaptureSearch

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchScrollCaptureSearch (Rect localVisibleRect, 
                Point windowOffset, 
                Consumer<ScrollCaptureTarget> targets)
```

Dispatch a scroll capture search request down the view hierarchy.

<br />

| Parameters ||
|---|---|
| `localVisibleRect` | `Rect`: the visible area of this ViewGroup in local coordinates, according to the parent. This value cannot be `null`. <br /> |
| `windowOffset` | `Point`: the offset of this view within the window. This value cannot be `null`. <br /> |
| `targets` | `Consumer`: accepts potential scroll capture targets; `https://developer.android.com/reference/java/util/function/Consumer#accept(T)` may be called zero or more times on the calling thread before onScrollCaptureSearch returns. This value cannot be `null`. <br /> |

### dispatchStartTemporaryDetach

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchStartTemporaryDetach ()
```

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


If you override this method you *must* call through to the
superclass implementation.

<br />

### dispatchSystemUiVisibilityChanged

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchSystemUiVisibilityChanged (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.

Dispatch callbacks to `https://developer.android.com/reference/android/view/View#setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener)` down
the view hierarchy.

<br />

| Parameters ||
|---|---|
| `visibility` | `int` <br /> |

### dispatchTouchEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchTouchEvent (MotionEvent event)
```

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

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)`

### dispatchTrackballEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchTrackballEvent (MotionEvent event)
```

Pass a trackball motion event down to the focused view.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onTrackballEvent(android.view.MotionEvent)`

### dispatchUnhandledMove

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchUnhandledMove (View focused, 
                int direction)
```

This method is the last chance for the focused view and its ancestors to
respond to an arrow key. This is called when the focused view did not
consume the key internally, nor could the view system find a new view in
the requested direction to give focus to.

<br />

| Parameters ||
|---|---|
| `focused` | `View`: The currently focused view. <br /> |
| `direction` | `int`: The direction focus wants to move. One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT. Value is one of the following: - `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` |

| Returns ||
|---|---|
| `boolean` | True if the this view consumed this unhandled move. <br /> |

### dispatchWindowFocusChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchWindowFocusChanged (boolean hasFocus)
```

Called when the window containing this view gains or loses window focus.
ViewGroups should override to route to their children.

<br />

| Parameters ||
|---|---|
| `hasFocus` | `boolean`: True if the window containing this view now has focus, false otherwise. <br /> |

### dispatchWindowInsetsAnimationEnd

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchWindowInsetsAnimationEnd (WindowInsetsAnimation animation)
```

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

<br />

| Parameters ||
|---|---|
| `animation` | `WindowInsetsAnimation`: The current ongoing `https://developer.android.com/reference/android/view/WindowInsetsAnimation`. This value cannot be `null`. <br /> |

### dispatchWindowInsetsAnimationPrepare

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchWindowInsetsAnimationPrepare (WindowInsetsAnimation animation)
```

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

<br />

| Parameters ||
|---|---|
| `animation` | `WindowInsetsAnimation`: current animation. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#onPrepare(android.view.WindowInsetsAnimation)`

### dispatchWindowInsetsAnimationProgress

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets dispatchWindowInsetsAnimationProgress (WindowInsets insets, 
                List<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.

<br />

| Parameters ||
|---|---|
| `insets` | `WindowInsets`: The current `https://developer.android.com/reference/android/view/WindowInsets`. This value cannot be `null`. <br /> |
| `runningAnimations` | `List`: The currently running `https://developer.android.com/reference/android/view/WindowInsetsAnimation`s. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | current `https://developer.android.com/reference/android/view/WindowInsets`. This value cannot be `null`. <br /> |

### dispatchWindowInsetsAnimationStart

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsetsAnimation.Bounds dispatchWindowInsetsAnimationStart (WindowInsetsAnimation animation, 
                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.

<br />

| Parameters ||
|---|---|
| `animation` | `WindowInsetsAnimation`: current animation. This value cannot be `null`. <br /> |
| `bounds` | `WindowInsetsAnimation.Bounds`: the upper and lower `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds` that provides range of `https://developer.android.com/reference/android/view/WindowInsetsAnimation`. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds` | the upper and lower `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Bounds`. This value cannot be `null`. <br /> |

### dispatchWindowSystemUiVisiblityChanged

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchWindowSystemUiVisiblityChanged (int visible)
```


**This method was deprecated
in API level 30.**   

SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.

Dispatch callbacks to `https://developer.android.com/reference/android/view/View#onWindowSystemUiVisibilityChanged(int)` down
the view hierarchy.

<br />

| Parameters ||
|---|---|
| `visible` | `int` <br /> |

### dispatchWindowVisibilityChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchWindowVisibilityChanged (int visibility)
```

Dispatch a window visibility change down the view hierarchy.
ViewGroups should override to route to their children.

<br />

| Parameters ||
|---|---|
| `visibility` | `int`: The new visibility of the window. 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` |

**See also:**

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

### draw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void draw (Canvas canvas)
```

Manually render this view (and all of its children) to the given Canvas.
The view must have already done a full layout before this function is
called. When implementing a view, implement
`https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)` instead of overriding this method.
If you do need to override this method, call the superclass version.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: The Canvas to which the View is rendered. This value cannot be `null`. <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 /> |

### findFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View findFocus ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | The view that currently has focus, or null if no focused view can be found. <br /> |

### findOnBackInvokedDispatcher

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final OnBackInvokedDispatcher findOnBackInvokedDispatcher ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` | The `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` from this or the nearest ancestor, or null if this view is both not attached and have no ancestor providing an `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`. <br /> |

### findViewById

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final T findViewById (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.


**Note:** In most cases -- depending on compiler support --
the resulting view is automatically cast to the target class type. If
the target class type is unconstrained, an explicit cast may be
necessary.

<br />

| Parameters ||
|---|---|
| `id` | `int`: the ID to search for <br /> |

| Returns ||
|---|---|
| `T` | a view with given ID if found, or `null` otherwise <br /> |

**See also:**

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

### findViewWithTag

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final T findViewWithTag (Object tag)
```

Look for a child view with the given tag. If this view has the given
tag, return this view.

<br />

| Parameters ||
|---|---|
| `tag` | `Object`: The tag to search for, using "tag.equals(getTag())". <br /> |

| Returns ||
|---|---|
| `T` | The View that has the given tag in the hierarchy or null <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` |

**See also:**

- `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`
- `https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)`

### focusSearch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View focusSearch (int direction)
```

Find the nearest view in the specified direction that can take focus.
This does not actually give focus to that view.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT. Value is one of the following: - `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` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | The nearest focusable in the specified direction, or null if none can be found. <br /> |

### forceHasOverlappingRendering

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void forceHasOverlappingRendering (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). Calling this method
is an alternative to overriding `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()` in a subclass,
providing the value which is then used internally. That is, when `https://developer.android.com/reference/android/view/View#forceHasOverlappingRendering(boolean)` is called, the value of `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()` is ignored and the value passed into this method is used
instead.

<br />

**Related XML Attributes:**

- [android:forceHasOverlappingRendering](https://developer.android.com/reference/android/view/View#attr_android:forceHasOverlappingRendering)

| Parameters ||
|---|---|
| `hasOverlappingRendering` | `boolean`: The value for overlapping rendering to be used internally instead of that returned by `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()`. <br /> |

### forceLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void forceLayout ()
```

Forces this view to be laid out during the next layout pass.
This method does not call requestLayout() or forceLayout()
on the parent.

<br />

### gatherTransparentRegion

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean gatherTransparentRegion (Region region)
```

This is used by the ViewRoot to perform an optimization when
the view hierarchy contains one or several SurfaceView.
SurfaceView is always considered transparent, but its children are not,
therefore all View objects remove themselves from the global transparent
region (passed as a parameter to this function).

<br />

| Parameters ||
|---|---|
| `region` | `Region`: The transparent region for this ViewAncestor (window). This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the effective visibility of the view at this point is opaque, regardless of the transparent region; returns false if it is possible for underlying windows to be seen behind the view. <br /> |

### generateDisplayHash

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void generateDisplayHash (String hashAlgorithm, 
                Rect bounds, 
                Executor executor, 
                DisplayHashResultCallback callback)
```

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

<br />

| Parameters ||
|---|---|
| `hashAlgorithm` | `String`: The hash algorithm to use when hashing the display. Must be one of the values returned from `https://developer.android.com/reference/android/view/displayhash/DisplayHashManager#getSupportedHashAlgorithms()` This value cannot be `null`. <br /> |
| `bounds` | `Rect`: The bounds for the content within the View to generate the hash for. If bounds are null, the entire View's bounds will be used. If empty, it will invoke the callback `https://developer.android.com/reference/android/view/displayhash/DisplayHashResultCallback#onDisplayHashError(int)` with error `https://developer.android.com/reference/android/view/displayhash/DisplayHashResultCallback#DISPLAY_HASH_ERROR_INVALID_BOUNDS` <br /> |
| `executor` | `Executor`: The executor that the callback should be invoked on. This value cannot be `null`. <br /> |
| `callback` | `DisplayHashResultCallback`: The callback to handle the results of generating the display hash. This value cannot be `null`. <br /> |

### generateViewId

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int generateViewId ()
```

Generate a value suitable for use in `https://developer.android.com/reference/android/view/View#setId(int)`.
This value will not collide with ID values generated at build time by aapt for R.id.

<br />

| Returns ||
|---|---|
| `int` | a generated ID value <br /> |

### 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 /> |

### getAccessibilityDelegate

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View.AccessibilityDelegate getAccessibilityDelegate ()
```

Returns the delegate for implementing accessibility support via
composition. For more details see `https://developer.android.com/reference/android/view/View.AccessibilityDelegate`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View.AccessibilityDelegate` | The delegate, or null if none set. <br /> |

### getAccessibilityLiveRegion

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAccessibilityLiveRegion ()
```

Gets the live region mode for this View.

<br />

**Related XML Attributes:**

- [android:accessibilityLiveRegion](https://developer.android.com/reference/android/view/View#attr_android:accessibilityLiveRegion)

| Returns ||
|---|---|
| `int` | The live region mode for the view. <br /> |

**See also:**

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

### getAccessibilityNodeProvider

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AccessibilityNodeProvider 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.


If this method returns an instance, this instance is responsible for managing
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo`s describing the virtual sub-tree rooted at this
View including the one representing the View itself. Similarly the returned
instance is responsible for performing accessibility actions on any virtual
view or the root view itself.


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#getAccessibilityNodeProvider(android.view.View)`
is responsible for handling this call.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeProvider` | The provider. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeProvider`

### getAccessibilityPaneTitle

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getAccessibilityPaneTitle ()
```

Get the title of the pane for purposes of accessibility.

<br />

**Related XML Attributes:**

- [android:accessibilityPaneTitle](https://developer.android.com/reference/android/view/View#attr_android:accessibilityPaneTitle)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | The current pane title. This value may be `null`. <br /> |

**See also:**

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

### getAccessibilityTraversalAfter

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAccessibilityTraversalAfter ()
```

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

<br />

| Returns ||
|---|---|
| `int` | The id of a view this one succeedes in accessibility traversal if specified, otherwise `https://developer.android.com/reference/android/view/View#NO_ID`. <br /> |

**See also:**

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

### getAccessibilityTraversalBefore

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getAccessibilityTraversalBefore ()
```

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

<br />

| Returns ||
|---|---|
| `int` | The id of a view this one precedes in accessibility traversal if specified, otherwise `https://developer.android.com/reference/android/view/View#NO_ID`. <br /> |

**See also:**

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

### getAllowedHandwritingDelegatePackageName

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String 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)`. If `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatePackage(java.lang.String)` has not been called, or called with `null`
argument, this will return `null`, meaning that this delegator view may only be used to
initiate handwriting mode for a delegate editor view from the same package as this delegator
view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getAllowedHandwritingDelegatorPackageName

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String 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)`. If `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)` has not been called, or called with `null`
argument, this will return `null`, meaning that only views from the same package as
this delegator editor view may act as a handwriting delegator.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | <br /> |

### getAlpha

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getAlpha ()
```

The opacity of the view. This is a value from 0 to 1, where 0 means the view is
completely transparent and 1 means the view is completely opaque.

By default this is 1.0f.

<br />

| Returns ||
|---|---|
| `float` | The opacity of the view. <br /> |

### getAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Animation getAnimation ()
```

Get the animation currently associated with this view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation` | The animation that is currently playing or scheduled to play for this view. <br /> |

### getAnimationMatrix

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Matrix getAnimationMatrix ()
```

Return the current transformation matrix of the view. This is used in animation frameworks,
such as `https://developer.android.com/reference/android/transition/Transition`. Returns `null` when there is no
transformation provided by `https://developer.android.com/reference/android/view/View#setAnimationMatrix(android.graphics.Matrix)`.
Application developers should use transformation methods like `https://developer.android.com/reference/android/view/View#setRotation(float)`,
`https://developer.android.com/reference/android/view/View#setScaleX(float)`, `https://developer.android.com/reference/android/view/View#setScaleX(float)`, `https://developer.android.com/reference/android/view/View#setTranslationX(float)`}
and `https://developer.android.com/reference/android/view/View#setTranslationY(float)` (float)}} instead.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Matrix` | the Matrix, null indicates there is no transformation <br /> |

**See also:**

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

### getApplicationWindowToken

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IBinder getApplicationWindowToken ()
```

Retrieve a unique token identifying the top-level "real" window of
the window that this view is attached to. That is, this is like
`https://developer.android.com/reference/android/view/View#getWindowToken()`, except if the window this view in is a panel
window (attached to another containing window), then the token of
the containing window is returned instead.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/IBinder` | Returns the associated window token, either `https://developer.android.com/reference/android/view/View#getWindowToken()` or the containing window's token. <br /> |

### getAttributeResolutionStack

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int[] getAttributeResolutionStack (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`. The list will include layout resource ID if the View is inflated from
XML. It will also include a set of explicit styles if specified in XML using
`style="..."`. Finally, it will include the default styles resolved from the theme.


**Note:** this method will only return actual values if the view attribute debugging
is enabled in Android developer options.

<br />

| Parameters ||
|---|---|
| `attribute` | `int`: Attribute resource ID for which the resolution stack should be returned. <br /> |

| Returns ||
|---|---|
| `int[]` | ordered list of resource ID that are considered when resolving attribute values for this `https://developer.android.com/reference/android/view/View`. This value cannot be `null`. <br /> |

### getAttributeSourceResourceMap

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Map<Integer, Integer> getAttributeSourceResourceMap ()
```

Returns the mapping of attribute resource ID to source resource ID where the attribute value
was set. Source resource ID can either be a layout resource ID, if the value was set in XML
within the View tag, or a style resource ID, if the attribute was set in a style. The source
resource value will be one of the resource IDs from `https://developer.android.com/reference/android/view/View#getAttributeSourceResourceMap()`.


**Note:** this method will only return actual values if the view attribute debugging
is enabled in Android developer options.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Map<https://developer.android.com/reference/java/lang/Integer, https://developer.android.com/reference/java/lang/Integer>` | mapping of attribute resource ID to source resource ID where the attribute value was set. This value cannot be `null`. <br /> |

### 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 />

**Related XML Attributes:**

- [android:autofillHints](https://developer.android.com/reference/android/view/View#attr_android:autofillHints)

| 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 /> |

### getAutofillId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final AutofillId getAutofillId ()
```

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

The autofill id is created on demand, unless it is explicitly set by
`https://developer.android.com/reference/android/view/View#setAutofillId(android.view.autofill.AutofillId)`.

See `https://developer.android.com/reference/android/view/View#setAutofillId(android.view.autofill.AutofillId)` for more info.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillId` | The View's autofill id. <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` | either `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_LIST`, `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_DATE`, or `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_TOGGLE`. 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` |

**See also:**

- `https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)`
- `https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)`

### 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/view/View`'s current autofill value.

By default returns `null`, but subclasses should override it and return an
appropriate value to properly support the Autofill Framework.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/autofill/AutofillValue` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)`
- `https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)`

### getBackground

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getBackground ()
```

Gets the background drawable

<br />

**Related XML Attributes:**

- [android:background](https://developer.android.com/reference/android/view/View#attr_android:background)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | The drawable used as the background for this view, if any. <br /> |

**See also:**

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

### getBackgroundTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BlendMode getBackgroundTintBlendMode ()
```

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

<br />

**Related XML Attributes:**

- [android:backgroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:backgroundTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/BlendMode` | the blending mode used to apply the tint to the background drawable, null if no blend has previously been configured <br /> |

**See also:**

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

### getBackgroundTintList

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ColorStateList getBackgroundTintList ()
```

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

<br />

**Related XML Attributes:**

- [android:backgroundTint](https://developer.android.com/reference/android/view/View#attr_android:backgroundTint)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | the tint applied to the background drawable. This value may be `null`. <br /> |

**See also:**

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

### getBackgroundTintMode

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PorterDuff.Mode getBackgroundTintMode ()
```

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

<br />

**Related XML Attributes:**

- [android:backgroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:backgroundTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/PorterDuff.Mode` | the blending mode used to apply the tint to the background drawable. This value may be `null`. <br /> |

**See also:**

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

### 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 /> |

### getBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getBottom ()
```

Bottom position of this view relative to its parent.

<br />

| Returns ||
|---|---|
| `int` | The bottom of this view, in pixels. <br /> |

### getCameraDistance

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getCameraDistance ()
```

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

<br />

| Returns ||
|---|---|
| `float` | The distance along the Z axis. <br /> |

**See also:**

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

### getClipBounds

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getClipBounds (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`.

<br />

| Parameters ||
|---|---|
| `outRect` | `Rect`: rectangle in which to place the clip bounds of the view <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if successful or `false` if the view's clip bounds are `null` <br /> |

### getClipBounds

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Rect getClipBounds ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Rect` | A copy of the current clip bounds if clip bounds are set, otherwise null. <br /> |

### getClipToOutline

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getClipToOutline ()
```

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


Note that this flag will only be respected if the View's Outline returns true from
`https://developer.android.com/reference/android/graphics/Outline#canClip()`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setOutlineProvider(android.view.ViewOutlineProvider)`
- `https://developer.android.com/reference/android/view/View#setClipToOutline(boolean)`

### getContentCaptureSession

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final ContentCaptureSession getContentCaptureSession ()
```

Gets the session used to notify content capture events.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` | session explicitly set by `https://developer.android.com/reference/android/view/View#setContentCaptureSession(android.view.contentcapture.ContentCaptureSession)`, inherited by ancestors, default session or `null` if content capture is disabled for this view. <br /> |

### getContentDescription

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getContentDescription ()
```

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


**Note:** Do not override this method, as it will have no
effect on the content description presented to accessibility services.
You must call `https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)` to modify the
content description.

<br />

**Related XML Attributes:**

- [android:contentDescription](https://developer.android.com/reference/android/view/View#attr_android:contentDescription)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the content description <br /> |

**See also:**

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

### getContentSensitivity

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getContentSensitivity ()
```

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

See `https://developer.android.com/reference/android/view/View#setContentSensitivity(int)` and
`https://developer.android.com/reference/android/view/View#isContentSensitive()` for more info about this mode.

<br />

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO` by default, or value passed to `https://developer.android.com/reference/android/view/View#setContentSensitivity(int)`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO` - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_SENSITIVE` - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_NOT_SENSITIVE` |

### getContext

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final Context getContext ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Context` | The view's Context. <br /> |

### getDefaultFocusHighlightEnabled

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean 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.

<br />

**Related XML Attributes:**

- [android:defaultFocusHighlightEnabled](https://developer.android.com/reference/android/view/View#attr_android:defaultFocusHighlightEnabled)

| Returns ||
|---|---|
| `boolean` | True if this View should use a default focus highlight. <br /> |

### getDefaultSize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getDefaultSize (int size, 
                int measureSpec)
```

Utility to return a default size. Uses the supplied size if the
MeasureSpec imposed no constraints. Will get larger if allowed
by the MeasureSpec.

<br />

| Parameters ||
|---|---|
| `size` | `int`: Default size for this view <br /> |
| `measureSpec` | `int`: Constraints imposed by the parent <br /> |

| Returns ||
|---|---|
| `int` | The size this view should be. <br /> |

### getDisplay

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Display getDisplay ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/Display` | The logical display, or null if the view is not currently attached to a window. <br /> |

### getDrawableState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int[] getDrawableState ()
```

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

<br />

| Returns ||
|---|---|
| `int[]` | The current drawable state <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setState(int[])`
- `https://developer.android.com/reference/android/view/View#drawableStateChanged()`
- `https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)`

### getDrawingCache

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bitmap 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.

<br />

Calling this method is equivalent to calling `getDrawingCache(false)`.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap` | A non-scaled bitmap representing this view or null if cache is disabled. <br /> |

**See also:**

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

### getDrawingCache

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Bitmap getDrawingCache (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.

<br />

Returns the bitmap in which this view drawing is cached. The returned bitmap
is null when caching is disabled. If caching is enabled and the cache is not ready,
this method will create it. Calling `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` will not
draw from the cache when the cache is enabled. To benefit from the cache, you must
request the drawing cache by calling this method and draw it on screen if the
returned bitmap is not null.

Note about auto scaling in compatibility mode: When auto scaling is not enabled,
this method will create a bitmap of the same size as this view. Because this bitmap
will be drawn scaled by the parent ViewGroup, the result on screen might show
scaling artifacts. To avoid such artifacts, you should call this method by setting
the auto scaling to true. Doing so, however, will generate a bitmap of a different
size than the view. This implies that your application must be able to handle this
size.

<br />

<br />

| Parameters ||
|---|---|
| `autoScale` | `boolean`: Indicates whether the generated bitmap should be scaled based on the current density of the screen when the application is in compatibility mode. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap` | A bitmap representing this view or null if cache is disabled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()`
- `https://developer.android.com/reference/android/view/View#buildDrawingCache(boolean)`
- `https://developer.android.com/reference/android/view/View#destroyDrawingCache()`

### getDrawingCacheBackgroundColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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.

<br />

<br />

| Returns ||
|---|---|
| `int` | The background color to used for the drawing cache's bitmap <br /> |

**See also:**

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

### getDrawingCacheQuality

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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.

Returns the quality of the drawing cache.

<br />

**Related XML Attributes:**

- [android:drawingCacheQuality](https://developer.android.com/reference/android/view/View#attr_android:drawingCacheQuality)

| Returns ||
|---|---|
| `int` | One of `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_AUTO`, `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_LOW`, or `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_HIGH` Value is one of the following: - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_LOW` - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_HIGH` - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_AUTO` |

**See also:**

- `https://developer.android.com/reference/android/view/View#setDrawingCacheQuality(int)`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()`

### getDrawingRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getDrawingRect (Rect outRect)
```

Return the visible drawing bounds of your view. Fills in the output
rectangle with the values from getScrollX(), getScrollY(),
getWidth(), and getHeight(). These bounds do not account for any
transformation properties currently set on the view, such as
`https://developer.android.com/reference/android/view/View#setScaleX(float)` or `https://developer.android.com/reference/android/view/View#setRotation(float)`.

<br />

| Parameters ||
|---|---|
| `outRect` | `Rect`: The (scrolled) drawing bounds of the view. <br /> |

### getDrawingTime

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getDrawingTime ()
```

<br />

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

<br />

<br />

| Returns ||
|---|---|
| `long` | the drawing start time in milliseconds <br /> |

### getElevation

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getElevation ()
```

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

<br />

| Returns ||
|---|---|
| `float` | The base depth position of the view, in pixels. <br /> |

### getExplicitStyle

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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.


Each `https://developer.android.com/reference/android/view/View` can have an explicit style specified in the layout file.
This style is used first during the `https://developer.android.com/reference/android/view/View` attribute resolution, then if an attribute
is not defined there the resource system looks at default style and theme as fallbacks.


**Note:** this method will only return actual values if the view attribute debugging
is enabled in Android developer options.

<br />

| Returns ||
|---|---|
| `int` | 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. <br /> |

### getFilterTouchesWhenObscured

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getFilterTouchesWhenObscured ()
```

Gets whether the framework should discard touches when the view's
window is obscured by another visible window at the touched location.
Refer to the `https://developer.android.com/reference/android/view/View` security documentation for more details.

<br />

**Related XML Attributes:**

- [android:filterTouchesWhenObscured](https://developer.android.com/reference/android/view/View#attr_android:filterTouchesWhenObscured)

| Returns ||
|---|---|
| `boolean` | True if touch filtering is enabled. <br /> |

**See also:**

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

### getFitsSystemWindows

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getFitsSystemWindows ()
```

Check for state of `https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)`. If this method
returns `true`, the default implementation of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`
will be executed.

<br />

**Related XML Attributes:**

- [android:fitsSystemWindows](https://developer.android.com/reference/android/view/View#attr_android:fitsSystemWindows)

| Returns ||
|---|---|
| `boolean` | `true` if the default implementation of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` will be executed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)`
- `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`
- `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`

### getFocusable

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getFocusable ()
```

Returns the focusable setting for this view.

<br />

**Related XML Attributes:**

- [android:focusable](https://developer.android.com/reference/android/view/View#attr_android:focusable)

| Returns ||
|---|---|
| `int` | One of `https://developer.android.com/reference/android/view/View#NOT_FOCUSABLE`, `https://developer.android.com/reference/android/view/View#FOCUSABLE`, or `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#NOT_FOCUSABLE` - `https://developer.android.com/reference/android/view/View#FOCUSABLE` - `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO` |

### getFocusables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<View> getFocusables (int direction)
```

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

<br />

| Parameters ||
|---|---|
| `direction` | `int`: The direction of the focus. 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` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View>` | A list of focusable views <br /> |

### 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 /> |

### getForeground

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getForeground ()
```

Returns the drawable used as the foreground of this View. The
foreground drawable, if non-null, is always drawn on top of the view's content.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | a Drawable or null if no foreground was set <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onDrawForeground(android.graphics.Canvas)`

### getForegroundGravity

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getForegroundGravity ()
```

Describes how the foreground is positioned.

<br />

**Related XML Attributes:**

- [android:foregroundGravity](https://developer.android.com/reference/android/view/View#attr_android:foregroundGravity)

| Returns ||
|---|---|
| `int` | foreground gravity. <br /> |

**See also:**

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

### getForegroundTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BlendMode getForegroundTintBlendMode ()
```

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

<br />

**Related XML Attributes:**

- [android:foregroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:foregroundTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/BlendMode` | the blending mode used to apply the tint to the foreground drawable. This value may be `null`. <br /> |

**See also:**

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

### getForegroundTintList

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ColorStateList getForegroundTintList ()
```

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

<br />

**Related XML Attributes:**

- [android:foregroundTint](https://developer.android.com/reference/android/view/View#attr_android:foregroundTint)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/ColorStateList` | the tint applied to the foreground drawable. This value may be `null`. <br /> |

**See also:**

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

### getForegroundTintMode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PorterDuff.Mode getForegroundTintMode ()
```

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

<br />

**Related XML Attributes:**

- [android:foregroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:foregroundTintMode)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/PorterDuff.Mode` | the blending mode used to apply the tint to the foreground drawable. This value may be `null`. <br /> |

**See also:**

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

### getFrameContentVelocity

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getFrameContentVelocity ()
```

Get the current velocity of the View.
The value should always be greater than or equal to 0.
Note that this is only valid till the next drawn frame.

<br />

| Returns ||
|---|---|
| `float` | 0 by default, or value passed to `https://developer.android.com/reference/android/view/View#setFrameContentVelocity(float)`. <br /> |

### getGlobalVisibleRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getGlobalVisibleRect (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.

See `https://developer.android.com/reference/android/view/View#getGlobalVisibleRect(android.graphics.Rect,%20android.graphics.Point)` for more information.

<br />

| Parameters ||
|---|---|
| `r` | `Rect`: If the method returns true, contains the coordinates of the visible portion of this view in the coordinate space of the view's root view. If the method returns false, the contents of `r` are undefined. <br /> |

| Returns ||
|---|---|
| `boolean` | true if at least part of the view is visible within the root view; otherwise false. <br /> |

### getGlobalVisibleRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getGlobalVisibleRect (Rect r, 
                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. Sets `globalOffset`
to the offset of the view's x and y coordinates from the coordinate space
origin, which is the top left corner of the root view irrespective of
screen decorations and system UI elements.

To convert `r` to coordinates relative to the top left corner of
this view (without taking view rotations into account), offset `r`
by the inverse values of
`globalOffset`---`r.offset(-globalOffset.x,
-globalOffset.y)`---which is equivalent to calling
`https://developer.android.com/reference/android/view/View#getLocalVisibleRect(android.graphics.Rect)`.

**Note:** Do not use this method to determine the size of a window
in multi-window mode; use
`https://developer.android.com/reference/android/view/WindowManager#getCurrentWindowMetrics()`.

<br />

| Parameters ||
|---|---|
| `r` | `Rect`: If the method returns true, contains the coordinates of the visible portion of this view in the coordinate space of the view's root view. If the method returns false, the contents of `r` are undefined. <br /> |
| `globalOffset` | `Point`: If the method returns true, contains the offset of the x and y coordinates of this view from the top left corner of the view's root view. If the method returns false, the contents of `globalOffset` are undefined. The argument can be null (see `https://developer.android.com/reference/android/view/View#getGlobalVisibleRect(android.graphics.Rect)`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if at least part of the view is visible within the root view; false if the view is completely clipped or translated out of the visible area of the root view. <br /> |

**See also:**

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

### getHandler

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Handler getHandler ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Handler` | A handler associated with the thread running the View. This handler can be used to pump events in the UI events queue. <br /> |

### getHandwritingBoundsOffsetBottom

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getHandwritingBoundsOffsetBottom ()
```

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

<br />

| Returns ||
|---|---|
| `float` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)`

### getHandwritingBoundsOffsetLeft

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getHandwritingBoundsOffsetLeft ()
```

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

<br />

| Returns ||
|---|---|
| `float` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)`

### getHandwritingBoundsOffsetRight

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getHandwritingBoundsOffsetRight ()
```

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

<br />

| Returns ||
|---|---|
| `float` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)`

### getHandwritingBoundsOffsetTop

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getHandwritingBoundsOffsetTop ()
```

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

<br />

| Returns ||
|---|---|
| `float` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)`

### getHandwritingDelegateFlags

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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)`.

<br />

| Returns ||
|---|---|
| `int` | Value is either `0` or - `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HANDWRITING_DELEGATE_FLAG_HOME_DELEGATOR_ALLOWED` |

### getHandwritingDelegatorCallback

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Runnable 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. The callback should only
be called from the UI thread.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Runnable` | This value may be `null`. <br /> |

### getHasOverlappingRendering

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getHasOverlappingRendering ()
```

Returns the value for overlapping rendering that is used internally. This is either
the value passed into `https://developer.android.com/reference/android/view/View#forceHasOverlappingRendering(boolean)`, if called, or
the return value of `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()`, otherwise.

<br />

| Returns ||
|---|---|
| `boolean` | The value for overlapping rendering being used internally. <br /> |

### getHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getHeight ()
```

Return the height of your view.

<br />

| Returns ||
|---|---|
| `int` | The height of your view, in pixels. <br /> |

### getHitRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getHitRect (Rect outRect)
```

Hit rectangle in parent's coordinates

<br />

| Parameters ||
|---|---|
| `outRect` | `Rect`: The hit rectangle of the view. <br /> |

### getHorizontalFadingEdgeLength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getHorizontalFadingEdgeLength ()
```

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

<br />

**Related XML Attributes:**

- [android:fadingEdgeLength](https://developer.android.com/reference/android/view/View#attr_android:fadingEdgeLength)

| Returns ||
|---|---|
| `int` | The size in pixels of the horizontal faded edge or 0 if horizontal faded edges are not enabled for this view. <br /> |

### getHorizontalScrollbarThumbDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getHorizontalScrollbarThumbDrawable ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

**See also:**

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

### getHorizontalScrollbarTrackDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getHorizontalScrollbarTrackDrawable ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

**See also:**

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

### getId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getId ()
```

Returns this view's identifier.

<br />

**Related XML Attributes:**

- [android:id](https://developer.android.com/reference/android/view/View#attr_android:id)

| Returns ||
|---|---|
| `int` | a positive integer used to identify the view or `https://developer.android.com/reference/android/view/View#NO_ID` if the view has no ID <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setId(int)`
- `https://developer.android.com/reference/android/view/View#findViewById(int)`

### getImportantForAccessibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImportantForAccessibility ()
```

Gets the mode for determining whether this View is important for accessibility.
A view is important for accessibility if it fires accessibility events and if it
is reported to accessibility services that query the screen.

<br />

**Related XML Attributes:**

- [android:importantForAccessibility](https://developer.android.com/reference/android/view/View#attr_android:importantForAccessibility)

| Returns ||
|---|---|
| `int` | The mode for determining whether a view is important for accessibility, one of `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_AUTO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_YES`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO`, or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_YES`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_AUTO`

### getImportantForAutofill

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImportantForAutofill ()
```

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

See `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)` and `https://developer.android.com/reference/android/view/View#isImportantForAutofill()` for more
info about this mode.

<br />

**Related XML Attributes:**

- [android:importantForAutofill](https://developer.android.com/reference/android/view/View#attr_android:importantForAutofill)

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO` by default, or value passed to `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS` |

### getImportantForContentCapture

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getImportantForContentCapture ()
```

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

See `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)` and
`https://developer.android.com/reference/android/view/View#isImportantForContentCapture()` for more info about this mode.

<br />

**Related XML Attributes:**

- [android:importantForContentCapture](https://developer.android.com/reference/android/view/View#attr_android:importantForContentCapture)

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO` by default, or value passed to `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS` |

### getKeepScreenOn

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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`.

<br />

**Related XML Attributes:**

- [android:keepScreenOn](https://developer.android.com/reference/android/view/View#attr_android:keepScreenOn)

| Returns ||
|---|---|
| `boolean` | Returns true if `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON` is set. <br /> |

**See also:**

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

### getKeyDispatcherState

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyEvent.DispatcherState getKeyDispatcherState ()
```

Return the global `https://developer.android.com/reference/android/view/KeyEvent.DispatcherState`
for this view's window. Returns null if the view is not currently attached
to the window. Normally you will not need to use this directly, but
just use the standard high-level event callbacks like
`https://developer.android.com/reference/android/view/View#onKeyDown(int,%20android.view.KeyEvent)`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/KeyEvent.DispatcherState` | <br /> |

### getLabelFor

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLabelFor ()
```

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

<br />

| Returns ||
|---|---|
| `int` | The labeled view id. <br /> |

### getLayerType

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayerType ()
```

Indicates what type of layer is currently associated with this view. By default
a view does not have a layer, and the layer type is `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`.
Refer to the documentation of `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
for more information on the different types of layers.

<br />

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`, `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` or `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE` Value is one of the following: - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE` - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE` |

**See also:**

- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
- `https://developer.android.com/reference/android/view/View#buildLayer()`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`

### getLayoutDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayoutDirection ()
```

Returns the resolved layout direction for this view.

<br />

**Related XML Attributes:**

- [android:layoutDirection](https://developer.android.com/reference/android/view/View#attr_android:layoutDirection)

| Returns ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL` if the layout direction is RTL or returns `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR` if the layout direction is not RTL. For compatibility, this will return `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR` if API version is lower than `https://developer.android.com/reference/android/os/Build.VERSION_CODES#JELLY_BEAN_MR1`. 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` |

### getLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup.LayoutParams getLayoutParams ()
```

Get the LayoutParams associated with this view. All views should have
layout parameters. These supply parameters to the *parent* of this
view specifying how it should be arranged. There are many subclasses of
ViewGroup.LayoutParams, and these correspond to the different subclasses
of ViewGroup that are responsible for arranging their children.

This method may return null if this View is not attached to a parent
ViewGroup or `https://developer.android.com/reference/android/view/View#setLayoutParams(android.view.ViewGroup.LayoutParams)`
was not invoked successfully. When a View is attached to a parent
ViewGroup, this method must not return null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | The LayoutParams associated with this view, or null if no parameters have been set yet <br /> |

### getLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getLeft ()
```

Left position of this view relative to its parent.

<br />

| Returns ||
|---|---|
| `int` | The left edge of this view, in pixels. <br /> |

### getLocalVisibleRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getLocalVisibleRect (Rect r)
```

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

If the view is clipped on the left or top, the left and top
coordinates are offset from 0 by the clipped amount. For example, if the
view is off screen 50px on the left and 30px at the top, the left and top
coordinates are 50 and 30 respectively.

If the view is clipped on the right or bottom, the right and bottom
coordinates are reduced by the clipped amount. For example, if the view
is off screen 40px on the right and 20px at the bottom, the right
coordinate is the view width - 40, and the bottom coordinate is the view
height - 20.

<br />

| Parameters ||
|---|---|
| `r` | `Rect`: If the method returns true, contains the coordinates of the visible portion of this view relative to the top left corner of the view. If the method returns false, the contents of `r` are undefined. <br /> |

| Returns ||
|---|---|
| `boolean` | true if at least part of the view is visible; false if the view is completely clipped or translated out of the visible area. <br /> |

**See also:**

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

### getLocationInSurface

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getLocationInSurface (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.

In multiple-screen scenarios, if the surface spans multiple screens,
the coordinate space of the surface also spans multiple screens.

After the method returns, the argument array contains the x and y
coordinates of the view relative to the view's left and top edges,
respectively.

<br />

| Parameters ||
|---|---|
| `location` | `int`: A two-element integer array in which the view coordinates are stored. The x-coordinate is at index 0; the y-coordinate, at index 1. This value cannot be `null`. <br /> |

### getLocationInWindow

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getLocationInWindow (int[] outLocation)
```

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

In multi-window mode, the origin of the coordinate space is the
top left corner of the window that contains the view. In full screen
mode, the origin is the top left corner of the device screen.

In multiple-screen scenarios, if the app spans multiple screens, the
coordinate space also spans multiple screens. But if the app is
restricted to a single screen, the coordinate space includes only the
screen on which the app is running.

After the method returns, the argument array contains the x and y
coordinates of the view relative to the view's left and top edges,
respectively.

<br />

| Parameters ||
|---|---|
| `outLocation` | `int`: A two-element integer array in which the view coordinates are stored. The x-coordinate is at index 0; the y-coordinate, at index 1. <br /> |

### getLocationOnScreen

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getLocationOnScreen (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.

In multi-window mode, the coordinate space encompasses the entire
device screen, ignoring the bounds of the app window. For example, if the
view is in the bottom portion of a horizontal split screen, the top edge
of the screen---not the top edge of the window---is the origin
from which the y-coordinate is calculated.

In multiple-screen scenarios, the coordinate space can span screens.
For example, if the app is spanning both screens of a dual-screen device
and the view is located on the right-hand screen, the x-coordinate is
calculated from the left edge of the left-hand screen to the left edge of
the view. When the app is restricted to a single screen in a
multiple-screen environment, the coordinate space includes only the
screen on which the app is running.

After the method returns, the argument array contains the x and y
coordinates of the view relative to the view's left and top edges,
respectively.

<br />

| Parameters ||
|---|---|
| `outLocation` | `int`: A two-element integer array in which the view coordinates are stored. The x-coordinate is at index 0; the y-coordinate, at index 1. <br /> |

### getMatrix

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Matrix getMatrix ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/Matrix` | The current transform matrix for the view <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getScaleX()`
- `https://developer.android.com/reference/android/view/View#getScaleY()`
- `https://developer.android.com/reference/android/view/View#getPivotX()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`

### getMeasuredHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int 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`).

<br />

| Returns ||
|---|---|
| `int` | The raw measured height of this view. <br /> |

### getMeasuredHeightAndState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int 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)`. This result is a bit mask
as defined by `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` and `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`.
This should be used during measurement and layout calculations only. Use
`https://developer.android.com/reference/android/view/View#getHeight()` to see how high a view is after layout.

<br />

| Returns ||
|---|---|
| `int` | The measured height of this view as a bit mask. <br /> |

### getMeasuredState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int 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.
The width component is in the regular bits `https://developer.android.com/reference/android/view/View#MEASURED_STATE_MASK`
and the height component is at the shifted bits
`https://developer.android.com/reference/android/view/View#MEASURED_HEIGHT_STATE_SHIFT`\>\>`https://developer.android.com/reference/android/view/View#MEASURED_STATE_MASK`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getMeasuredWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int 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`).

<br />

| Returns ||
|---|---|
| `int` | The raw measured width of this view. <br /> |

### getMeasuredWidthAndState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int 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)`. This result is a bit mask
as defined by `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` and `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`.
This should be used during measurement and layout calculations only. Use
`https://developer.android.com/reference/android/view/View#getWidth()` to see how wide a view is after layout.

<br />

| Returns ||
|---|---|
| `int` | The measured width of this view as a bit mask. <br /> |

### getMinimumHeight

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinimumHeight ()
```

Returns the minimum height of the view.

<br />

**Related XML Attributes:**

- [android:minHeight](https://developer.android.com/reference/android/view/View#attr_android:minHeight)

| Returns ||
|---|---|
| `int` | the minimum height the view will try to be, in pixels <br /> |

**See also:**

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

### getMinimumWidth

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getMinimumWidth ()
```

Returns the minimum width of the view.

<br />

**Related XML Attributes:**

- [android:minWidth](https://developer.android.com/reference/android/view/View#attr_android:minWidth)

| Returns ||
|---|---|
| `int` | the minimum width the view will try to be, in pixels <br /> |

**See also:**

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

### getNextClusterForwardId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextClusterForwardId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextClusterForward](https://developer.android.com/reference/android/view/View#attr_android:nextClusterForward)

| Returns ||
|---|---|
| `int` | The next keyboard navigation cluster ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getNextFocusDownId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextFocusDownId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextFocusDown](https://developer.android.com/reference/android/view/View#attr_android:nextFocusDown)

| Returns ||
|---|---|
| `int` | The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getNextFocusForwardId

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextFocusForwardId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextFocusForward](https://developer.android.com/reference/android/view/View#attr_android:nextFocusForward)

| Returns ||
|---|---|
| `int` | The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getNextFocusLeftId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextFocusLeftId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextFocusLeft](https://developer.android.com/reference/android/view/View#attr_android:nextFocusLeft)

| Returns ||
|---|---|
| `int` | The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getNextFocusRightId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextFocusRightId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextFocusRight](https://developer.android.com/reference/android/view/View#attr_android:nextFocusRight)

| Returns ||
|---|---|
| `int` | The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getNextFocusUpId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNextFocusUpId ()
```

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

<br />

**Related XML Attributes:**

- [android:nextFocusUp](https://developer.android.com/reference/android/view/View#attr_android:nextFocusUp)

| Returns ||
|---|---|
| `int` | The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### getOnFocusChangeListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View.OnFocusChangeListener getOnFocusChangeListener ()
```

Returns the focus-change callback registered for this view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View.OnFocusChangeListener` | The callback, or null if one is not registered. <br /> |

### getOutlineAmbientShadowColor

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOutlineAmbientShadowColor ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The shadow color set by `https://developer.android.com/reference/android/view/View#setOutlineAmbientShadowColor(int)`, or black if nothing was set <br /> |

### getOutlineProvider

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewOutlineProvider 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.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewOutlineProvider` | <br /> |

**See also:**

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

### getOutlineSpotShadowColor

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOutlineSpotShadowColor ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The shadow color set by `https://developer.android.com/reference/android/view/View#setOutlineSpotShadowColor(int)`, or black if nothing was set <br /> |

### getOverScrollMode

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getOverScrollMode ()
```

Returns the over-scroll mode for this view. The result will be
one of `https://developer.android.com/reference/android/view/View#OVER_SCROLL_ALWAYS`, `https://developer.android.com/reference/android/view/View#OVER_SCROLL_IF_CONTENT_SCROLLS`
(allow over-scrolling only if the view content is larger than the container),
or `https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER`.

<br />

| Returns ||
|---|---|
| `int` | This view's over-scroll mode. <br /> |

### getOverlay

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewOverlay getOverlay ()
```

Returns the overlay for this view, creating it if it does not yet exist.
Adding drawables to the overlay will cause them to be displayed whenever
the view itself is redrawn. Objects in the overlay should be actively
managed: remove them when they should not be displayed anymore. The
overlay will always have the same size as its host view.

Note: Overlays do not currently work correctly with `https://developer.android.com/reference/android/view/SurfaceView` or `https://developer.android.com/reference/android/view/TextureView`; contents in overlays for these
types of views may not display correctly.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewOverlay` | The ViewOverlay object for this view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewOverlay`

### getPaddingBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingBottom ()
```

Returns the bottom padding of this view. If there are inset and enabled
scrollbars, this value may include the space required to display the
scrollbars as well.

<br />

| Returns ||
|---|---|
| `int` | the bottom padding in pixels <br /> |

### getPaddingEnd

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingEnd ()
```

Returns the end padding of this view depending on its resolved layout direction.
If there are inset and enabled scrollbars, this value may include the space
required to display the scrollbars as well.

<br />

| Returns ||
|---|---|
| `int` | the end padding in pixels <br /> |

### getPaddingLeft

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingLeft ()
```

Returns the left padding of this view. If there are inset and enabled
scrollbars, this value may include the space required to display the
scrollbars as well.

<br />

| Returns ||
|---|---|
| `int` | the left padding in pixels <br /> |

### getPaddingRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingRight ()
```

Returns the right padding of this view. If there are inset and enabled
scrollbars, this value may include the space required to display the
scrollbars as well.

<br />

| Returns ||
|---|---|
| `int` | the right padding in pixels <br /> |

### getPaddingStart

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingStart ()
```

Returns the start padding of this view depending on its resolved layout direction.
If there are inset and enabled scrollbars, this value may include the space
required to display the scrollbars as well.

<br />

| Returns ||
|---|---|
| `int` | the start padding in pixels <br /> |

### getPaddingTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getPaddingTop ()
```

Returns the top padding of this view.

<br />

| Returns ||
|---|---|
| `int` | the top padding in pixels <br /> |

### getParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final ViewParent getParent ()
```

Gets the parent of this view. Note that the parent is a
ViewParent and not necessarily a View.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewParent` | Parent of this view. <br /> |

### getParentForAccessibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewParent getParentForAccessibility ()
```

Gets the parent for accessibility purposes. Note that the parent for
accessibility is not necessary the immediate parent. It is the first
predecessor that is important for accessibility.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewParent` | The parent for accessibility purposes. <br /> |

### getPendingCredentialCallback

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final OutcomeReceiver<GetCredentialResponse, GetCredentialException> 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.
If the return value is null, that means no callback, or request, has been set
on the view and no `https://developer.android.com/reference/android/credentials/CredentialManager` flow will be invoked
when this view is focused. Traditioanl autofill flows will still
work, and autofillable content will still be returned through the
`https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)` )} API.

See `https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)` for more info.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/credentials/GetCredentialResponse, https://developer.android.com/reference/android/credentials/GetCredentialException>` | The callback associated with this view that will be invoked on a response from `https://developer.android.com/reference/android/credentials/CredentialManager` . <br /> |

### getPendingCredentialRequest

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final GetCredentialRequest getPendingCredentialRequest ()
```

Returns the `https://developer.android.com/reference/android/credentials/GetCredentialRequest` associated with the view.
If the return value is null, that means no request has been set
on the view and no `https://developer.android.com/reference/android/credentials/CredentialManager` flow will be invoked
when this view is focused. Traditioanl autofill flows will still
work, autofilling content if applicable, from
the active `https://developer.android.com/reference/android/service/autofill/AutofillService` on
the device.

See `https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)` for more info.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/credentials/GetCredentialRequest` | The credential request associated with this View. <br /> |

### getPivotX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float 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)`.

<br />

**Related XML Attributes:**

- [android:transformPivotX](https://developer.android.com/reference/android/view/View#attr_android:transformPivotX)

| Returns ||
|---|---|
| `float` | The x location of the pivot point. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getScaleX()`
- `https://developer.android.com/reference/android/view/View#getScaleY()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`

### getPivotY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float 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)`.

<br />

**Related XML Attributes:**

- [android:transformPivotY](https://developer.android.com/reference/android/view/View#attr_android:transformPivotY)

| Returns ||
|---|---|
| `float` | The y location of the pivot point. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getScaleX()`
- `https://developer.android.com/reference/android/view/View#getScaleY()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`

### getPointerIcon

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public PointerIcon getPointerIcon ()
```

Gets the mouse pointer icon for the current view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/PointerIcon` | <br /> |

**See also:**

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

### getPreferKeepClearRects

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final List<Rect> getPreferKeepClearRects ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` | the list of rects, set by `https://developer.android.com/reference/android/view/View#setPreferKeepClearRects(java.util.List<android.graphics.Rect>)`. This value cannot be `null`. <br /> |

**See also:**

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

### getReceiveContentMimeTypes

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String[] 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)`. By default returns null.

Different features (e.g. pasting from the clipboard, inserting stickers from the soft
keyboard, etc) may optionally use this metadata to conditionally alter their behavior. For
example, a soft keyboard may choose to hide its UI for inserting GIFs for a particular
input field if the MIME types returned here for that field don't include "image/gif" or
"image/\*".

Note: Comparisons of MIME types should be performed using utilities such as
`https://developer.android.com/reference/android/content/ClipDescription#compareMimeTypes(java.lang.String,%20java.lang.String)` rather than simple string equality, in order to
correctly handle patterns such as "text/\*", "image/\*", etc. Note that MIME type matching
in the Android framework is case-sensitive, unlike formal RFC MIME types. As a result,
you should always write your MIME types with lowercase letters, or use
`https://developer.android.com/reference/android/content/Intent#normalizeMimeType(java.lang.String)` to ensure that it is converted to
lowercase.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The MIME types accepted by `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for this view (may include patterns such as "image/\*"). <br /> |

### getRequestedFrameRate

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getRequestedFrameRate ()
```

Get the current preferred frame rate of the View.
The value could be negative when preferred frame rate category is set
instead of perferred frame rate.
The frame rate category includes
REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_LOW,
REQUESTED_FRAME_RATE_CATEGORY_NORMAL, and REQUESTED_FRAME_RATE_CATEGORY_HIGH.
Note that the frame rate value is valid as long as the View is invalidated.
Please also be aware that the requested frame rate will not propagate to
child views when this API is used on a ViewGroup.

<br />

| Returns ||
|---|---|
| `float` | REQUESTED_FRAME_RATE_CATEGORY_DEFAULT by default, or value passed to `https://developer.android.com/reference/android/view/View#setRequestedFrameRate(float)`. <br /> |

### getResources

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Resources getResources ()
```

Returns the resources associated with this view.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/Resources` | Resources object. <br /> |

### getRevealOnFocusHint

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean getRevealOnFocusHint ()
```

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

When this method returns true for a child view requesting focus, ancestor
views responding to a focus change in `https://developer.android.com/reference/android/view/ViewParent#requestChildFocus(android.view.View,%20android.view.View)`
should make a best effort to make the newly focused child fully visible to the user.
When it returns false, ancestor views should preferably not disrupt scroll positioning or
other properties affecting visibility to the user as part of the focus change.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if this view would prefer to become fully visible when it gains focus, false if it would prefer not to disrupt scroll positioning <br /> |

**See also:**

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

### getRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getRight ()
```

Right position of this view relative to its parent.

<br />

| Returns ||
|---|---|
| `int` | The right edge of this view, in pixels. <br /> |

### getRootSurfaceControl

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public AttachedSurfaceControl getRootSurfaceControl ()
```

The AttachedSurfaceControl itself is not a View, it is just the interface to the
windowing-system object that contains the entire view hierarchy.
For the root View of a given hierarchy see `https://developer.android.com/reference/android/view/View#getRootView()`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/AttachedSurfaceControl` | The `https://developer.android.com/reference/android/view/AttachedSurfaceControl` interface for this View. This will only return a non-null value when called between `https://developer.android.com/reference/android/view/View#onAttachedToWindow()` and `https://developer.android.com/reference/android/view/View#onDetachedFromWindow()`. <br /> |

### getRootView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View getRootView ()
```

<br />

Finds the topmost view in the current view hierarchy.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | the topmost view containing this view <br /> |

### getRootWindowInsets

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets getRootWindowInsets ()
```

Provide original WindowInsets that are dispatched to the view hierarchy. The insets are
only available if the view is attached.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | WindowInsets from the top of the view hierarchy or null if View is detached <br /> |

### getRotation

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getRotation ()
```

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

<br />

| Returns ||
|---|---|
| `float` | The degrees of rotation. <br /> |

**See also:**

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

### getRotationX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getRotationX ()
```

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

<br />

| Returns ||
|---|---|
| `float` | The degrees of X rotation. <br /> |

**See also:**

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

### getRotationY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getRotationY ()
```

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

<br />

| Returns ||
|---|---|
| `float` | The degrees of Y rotation. <br /> |

**See also:**

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

### getScaleX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getScaleX ()
```

The amount that the view is scaled in x around the pivot point, as a proportion of
the view's unscaled width. A value of 1, the default, means that no scaling is applied.

By default, this is 1.0f.

<br />

| Returns ||
|---|---|
| `float` | The scaling factor. <br /> |

**See also:**

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

### getScaleY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getScaleY ()
```

The amount that the view is scaled in y around the pivot point, as a proportion of
the view's unscaled height. A value of 1, the default, means that no scaling is applied.

By default, this is 1.0f.

<br />

| Returns ||
|---|---|
| `float` | The scaling factor. <br /> |

**See also:**

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

### getScrollBarDefaultDelayBeforeFade

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollBarDefaultDelayBeforeFade ()
```

Returns the delay before scrollbars fade.

<br />

**Related XML Attributes:**

- [android:scrollbarDefaultDelayBeforeFade](https://developer.android.com/reference/android/view/View#attr_android:scrollbarDefaultDelayBeforeFade)

| Returns ||
|---|---|
| `int` | the delay before scrollbars fade <br /> |

### getScrollBarFadeDuration

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollBarFadeDuration ()
```

Returns the scrollbar fade duration.

<br />

**Related XML Attributes:**

- [android:scrollbarFadeDuration](https://developer.android.com/reference/android/view/View#attr_android:scrollbarFadeDuration)

| Returns ||
|---|---|
| `int` | the scrollbar fade duration, in milliseconds <br /> |

### getScrollBarSize

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollBarSize ()
```

Returns the scrollbar size.

<br />

**Related XML Attributes:**

- [android:scrollbarSize](https://developer.android.com/reference/android/view/View#attr_android:scrollbarSize)

| Returns ||
|---|---|
| `int` | the scrollbar size <br /> |

### getScrollBarStyle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollBarStyle ()
```

<br />

Returns the current scrollbar style.

<br />

<br />

**Related XML Attributes:**

- [android:scrollbarStyle](https://developer.android.com/reference/android/view/View#attr_android:scrollbarStyle)

| Returns ||
|---|---|
| `int` | the current scrollbar style. Value is one of the following: - `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_OVERLAY` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_INSET` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_OVERLAY` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_INSET` |

**See also:**

- `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_OVERLAY`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_INSET`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_OVERLAY`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_INSET`

### getScrollCaptureHint

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollCaptureHint ()
```

Returns the current scroll capture hint for this view.

<br />

| Returns ||
|---|---|
| `int` | the current scroll capture hint. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_AUTO` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS` |

### getScrollIndicators

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getScrollIndicators ()
```

Returns a bitmask representing the enabled scroll indicators.


For example, if the top and left scroll indicators are enabled and all
other indicators are disabled, the return value will be
`View.SCROLL_INDICATOR_TOP | View.SCROLL_INDICATOR_LEFT`.


To check whether the bottom scroll indicator is enabled, use the value
of `(getScrollIndicators() & View.SCROLL_INDICATOR_BOTTOM) != 0`.

<br />

| Returns ||
|---|---|
| `int` | a bitmask representing the enabled scroll indicators. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END` |

### getScrollX

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getScrollX ()
```

Return the scrolled left position of this view. This is the left edge of
the displayed part of your view. You do not need to draw any pixels
farther left, since those are outside of the frame of your view on
screen.

<br />

| Returns ||
|---|---|
| `int` | The left edge of the displayed part of your view, in pixels. <br /> |

### getScrollY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getScrollY ()
```

Return the scrolled top position of this view. This is the top edge of
the displayed part of your view. You do not need to draw any pixels above
it, since those are outside of the frame of your view on screen.

<br />

| Returns ||
|---|---|
| `int` | The top edge of the displayed part of your view, in pixels. <br /> |

### getSolidColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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. Returning a non-zero color enables the view system to
optimize the drawing of the fading edges. If you do return a non-zero color, the alpha
should be set to 0xFF.

<br />

| Returns ||
|---|---|
| `int` | The known solid color background for this view, or 0 if the color may vary <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setVerticalFadingEdgeEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setHorizontalFadingEdgeEnabled(boolean)`

### getSourceLayoutResId

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSourceLayoutResId ()
```

A `https://developer.android.com/reference/android/view/View` can be inflated from an XML layout. For such Views this method returns the
resource ID of the source layout.

<br />

| Returns ||
|---|---|
| `int` | The layout resource id if this view was inflated from XML, otherwise `https://developer.android.com/reference/android/content/res/Resources#ID_NULL`. <br /> |

### getStateDescription

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final CharSequence getStateDescription ()
```

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


**Note:** Do not override this method, as it will have no
effect on the state description presented to accessibility services.
You must call `https://developer.android.com/reference/android/view/View#setStateDescription(java.lang.CharSequence)` to modify the
state description.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the state description. This value may be `null`. <br /> |

**See also:**

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

### getStateListAnimator

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public StateListAnimator getStateListAnimator ()
```

Returns the current StateListAnimator if exists.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/animation/StateListAnimator` | StateListAnimator or null if it does not exists <br /> |

**See also:**

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

### getSupplementalDescription

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getSupplementalDescription ()
```

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


A supplemental description provides
brief supplemental information for this node, such as the purpose of the node when
that purpose is not conveyed within its textual representation. For example, if a
dropdown select has a purpose of setting font family, the supplemental description
could be "font family". If this node has children, its supplemental description serves
as additional information and is not intended to replace any existing information
in the subtree. This is different from the `https://developer.android.com/reference/android/view/View#getContentDescription()` in that
this description is purely supplemental while a content description may be used
to replace a description for a node or its subtree that an assistive technology
would otherwise compute based on other properties of the node and its descendants.


**Note:** Do not override this method, as it will have no
effect on the supplemental description presented to accessibility services.
You must call `https://developer.android.com/reference/android/view/View#setSupplementalDescription(java.lang.CharSequence)` to modify the
supplemental description.

<br />

**Related XML Attributes:**

- [android:supplementalDescription](https://developer.android.com/reference/android/view/View#attr_android:supplementalDescription)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the supplemental description. This value may be `null`. <br /> |

**See also:**

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

### getSystemGestureExclusionRects

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public List<Rect> 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.

Do not modify the returned list.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` | the list set by `https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)` This value cannot be `null`. <br /> |

### getSystemUiVisibility

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSystemUiVisibility ()
```


**This method was deprecated
in API level 30.**   

SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.

Returns the last `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)` that this view has requested.

<br />

| Returns ||
|---|---|
| `int` | Bitwise-or of flags `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE`, and `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE_STICKY`. <br /> |

### getTag

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object getTag ()
```

Returns this view's tag.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | the Object stored in this view as a tag, or `null` if not set <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setTag(java.lang.Object)`
- `https://developer.android.com/reference/android/view/View#getTag(int)`

### getTag

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Object getTag (int key)
```

Returns the tag associated with this view and the specified key.

<br />

| Parameters ||
|---|---|
| `key` | `int`: The key identifying the tag <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/Object` | the Object stored in this view as a tag, or `null` if not set <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setTag(int,%20java.lang.Object)`
- `https://developer.android.com/reference/android/view/View#getTag()`

### getTextAlignment

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextAlignment ()
```

Return the resolved text alignment.

<br />

**Related XML Attributes:**

- [android:textAlignment](https://developer.android.com/reference/android/view/View#attr_android:textAlignment)

| Returns ||
|---|---|
| `int` | the resolved text alignment. Returns one of: `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_CENTER`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_START`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_END`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_START`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_END` Value is one of the following: - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_INHERIT` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_CENTER` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_START` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_END` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_START` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_END` |

### getTextDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getTextDirection ()
```

Return the resolved text direction.

<br />

**Related XML Attributes:**

- [android:textDirection](https://developer.android.com/reference/android/view/View#attr_android:textDirection)

| Returns ||
|---|---|
| `int` | the resolved text direction. Returns one of: `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_ANY_RTL`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LTR`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_RTL`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LOCALE`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_LTR`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_RTL` <br /> |

### getTooltipText

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public CharSequence getTooltipText ()
```

Returns the view's tooltip text.

**Note:** Do not override this method, as it will have no
effect on the text displayed in the tooltip. You must call
`https://developer.android.com/reference/android/view/View#setTooltipText(java.lang.CharSequence)` to modify the tooltip text.

<br />

**Related XML Attributes:**

- [android:tooltipText](https://developer.android.com/reference/android/view/View#attr_android:tooltipText)

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/CharSequence` | the tooltip text. This value may be `null`. <br /> |

**See also:**

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

### getTop

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getTop ()
```

Top position of this view relative to its parent.

<br />

| Returns ||
|---|---|
| `int` | The top of this view, in pixels. <br /> |

### getTouchDelegate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public TouchDelegate getTouchDelegate ()
```

Gets the TouchDelegate for this View.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/TouchDelegate` | <br /> |

### getTouchables

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ArrayList<View> getTouchables ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/ArrayList<https://developer.android.com/reference/android/view/View>` | A list of touchable views <br /> |

### getTransitionAlpha

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float 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. This value is composited with the other alpha
value (and the AlphaAnimation value, when that is present) to produce a final
visual translucency result, which is what is passed into the DisplayList.

<br />

| Returns ||
|---|---|
| `float` | <br /> |

### getTransitionName

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String getTransitionName ()
```

Returns the name of the View to be used to identify Views in Transitions.
Names should be unique in the View hierarchy.

This returns null if the View has not been given a name.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | The name used of the View to be used to identify Views in Transitions or null if no name has been given. <br /> |

### getTranslationX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTranslationX ()
```

The horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.
This position is post-layout, in addition to wherever the object's
layout placed it.

<br />

| Returns ||
|---|---|
| `float` | The horizontal position of this view relative to its left position, in pixels. <br /> |

### getTranslationY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTranslationY ()
```

The vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.
This position is post-layout, in addition to wherever the object's
layout placed it.

<br />

| Returns ||
|---|---|
| `float` | The vertical position of this view relative to its top position, in pixels. <br /> |

### getTranslationZ

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getTranslationZ ()
```

The depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.

<br />

| Returns ||
|---|---|
| `float` | The depth of this view relative to its elevation. <br /> |

### getUniqueDrawingId

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public long getUniqueDrawingId ()
```

Get the identifier used for this view by the drawing system.

<br />

| Returns ||
|---|---|
| `long` | A long that uniquely identifies this view's drawing component <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/RenderNode#getUniqueId()`

### getVerticalFadingEdgeLength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getVerticalFadingEdgeLength ()
```

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

<br />

**Related XML Attributes:**

- [android:fadingEdgeLength](https://developer.android.com/reference/android/view/View#attr_android:fadingEdgeLength)

| Returns ||
|---|---|
| `int` | The size in pixels of the vertical faded edge or 0 if vertical faded edges are not enabled for this view. <br /> |

### getVerticalScrollbarPosition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getVerticalScrollbarPosition ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The position where the vertical scroll bar will show, if applicable. <br /> |

**See also:**

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

### getVerticalScrollbarThumbDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getVerticalScrollbarThumbDrawable ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

**See also:**

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

### getVerticalScrollbarTrackDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Drawable getVerticalScrollbarTrackDrawable ()
```

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

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable` | <br /> |

**See also:**

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

### getVerticalScrollbarWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getVerticalScrollbarWidth ()
```

Returns the width of the vertical scrollbar.

<br />

| Returns ||
|---|---|
| `int` | The width in pixels of the vertical scrollbar or 0 if there is no vertical scrollbar. <br /> |

### getViewTranslationResponse

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewTranslationResponse getViewTranslationResponse ()
```

Returns the `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` associated with this view. The response will be
set when the translation is done then `https://developer.android.com/reference/android/view/View#onViewTranslationResponse(android.view.translation.ViewTranslationResponse)` is called. The
`https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` can use to get `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` to display the
translated information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` | a `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` that contains the translated information associated with this view or `null` if this View doesn't have the translation. <br /> |

### getViewTreeObserver

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewTreeObserver getViewTreeObserver ()
```

Returns the ViewTreeObserver for this view's hierarchy. The view tree
observer can be used to get notifications when global events, like
layout, happen.

The returned ViewTreeObserver observer is not guaranteed to remain
valid for the lifetime of this View. If the caller of this method keeps
a long-lived reference to ViewTreeObserver, it should always check for
the return value of `https://developer.android.com/reference/android/view/ViewTreeObserver#isAlive()`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewTreeObserver` | The ViewTreeObserver for this view's hierarchy. <br /> |

### getVisibility

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getVisibility ()
```

Returns the visibility status for this view.

<br />

**Related XML Attributes:**

- [android:visibility](https://developer.android.com/reference/android/view/View#attr_android:visibility)

| Returns ||
|---|---|
| `int` | 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` |

### getWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getWidth ()
```

Return the width of your view.

<br />

| Returns ||
|---|---|
| `int` | The width of your view, in pixels. <br /> |

### getWindowId

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowId getWindowId ()
```

Retrieve the `https://developer.android.com/reference/android/view/WindowId` for the window this view is
currently attached to.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowId` | <br /> |

### getWindowInsetsController

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsetsController getWindowInsetsController ()
```

Retrieves the single `https://developer.android.com/reference/android/view/WindowInsetsController` of the window this view is attached to.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsetsController` | The `https://developer.android.com/reference/android/view/WindowInsetsController` or `null` if the view is neither attached to a window nor a view tree with a decor. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getInsetsController()`

### getWindowSystemUiVisibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getWindowSystemUiVisibility ()
```


**This method was deprecated
in API level 30.**   

SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.

Returns the current system UI visibility that is currently set for
the entire window. This is the combination of the
`https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)` values supplied by all of the
views in the window.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getWindowToken

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IBinder getWindowToken ()
```

Retrieve a unique token identifying the window this view is attached to.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/IBinder` | Return the window's token for use in `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#token`. This token maybe null if this view is not attached to a window. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isAttachedToWindow()`
- `https://developer.android.com/reference/android/view/View.OnAttachStateChangeListener`

### getWindowVisibility

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int 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`).

<br />

| Returns ||
|---|---|
| `int` | Returns the current visibility of the view's window. 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` |

### getWindowVisibleDisplayFrame

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void getWindowVisibleDisplayFrame (Rect outRect)
```

Retrieve the overall visible display size in which the window this view is
attached to has been positioned in. This takes into account screen
decorations above the window, for both cases where the window itself
is being position inside of them or the window is being placed under
then and covered insets are used for the window to position its content
inside. In effect, this tells you the available area where content can
be placed and remain visible to users.

<br />

| Parameters ||
|---|---|
| `outRect` | `Rect`: Filled in with the visible display frame. If the view is not attached to a window, this is simply the raw display size. <br /> |

### getX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getX ()
```

The visual x position of this view, in pixels. This is equivalent to the
`https://developer.android.com/reference/android/view/View#setTranslationX(float)` property plus the current
`https://developer.android.com/reference/android/view/View#getLeft()` property.

<br />

| Returns ||
|---|---|
| `float` | The visual x position of this view, in pixels. <br /> |

### getY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getY ()
```

The visual y position of this view, in pixels. This is equivalent to the
`https://developer.android.com/reference/android/view/View#setTranslationY(float)` property plus the current
`https://developer.android.com/reference/android/view/View#getTop()` property.

<br />

| Returns ||
|---|---|
| `float` | The visual y position of this view, in pixels. <br /> |

### getZ

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public float getZ ()
```

The visual z position of this view, in pixels. This is equivalent to the
`https://developer.android.com/reference/android/view/View#setTranslationZ(float)` property plus the current
`https://developer.android.com/reference/android/view/View#getElevation()` property.

<br />

| Returns ||
|---|---|
| `float` | The visual z position of this view, in pixels. <br /> |

### hasExplicitFocusable

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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`.
A "reachable hasExplicitFocusable()" is a view whose parents do not block descendants focus.
Only `https://developer.android.com/reference/android/view/View#VISIBLE` views for which `https://developer.android.com/reference/android/view/View#getFocusable()` would return
`https://developer.android.com/reference/android/view/View#FOCUSABLE` are considered focusable.

This method preserves the pre-`https://developer.android.com/reference/android/os/Build.VERSION_CODES#O` behavior of
`https://developer.android.com/reference/android/view/View#hasFocusable()` in that only views explicitly set focusable will cause
this method to return true. A view set to `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO` that resolves
to focusable will not.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the view is focusable or if the view contains a focusable view, `false` otherwise <br /> |

**See also:**

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

### hasFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasFocus ()
```

Returns true if this view has focus itself, or is the ancestor of the
view that has focus.

<br />

| Returns ||
|---|---|
| `boolean` | True if this view has or contains focus, false otherwise. <br /> |

### hasFocusable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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`. A "reachable hasFocusable()"
is a view whose parents do not block descendants focus.
Only `https://developer.android.com/reference/android/view/View#VISIBLE` views are considered focusable.

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#O` views that are determined to be focusable
through `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO` will also cause this method to return `true`.
Apps that declare a `https://developer.android.com/reference/android/content/pm/ApplicationInfo#targetSdkVersion` of
earlier than `https://developer.android.com/reference/android/os/Build.VERSION_CODES#O` will continue to see this method return
`false` for views not explicitly marked as focusable.
Use `https://developer.android.com/reference/android/view/View#hasExplicitFocusable()` if you require the pre-`https://developer.android.com/reference/android/os/Build.VERSION_CODES#O`
behavior.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the view is focusable or if the view contains a focusable view, `false` otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS`
- `https://developer.android.com/reference/android/view/ViewGroup#getTouchscreenBlocksFocus()`
- `https://developer.android.com/reference/android/view/View#hasExplicitFocusable()`

### hasNestedScrollingParent

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasNestedScrollingParent ()
```

Returns true if this view has a nested scrolling parent.

The presence of a nested scrolling parent indicates that this view has initiated
a nested scroll and it was accepted by an ancestor view further up the view hierarchy.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | whether this view has a nested scrolling parent <br /> |

### hasOnClickListeners

Added in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasOnClickListeners ()
```

Return whether this view has an attached OnClickListener. Returns
true if there is a listener, false if there is none.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasOnLongClickListeners

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasOnLongClickListeners ()
```

Return whether this view has an attached OnLongClickListener. Returns
true if there is a listener, false if there is none.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### 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 /> |

### hasPointerCapture

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasPointerCapture ()
```

Checks pointer capture status.

<br />

| Returns ||
|---|---|
| `boolean` | true if the view has pointer capture. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#requestPointerCapture()`
- `https://developer.android.com/reference/android/view/View#hasPointerCapture()`

### hasTransientState

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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.

A view with transient state cannot be trivially rebound from an external
data source, such as an adapter binding item views in a list. This may be
because the view is performing an animation, tracking user selection
of content, or similar.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the view has transient state <br /> |

### hasWindowFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean hasWindowFocus ()
```

Returns true if this view is in a window that currently has window focus.
Note that this is not the same as the view itself having focus.

<br />

| Returns ||
|---|---|
| `boolean` | True if this view is in a window that currently has window focus. <br /> |

### inflate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static View inflate (Context context, 
                int resource, 
                ViewGroup root)
```

Inflate a view from an XML resource. This convenience method wraps the `https://developer.android.com/reference/android/view/LayoutInflater` class, which provides a full range of options for view inflation.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The Context object for your activity or application. <br /> |
| `resource` | `int`: The resource ID to inflate <br /> |
| `root` | `ViewGroup`: A view group that will be the parent. Used to properly inflate the layout_\* parameters. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/LayoutInflater`

### invalidate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void invalidate ()
```

Invalidate the whole view. If the view is visible,
`https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)` will be called at some point in
the future.


This must be called from a UI thread. To call from a non-UI thread, call
`https://developer.android.com/reference/android/view/View#postInvalidate()`.

<br />

### invalidate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void invalidate (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()`.

Mark the area defined by dirty as needing to be drawn. If the view is
visible, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)` will be called at some
point in the future.


This must be called from a UI thread. To call from a non-UI thread, call
`https://developer.android.com/reference/android/view/View#postInvalidate()`.


**WARNING:** In API 19 and below, this method may be destructive to
`dirty`.

<br />

| Parameters ||
|---|---|
| `dirty` | `Rect`: the rectangle representing the bounds of the dirty region <br /> |

### invalidate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void invalidate (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()`.

Mark the area defined by the rect (l,t,r,b) as needing to be drawn. The
coordinates of the dirty rect are relative to the view. If the view is
visible, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)` will be called at some
point in the future.


This must be called from a UI thread. To call from a non-UI thread, call
`https://developer.android.com/reference/android/view/View#postInvalidate()`.

<br />

| Parameters ||
|---|---|
| `l` | `int`: the left position of the dirty region <br /> |
| `t` | `int`: the top position of the dirty region <br /> |
| `r` | `int`: the right position of the dirty region <br /> |
| `b` | `int`: the bottom position of the dirty region <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`: the drawable to invalidate. This value cannot be `null`. <br /> |

### invalidateOutline

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void invalidateOutline ()
```

Called to rebuild this View's Outline from its `https://developer.android.com/reference/android/view/ViewOutlineProvider`

<br />

**See also:**

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

### isAccessibilityDataSensitive

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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.


See default behavior provided by `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_AUTO`. Otherwise,
returns true for `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_YES` or false for `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_NO`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if this view should restrict accessibility service access to services that have the isAccessibilityTool property. <br /> |

### isAccessibilityFocused

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAccessibilityFocused ()
```

Returns whether this View is accessibility focused.

<br />

| Returns ||
|---|---|
| `boolean` | True if this View is accessibility focused. <br /> |

### isAccessibilityHeading

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAccessibilityHeading ()
```

Gets whether this view is a heading for accessibility purposes.

<br />

**Related XML Attributes:**

- [android:accessibilityHeading](https://developer.android.com/reference/android/view/View#attr_android:accessibilityHeading)

| Returns ||
|---|---|
| `boolean` | `true` if the view is a heading, `false` otherwise. <br /> |

### isActivated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isActivated ()
```

Indicates the activation state of this view.

<br />

| Returns ||
|---|---|
| `boolean` | true if the view is activated, false otherwise <br /> |

### isAttachedToWindow

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAttachedToWindow ()
```

Returns true if this view is currently attached to a window.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### 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 /> |

**See also:**

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

### isClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isClickable ()
```

Indicates whether this view reacts to click events or not.

<br />

**Related XML Attributes:**

- [android:clickable](https://developer.android.com/reference/android/view/View#attr_android:clickable)

| Returns ||
|---|---|
| `boolean` | true if the view is clickable, false otherwise <br /> |

**See also:**

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

### isContentCaptureSelfReportingEnabled

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean isContentCaptureSelfReportingEnabled ()
```

Returns whether this View automatically reports its lifecycle events and layout bounds
to the Content Capture Version 2.

By default, this method returns `true`, which instructs the Android View system to
automatically track this view's visibility, position, layout bounds, and structural changes
and report them directly to the active `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession`.

Views can override this method to return `false` to disable this automatic
monitoring and take full manual control over when and how their properties are reported. This
is particularly useful for Views that participate in hybrid hierarchies that can nest Views
and Virtual Views bidirectionally. By disabling this behavior, the View itself can choose
its own parent id and report the relative bounds to that parent in the Content Capture
hierarchy.

#### Important for Content Capture Status and Self Reporting

`https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)` can influence whether this View is reported to
the Content Capture entirely, e.g. `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO` also disables
self reporting. However, not being important for Content Capture influences how descendant
nodes are reported. If this View were to be set as **NOT** important for Content Capture,
its children will skip this View while finding their parent id and relative bounds to that
parent. Therefore, if this View needs to still act as a parent to its children in Content
Capture hierarchy, but needs to control how itself is reported, overriding this method and
returning `false` is recommended.

**Note:** If this method returns `false`, the view is fully responsible for
notifying the system about its lifecycle and property updates by calling methods such as
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyNodeAppearedOrChanged(android.view.autofill.AutofillId,%20android.view.contentcapture.ContentCaptureNodeProperties)` and `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyNodeDisappeared(android.view.autofill.AutofillId)` on the main thread.
This methods belongs to Content Capture Version 2.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if automatic self-reporting is enabled (default), `false` otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#getContentCaptureVersion()`
- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#VERSION_2`

### isContentSensitive

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean 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)`.

<br />

| Returns ||
|---|---|
| `boolean` | whether the view displays sensitive content. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setContentSensitivity(int)`
- `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO`
- `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_SENSITIVE`
- `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_NOT_SENSITIVE`

### isContextClickable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isContextClickable ()
```

Indicates whether this view reacts to context clicks or not.

<br />

**Related XML Attributes:**

- [android:contextClickable](https://developer.android.com/reference/android/view/View#attr_android:contextClickable)

| Returns ||
|---|---|
| `boolean` | true if the view is context clickable, false otherwise <br /> |

**See also:**

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

### isCredential

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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.

Gets the mode for determining whether this view is a credential.

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

<br />

**Related XML Attributes:**

- [android:isCredential](https://developer.android.com/reference/android/view/View#attr_android:isCredential)

| Returns ||
|---|---|
| `boolean` | false by default, or value passed to `https://developer.android.com/reference/android/view/View#setIsCredential(boolean)`. <br /> |

### isDirty

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDirty ()
```

True if this view has changed since the last time being drawn.

<br />

| Returns ||
|---|---|
| `boolean` | The dirty state of this view. <br /> |

### isDrawingCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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.

<br />

Indicates whether the drawing cache is enabled for this view.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the drawing cache is enabled <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#getDrawingCache()`

### isDuplicateParentStateEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDuplicateParentStateEnabled ()
```

<br />

Indicates whether this duplicates its drawable state from its parent.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if this view's drawable state is duplicated from the parent, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getDrawableState()`
- `https://developer.android.com/reference/android/view/View#setDuplicateParentStateEnabled(boolean)`

### isEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isEnabled ()
```

Returns the enabled status for this view. The interpretation of the
enabled state varies by subclass.

<br />

| Returns ||
|---|---|
| `boolean` | True if this view is enabled, false otherwise. <br /> |

### isFocusable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isFocusable ()
```

Returns whether this View is currently able to take focus.

<br />

| Returns ||
|---|---|
| `boolean` | True if this view can take focus, or false otherwise. <br /> |

### isFocusableInTouchMode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isFocusableInTouchMode ()
```

When a view is focusable, it may not want to take focus when in touch mode.
For example, a button would like focus when the user is navigating via a D-pad
so that the user can click on it, but once the user starts touching the screen,
the button shouldn't take focus

<br />

**Related XML Attributes:**

- [android:focusableInTouchMode](https://developer.android.com/reference/android/view/View#attr_android:focusableInTouchMode)

| Returns ||
|---|---|
| `boolean` | Whether the view is focusable in touch mode. <br /> |

### isFocused

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isFocused ()
```

Returns true if this view has focus

<br />

| Returns ||
|---|---|
| `boolean` | True if this view has focus, false otherwise. <br /> |

### isFocusedByDefault

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isFocusedByDefault ()
```

Returns whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


Focus gets restored for a view hierarchy when the root of the hierarchy gets added to a
window or serves as a target of cluster navigation.

<br />

**Related XML Attributes:**

- [android:focusedByDefault](https://developer.android.com/reference/android/view/View#attr_android:focusedByDefault)

| Returns ||
|---|---|
| `boolean` | `true` if this view is the default-focus view, `false` otherwise <br /> |

**See also:**

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

### isForceDarkAllowed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isForceDarkAllowed ()
```

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

<br />

| Returns ||
|---|---|
| `boolean` | true if force dark is allowed (default), false if it is disabled <br /> |

### isHandwritingDelegate

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHandwritingDelegate ()
```

Returns whether this view has been set as a handwriting delegate by `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)`.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isHapticFeedbackEnabled

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHapticFeedbackEnabled ()
```

<br />

<br />

**Related XML Attributes:**

- [android:hapticFeedbackEnabled](https://developer.android.com/reference/android/view/View#attr_android:hapticFeedbackEnabled)

| Returns ||
|---|---|
| `boolean` | whether this view should have haptic feedback enabled for events such as long presses. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setHapticFeedbackEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#performHapticFeedback(int)`

### isHardwareAccelerated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHardwareAccelerated ()
```

<br />

Indicates whether this view is attached to a hardware accelerated
window or not.

Even if this method returns true, it does not mean that every call
to `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` will be made with an hardware
accelerated `https://developer.android.com/reference/android/graphics/Canvas`. For instance, if this view
is drawn onto an offscreen `https://developer.android.com/reference/android/graphics/Bitmap` and its
window is hardware accelerated,
`https://developer.android.com/reference/android/graphics/Canvas#isHardwareAccelerated()` will likely
return false, and this method will return true.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | True if the view is attached to a window and the window is hardware accelerated; false in any other case. <br /> |

### isHorizontalFadingEdgeEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHorizontalFadingEdgeEnabled ()
```

<br />

Indicate whether the horizontal edges are faded when the view is
scrolled horizontally.

<br />

<br />

**Related XML Attributes:**

- [android:requiresFadingEdge](https://developer.android.com/reference/android/view/View#attr_android:requiresFadingEdge)

| Returns ||
|---|---|
| `boolean` | true if the horizontal edges should are faded on scroll, false otherwise <br /> |

**See also:**

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

### isHorizontalScrollBarEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHorizontalScrollBarEnabled ()
```

<br />

Indicate whether the horizontal scrollbar should be drawn or not. The
scrollbar is not drawn by default.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the horizontal scrollbar should be painted, false otherwise <br /> |

**See also:**

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

### isHovered

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isHovered ()
```

Returns true if the view is currently hovered.

<br />

| Returns ||
|---|---|
| `boolean` | True if the view is currently hovered. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setHovered(boolean)`
- `https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)`

### isImportantForAccessibility

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isImportantForAccessibility ()
```

Computes whether this view should be exposed for accessibility. In
general, views that are interactive or provide information are exposed
while views that serve only as containers are hidden.


If an ancestor of this view has importance
`https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`, this method
returns `false`.


Otherwise, the value is computed according to the view's
`https://developer.android.com/reference/android/view/View#getImportantForAccessibility()` value:

1. `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO` or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`, return `false
   `
2. `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_YES`, return `true`
3. `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_AUTO`, return `true` if view satisfies any of the following:
   - Is actionable, e.g. `https://developer.android.com/reference/android/view/View#isClickable()`, `https://developer.android.com/reference/android/view/View#isLongClickable()`, `https://developer.android.com/reference/android/view/View#isContextClickable()`, `https://developer.android.com/reference/android/view/View#isScreenReaderFocusable()`, or `https://developer.android.com/reference/android/view/View#isFocusable()`
   - Has an `https://developer.android.com/reference/android/view/View.AccessibilityDelegate`
   - Has an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeProvider`
   - Has an interaction listener, e.g. `https://developer.android.com/reference/android/view/View.OnTouchListener`, `https://developer.android.com/reference/android/view/View.OnKeyListener`, etc.
   - Is an accessibility live region, e.g. `https://developer.android.com/reference/android/view/View#getAccessibilityLiveRegion()` is not `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_NONE`.
4. Has an accessibility pane title, see `https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)`
5. Is an accessibility heading, see `https://developer.android.com/reference/android/view/View#setAccessibilityHeading(boolean)`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | Whether the view is exposed for accessibility. <br /> |

**See also:**

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

### isImportantForAutofill

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean 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.

Generally speaking, a view is important for autofill if:

1. The view can be autofilled by an `https://developer.android.com/reference/android/service/autofill/AutofillService`.
2. The view contents can help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how other views can be autofilled.
   1. For example, view containers should typically return `false` for performance reasons (since the important info is provided by their children), but if its properties have relevant information (for example, a resource id called `credentials`, it should return `true`. On the other hand, views representing labels or editable fields should typically return `true`, but in some cases they could return `false` (for example, if they're part of a "Captcha" mechanism).
   2. The value returned by this method depends on the value returned by `https://developer.android.com/reference/android/view/View#getImportantForAutofill()`:
   1. if it returns `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES` or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`, then it returns `true`
   2. if it returns `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO` or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS`, then it returns `false`
   3. if it returns `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO`, then it uses some simple heuristics that can return `true` in some cases (like a container with a resource id), but `false` in most.
   4. otherwise, it returns `false`.
   3. The behavior of importances depends on Android version:
   1. For `https://developer.android.com/reference/android/os/Build.VERSION_CODES#TIRAMISU` and below:
      1. When a view is considered important for autofill:
         1. The view might automatically trigger an autofill request when focused on.
         2. The contents of the view are included in the `https://developer.android.com/reference/android/view/ViewStructure` used in an autofill request.
      2. On the other hand, when a view is considered not important for autofill:
         1. The view never automatically triggers autofill requests, but it can trigger a manual request through `https://developer.android.com/reference/android/view/autofill/AutofillManager#requestAutofill(android.view.View)`.
         2. The contents of the view are not included in the `https://developer.android.com/reference/android/view/ViewStructure` used in an autofill request, unless the request has the `https://developer.android.com/reference/android/view/View#AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS` flag.
   2. For `https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE` and above:
      1. The system uses importance, along with other view properties and other optimization factors, to determine if a view should trigger autofill on focus.
      2. The contents of `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`, and `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS` views will be included in the `https://developer.android.com/reference/android/view/ViewStructure` used in an autofill request.

   | Returns ||
   |---|---|
   | `boolean` | whether the view is considered important for autofill. <br /> |

   **See also:**
   - `https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)`
   - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO`
   - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES`
   - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO`
   - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`
   - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS`
   - `https://developer.android.com/reference/android/view/autofill/AutofillManager#requestAutofill(android.view.View)`

### isImportantForContentCapture

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean 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`.

See `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureManager` for more info about content capture.

<br />

| Returns ||
|---|---|
| `boolean` | whether the view is considered important for content capture. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS`

### isInEditMode

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isInEditMode ()
```

Indicates whether this View is currently in edit mode. A View is usually
in edit mode when displayed within a developer tool. For instance, if
this View is being drawn by a visual user interface builder, this method
should return true.

Subclasses should check the return value of this method to provide
different behaviors if their normal behavior might interfere with the
host environment. For instance: the class spawns a thread in its
constructor, the drawing code relies on device-specific features, etc.

This method is usually checked in the drawing code of custom widgets.

<br />

| Returns ||
|---|---|
| `boolean` | True if this View is in edit mode, false otherwise. <br /> |

### isInLayout

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isInLayout ()
```

Returns whether the view hierarchy is currently undergoing a layout pass. This
information is useful to avoid situations such as calling `https://developer.android.com/reference/android/view/View#requestLayout()` during
a layout pass.

<br />

| Returns ||
|---|---|
| `boolean` | whether the view hierarchy is currently undergoing a layout pass <br /> |

### isInTouchMode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isInTouchMode ()
```

Returns the touch mode state associated with this view.

Attached views return the touch mode state from the associated window's display.
Detached views just return the default touch mode value defined in
`com.android.internal.R.bool.config_defaultInTouchMode`.

Touch mode is entered once the user begins interacting with the device by touch, and
affects various things like whether focus highlight is always visible to the user.

<br />

| Returns ||
|---|---|
| `boolean` | the touch mode state associated with this view <br /> |

### isKeyboardNavigationCluster

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isKeyboardNavigationCluster ()
```

Returns whether this View is a root of a keyboard navigation cluster.

<br />

**Related XML Attributes:**

- [android:keyboardNavigationCluster](https://developer.android.com/reference/android/view/View#attr_android:keyboardNavigationCluster)

| Returns ||
|---|---|
| `boolean` | True if this view is a root of a cluster, or false otherwise. <br /> |

### isLaidOut

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLaidOut ()
```

Returns true if this view has been through at least one layout since it
was last attached to or detached from a window.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isLayoutDirectionResolved

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLayoutDirectionResolved ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if layout direction has been resolved. <br /> |

### isLayoutRequested

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLayoutRequested ()
```

<br />

Indicates whether or not this view's layout will be requested during
the next hierarchy layout pass.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the layout will be forced during next layout pass <br /> |

### isLongClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLongClickable ()
```

Indicates whether this view reacts to long click events or not.

<br />

**Related XML Attributes:**

- [android:longClickable](https://developer.android.com/reference/android/view/View#attr_android:longClickable)

| Returns ||
|---|---|
| `boolean` | true if the view is long clickable, false otherwise <br /> |

**See also:**

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

### isNestedScrollingEnabled

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isNestedScrollingEnabled ()
```

Returns true if nested scrolling is enabled for this view.

If nested scrolling is enabled and this View class implementation supports it,
this view will act as a nested scrolling child view when applicable, forwarding data
about the scroll operation in progress to a compatible and cooperating nested scrolling
parent.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if nested scrolling is enabled <br /> |

**See also:**

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

### isOpaque

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isOpaque ()
```

Indicates whether this View is opaque. An opaque View guarantees that it will
draw all the pixels overlapping its bounds using a fully opaque color.

Subclasses of View should override this method whenever possible to indicate
whether an instance is opaque. Opaque Views are treated in a special way by
the View hierarchy, possibly allowing it to perform optimizations during
invalidate/draw passes.

<br />

| Returns ||
|---|---|
| `boolean` | True if this View is guaranteed to be fully opaque, false otherwise. <br /> |

### isPaddingRelative

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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

<br />

**Related XML Attributes:**

- [android:paddingStart](https://developer.android.com/reference/android/view/View#attr_android:paddingStart)
- [android:paddingEnd](https://developer.android.com/reference/android/view/View#attr_android:paddingEnd)

| Returns ||
|---|---|
| `boolean` | true if the padding is relative or false if it is not. <br /> |

### isPivotSet

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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)`. If no pivot has been set then the pivot will be the center
of the view.

<br />

| Returns ||
|---|---|
| `boolean` | True if a pivot has been set, false if the default pivot is being used <br /> |

### isPreferKeepClear

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isPreferKeepClear ()
```

Retrieve the preference for this view to be kept clear. This is set either by
`https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)` or via the attribute android.R.styleable#View_preferKeepClear.


If this is `true`, the system will ignore the Rects set by
`https://developer.android.com/reference/android/view/View#setPreferKeepClearRects(java.util.List<android.graphics.Rect>)` and try to keep the whole view clear.

<br />

<br />

**Related XML Attributes:**

- [android:preferKeepClear](https://developer.android.com/reference/android/view/View#attr_android:preferKeepClear)

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

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

### isPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isPressed ()
```

Indicates whether the view is currently in pressed state. Unless
`https://developer.android.com/reference/android/view/View#setPressed(boolean)` is explicitly called, only clickable views can enter
the pressed state.

<br />

| Returns ||
|---|---|
| `boolean` | true if the view is currently pressed, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setPressed(boolean)`
- `https://developer.android.com/reference/android/view/View#isClickable()`
- `https://developer.android.com/reference/android/view/View#setClickable(boolean)`

### isSaveEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean 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).

<br />

**Related XML Attributes:**

- [android:saveEnabled](https://developer.android.com/reference/android/view/View#attr_android:saveEnabled)

| Returns ||
|---|---|
| `boolean` | Returns true if the view state saving is enabled, else false. <br /> |

**See also:**

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

### isSaveFromParentEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSaveFromParentEnabled ()
```

Indicates whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent. The default
is true; if false, these views will not be saved unless
`https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)` is called directly on this view.

<br />

| Returns ||
|---|---|
| `boolean` | Returns true if the view state saving from parent is enabled, else false. <br /> |

**See also:**

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

### isScreenReaderFocusable

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScreenReaderFocusable ()
```

Returns whether the view should be treated as a focusable unit by screen reader
accessibility tools.


**Note:** Use
`https://developer.android.com/reference/androidx/core/view/ViewCompat.html#setScreenReaderFocusable(android.view.View,%20boolean)`
for backwards-compatibility.

<br />

**Related XML Attributes:**

- [android:screenReaderFocusable](https://developer.android.com/reference/android/view/View#attr_android:screenReaderFocusable)

| Returns ||
|---|---|
| `boolean` | Whether the view should be treated as a focusable unit by screen reader. <br /> |

**See also:**

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

### isScrollContainer

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScrollContainer ()
```

Indicates whether this view is one of the set of scrollable containers in
its window.

<br />

**Related XML Attributes:**

- [android:isScrollContainer](https://developer.android.com/reference/android/view/View#attr_android:isScrollContainer)

| Returns ||
|---|---|
| `boolean` | whether this view is one of the set of scrollable containers in its window <br /> |

### isScrollbarFadingEnabled

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isScrollbarFadingEnabled ()
```

Returns true if scrollbars will fade when this view is not scrolling

<br />

**Related XML Attributes:**

- [android:fadeScrollbars](https://developer.android.com/reference/android/view/View#attr_android:fadeScrollbars)

| Returns ||
|---|---|
| `boolean` | true if scrollbar fading is enabled <br /> |

### isSelected

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSelected ()
```

Indicates the selection state of this view.

<br />

| Returns ||
|---|---|
| `boolean` | true if the view is selected, false otherwise <br /> |

### isShowingLayoutBounds

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean isShowingLayoutBounds ()
```

Returns `true` when the View is attached and the system developer setting to show
the layout bounds is enabled or `false` otherwise.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isShown

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isShown ()
```

Returns the visibility of this view and all of its ancestors

<br />

| Returns ||
|---|---|
| `boolean` | True if this view and all of its ancestors are `https://developer.android.com/reference/android/view/View#VISIBLE` <br /> |

### isSoundEffectsEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isSoundEffectsEnabled ()
```

<br />

<br />

**Related XML Attributes:**

- [android:soundEffectsEnabled](https://developer.android.com/reference/android/view/View#attr_android:soundEffectsEnabled)

| Returns ||
|---|---|
| `boolean` | whether this view should have sound effects enabled for events such as clicking and touching. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setSoundEffectsEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#playSoundEffect(int)`

### isTemporarilyDetached

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean 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()`.

This method always returns `true` when called directly or indirectly from
`https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()`. The return value when called directly or indirectly from
`https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()`, however, depends on the OS version.

- `true` on `https://developer.android.com/reference/android/os/Build.VERSION_CODES#N`
- `false` on `https://developer.android.com/reference/android/os/Build.VERSION_CODES#N_MR1`} and later

<br />

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` when the 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()`. <br /> |

### isTextAlignmentResolved

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isTextAlignmentResolved ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if text alignment is resolved. <br /> |

### isTextDirectionResolved

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isTextDirectionResolved ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if text direction is resolved. <br /> |

### isVerticalFadingEdgeEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isVerticalFadingEdgeEnabled ()
```

<br />

Indicate whether the vertical edges are faded when the view is
scrolled horizontally.

<br />

<br />

**Related XML Attributes:**

- [android:requiresFadingEdge](https://developer.android.com/reference/android/view/View#attr_android:requiresFadingEdge)

| Returns ||
|---|---|
| `boolean` | true if the vertical edges should are faded on scroll, false otherwise <br /> |

**See also:**

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

### isVerticalScrollBarEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isVerticalScrollBarEnabled ()
```

<br />

Indicate whether the vertical scrollbar should be drawn or not. The
scrollbar is not drawn by default.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the vertical scrollbar should be painted, false otherwise <br /> |

**See also:**

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

### isVisibleToUserForAutofill

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isVisibleToUserForAutofill (int virtualId)
```

Computes whether this virtual autofill view is visible to the user.

**Note:** By default it returns `true`, but views providing a virtual hierarchy
view must override it.

<br />

| Parameters ||
|---|---|
| `virtualId` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | Whether the view is visible on the screen. <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 />

### keyboardNavigationClusterSearch

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View keyboardNavigationClusterSearch (View currentCluster, 
                int direction)
```

Find the nearest keyboard navigation cluster in the specified direction.
This does not actually give focus to that cluster.

<br />

| Parameters ||
|---|---|
| `currentCluster` | `View`: The starting point of the search. Null means the current cluster is not found yet <br /> |
| `direction` | `int`: Direction to look. 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` |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | The nearest keyboard navigation cluster in the specified direction, or null if none can be found <br /> |

### layout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void layout (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.
(The first is measuring). In this phase, each parent calls
layout on all of its children to position them.
This is typically done using the child measurements
that were stored in the measure pass().

Derived classes should not override this method.
Derived classes with children should override
onLayout. In that method, they should
call layout on each of their children.

<br />

<br />

| Parameters ||
|---|---|
| `l` | `int`: Left position, relative to parent <br /> |
| `t` | `int`: Top position, relative to parent <br /> |
| `r` | `int`: Right position, relative to parent <br /> |
| `b` | `int`: Bottom position, relative to parent <br /> |

### measure

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void measure (int widthMeasureSpec, 
                int heightMeasureSpec)
```

<br />


This is called to find out how big a view should be. The parent
supplies constraint information in the width and height parameters.


The actual measurement work of a view is performed in
`https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`, called by this method. Therefore, only
`https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` can and must be overridden by subclasses.

<br />

<br />

| Parameters ||
|---|---|
| `widthMeasureSpec` | `int`: Horizontal space requirements as imposed by the parent <br /> |
| `heightMeasureSpec` | `int`: Vertical space requirements as imposed by the parent <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`

### offsetLeftAndRight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void offsetLeftAndRight (int offset)
```

Offset this view's horizontal location by the specified amount of pixels.

<br />

| Parameters ||
|---|---|
| `offset` | `int`: the number of pixels to offset the view by <br /> |

### offsetTopAndBottom

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void offsetTopAndBottom (int offset)
```

Offset this view's vertical location by the specified number of pixels.

<br />

| Parameters ||
|---|---|
| `offset` | `int`: the number of pixels to offset the view by <br /> |

### onApplyWindowInsets

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public WindowInsets onApplyWindowInsets (WindowInsets insets)
```

Called when the view should apply `https://developer.android.com/reference/android/view/WindowInsets` according to its internal policy.

This method should be overridden by views that wish to apply a policy different from or
in addition to the default behavior. Clients that wish to force a view subtree
to apply insets should call `https://developer.android.com/reference/android/view/View#dispatchApplyWindowInsets(android.view.WindowInsets)`.

Clients may supply an `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` to a view. If one is set
it will be called during dispatch instead of this method. The listener may optionally
call this method from its own implementation if it wishes to apply the view's default
insets policy in addition to its own.

Implementations of this method should either return the insets parameter unchanged
or a new `https://developer.android.com/reference/android/view/WindowInsets` cloned from the supplied insets with any insets consumed
that this view applied itself. This allows new inset types added in future platform
versions to pass through existing implementations unchanged without being erroneously
consumed.

By default if a view's `https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)`
property is set then the view will consume the system window insets and apply them
as padding for the view.

<br />

<br />

| Parameters ||
|---|---|
| `insets` | `WindowInsets`: Insets to apply <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsets` | The supplied insets with any applied insets consumed <br /> |

### onCancelPendingInputEvents

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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.

This method is responsible for removing any pending high-level input events that were
posted to the event queue to run later. Custom view classes that post their own deferred
high-level events via `https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)`, `https://developer.android.com/reference/android/view/View#postDelayed(java.lang.Runnable,%20long)` or
`https://developer.android.com/reference/android/os/Handler` should override this method, call
`super.onCancelPendingInputEvents()` and remove those callbacks as appropriate.

<br />

<br />

### onCapturedPointerEvent

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onCapturedPointerEvent (MotionEvent event)
```

Implement this method to handle captured pointer events

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The captured pointer event. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled, false otherwise. <br /> |

**See also:**

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

### 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 /> |

### 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.

The default implementation does nothing.

<br />

<br />

| Parameters ||
|---|---|
| `supportedFormats` | `int`: the supported translation formats. For now, the only possible value is the `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT`. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT` |
| `requestsCollector` | `Consumer`: a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` collector that can be used to collect the information to be translated in the view. The `requestsCollector` only accepts one request; an IllegalStateException is thrown if more than one `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` is submitted to it. The `https://developer.android.com/reference/android/view/autofill/AutofillId` must be set on the `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`. This value cannot be `null`. <br /> |

### onCreateVirtualViewTranslationRequests

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onCreateVirtualViewTranslationRequests (long[] virtualIds, 
                int[] supportedFormats, 
                Consumer<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. This is called if this view returned a virtual
view structure from `https://developer.android.com/reference/android/view/View#onProvideContentCaptureStructure(android.view.ViewStructure,%20int)` and the system determined that
those virtual views were relevant for translation.

The default implementation does nothing.

<br />

<br />

| Parameters ||
|---|---|
| `virtualIds` | `long`: the virtual view ids which represents the virtual views in the host view. This value cannot be `null`. <br /> |
| `supportedFormats` | `int`: the supported translation formats. For now, the only possible value is the `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT`. This value cannot be `null`. Value is one of the following: - `https://developer.android.com/reference/android/view/translation/TranslationSpec#DATA_FORMAT_TEXT` |
| `requestsCollector` | `Consumer`: a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` collector that can be called multiple times to collect the information to be translated in the host view. One `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` per virtual child. The `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` must contains the `https://developer.android.com/reference/android/view/autofill/AutofillId` corresponding to the virtualChildIds. Do not keep this Consumer after the method returns. 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)`.


The system calls this method and passes a `https://developer.android.com/reference/android/view/DragEvent` object in response to drag and
drop events. This method can then call `https://developer.android.com/reference/android/view/DragEvent#getAction()` to determine the state
of the drag and drop operation.


The default implementation returns `false` unless an `https://developer.android.com/reference/android/view/OnReceiveContentListener`
has been set for this view (see `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)`), in which case
the default implementation does the following:

- Returns `true` for an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED` event
- Calls `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` event
- Returns `true` for an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` event if the `OnReceiveContentListener` consumed some or all of the content

<br />

<br />

| Parameters ||
|---|---|
| `event` | `DragEvent`: The `https://developer.android.com/reference/android/view/DragEvent` object sent by the system. The `https://developer.android.com/reference/android/view/DragEvent#getAction()` method returns an action type constant that indicates the type of drag event represented by this object. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the method successfully handled the drag event, otherwise `false`. The method must return `true` in response to an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED` action type to continue to receive drag events for the current drag and drop operation. The method should return `true` in response to an `https://developer.android.com/reference/android/view/DragEvent#ACTION_DROP` action type if the dropped data was consumed (at least partially); `false`, if none of the data was consumed. For all other events, the return value is `false`. |

### onDrawForeground

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDrawForeground (Canvas canvas)
```

Draw any foreground content for this view.

Foreground content may consist of scroll bars, a `https://developer.android.com/reference/android/view/View#setForeground(android.graphics.drawable.Drawable)`
drawable or other view-specific decorations. The foreground is drawn on top of the
primary view content.

<br />

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: canvas to draw into. This value cannot be `null`. <br /> |

### onFilterTouchEventForSecurity

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onFilterTouchEventForSecurity (MotionEvent event)
```

Filter the touch event to apply security policies.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be filtered. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event should be dispatched, false if the event should be dropped. <br /> |

**See also:**

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

### onFinishTemporaryDetach

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onFinishTemporaryDetach ()
```

Called after `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()` when the container is done
changing the view.

<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 /> |

### onHoverChanged

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onHoverChanged (boolean hovered)
```

Implement this method to handle hover state changes.


This method is called whenever the hover state changes as a result of a
call to `https://developer.android.com/reference/android/view/View#setHovered(boolean)`.

<br />

<br />

| Parameters ||
|---|---|
| `hovered` | `boolean`: The current hover state, as returned by `https://developer.android.com/reference/android/view/View#isHovered()`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isHovered()`
- `https://developer.android.com/reference/android/view/View#setHovered(boolean)`

### onHoverEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onHoverEvent (MotionEvent event)
```

Implement this method to handle hover events.


This method is called whenever a pointer is hovering into, over, or out of the
bounds of a view and the view is not currently being touched.
Hover events are represented as pointer events with action
`https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_ENTER`, `https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_MOVE`,
or `https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_EXIT`.

- The view receives a hover event with action `https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_ENTER` when the pointer enters the bounds of the view.
- The view receives a hover event with action `https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_MOVE` when the pointer has already entered the bounds of the view and has moved.
- The view receives a hover event with action `https://developer.android.com/reference/android/view/MotionEvent#ACTION_HOVER_EXIT` when the pointer has exited the bounds of the view or when the pointer is about to go down due to a button click, tap, or similar user action that causes the view to be touched.


The view should implement this method to return true to indicate that it is
handling the hover event, such as by changing its drawable state.


The default implementation calls `https://developer.android.com/reference/android/view/View#setHovered(boolean)` to update the hovered state
of the view when a hover enter or hover exit event is received, if the view
is enabled and is clickable. The default implementation also sends hover
accessibility events.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event that describes the hover. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the view handled the hover event. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isHovered()`
- `https://developer.android.com/reference/android/view/View#setHovered(boolean)`
- `https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)`

### onInitializeAccessibilityEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onInitializeAccessibilityEvent (AccessibilityEvent event)
```

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` with information about
this View which is the event source. In other words, the source of
an accessibility event is the view whose state change triggered firing
the event.


Example: Setting the password property of an event in addition
to properties set by the super implementation:

```
 public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    event.setPassword(true);
}
```


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#onInitializeAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
is responsible for handling this call.

**Note:** Always call the super implementation before adding
information to the event, in case the default implementation has basic information to add.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `AccessibilityEvent`: The event to initialize. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)`
- `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`

### onInitializeAccessibilityNodeInfo

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onInitializeAccessibilityNodeInfo (AccessibilityNodeInfo info)
```

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` with information about this view.
The base implementation sets:

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setParent(android.view.View)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setBoundsInParent(android.graphics.Rect)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setBoundsInScreen(android.graphics.Rect)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setPackageName(java.lang.CharSequence)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setClassName(java.lang.CharSequence)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setContentDescription(java.lang.CharSequence)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setEnabled(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setClickable(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setFocusable(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setFocused(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setLongClickable(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setSelected(boolean)`,
- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setContextClickable(boolean)`


Subclasses should override this method, call the super implementation,
and set additional attributes.


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#onInitializeAccessibilityNodeInfo(android.view.View,%20android.view.accessibility.AccessibilityNodeInfo)`
is responsible for handling this call.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

| Parameters ||
|---|---|
| `info` | `AccessibilityNodeInfo`: The instance to initialize. <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 /> |

### onKeyLongPress

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onKeyLongPress (int keyCode, 
                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).

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`: 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 /> |

### 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 /> |

### onPointerCaptureChange

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPointerCaptureChange (boolean hasCapture)
```

Called when the window has just acquired or lost pointer capture.


If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `hasCapture` | `boolean`: True if the view now has pointerCapture, false otherwise. <br /> |

### onPopulateAccessibilityEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onPopulateAccessibilityEvent (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.


**Note:** This method should only be used with event.setText().
Avoid mutating other event state in this method. Instead, follow the practices described in
`https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`. In general, put UI
metadata in the node for services to easily query, than in transient events.


Example: Adding formatted date string to an accessibility event in addition
to the text added by the super implementation:

```
 public void onPopulateAccessibilityEvent(AccessibilityEvent event) {
    super.onPopulateAccessibilityEvent(event);
    final int flags = DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_WEEKDAY;
    String selectedDateUtterance = DateUtils.formatDateTime(mContext,
        mCurrentDate.getTimeInMillis(), flags);
    event.getText().add(selectedDateUtterance);
}
```


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#onPopulateAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
is responsible for handling this call.

**Note:** Always call the super implementation before adding
information to the event, in case the default implementation has basic information to add.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `AccessibilityEvent`: The accessibility event which to populate. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)`
- `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`

### onProvideAutofillStructure

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onProvideAutofillStructure (ViewStructure structure, 
                int flags)
```

Populates a `https://developer.android.com/reference/android/view/ViewStructure` to fullfil an autofill request.

The structure should contain at least the following properties:

- Autofill id (`https://developer.android.com/reference/android/view/ViewStructure#setAutofillId(android.view.autofill.AutofillId,%20int)`).
- Autofill type (`https://developer.android.com/reference/android/view/ViewStructure#setAutofillType(int)`).
- Autofill value (`https://developer.android.com/reference/android/view/ViewStructure#setAutofillValue(android.view.autofill.AutofillValue)`).
- Whether the data is sensitive (`https://developer.android.com/reference/android/view/ViewStructure#setDataIsSensitive(boolean)`).

It's also recommended to set the following properties - the more properties the structure
has, the higher the chances of an `https://developer.android.com/reference/android/service/autofill/AutofillService` properly
using the structure:

- Autofill hints (`https://developer.android.com/reference/android/view/ViewStructure#setAutofillHints(java.lang.String[])`).
- Autofill options (`https://developer.android.com/reference/android/view/ViewStructure#setAutofillOptions(java.lang.CharSequence[])`) when the view can only be filled with predefined values (typically used when the autofill type is `https://developer.android.com/reference/android/view/View#AUTOFILL_TYPE_LIST`).
- Resource id (`https://developer.android.com/reference/android/view/ViewStructure#setId(int,%20java.lang.String,%20java.lang.String,%20java.lang.String)`).
- Class name (`https://developer.android.com/reference/android/view/ViewStructure#setClassName(java.lang.String)`).
- Content description (`https://developer.android.com/reference/android/view/ViewStructure#setContentDescription(java.lang.CharSequence)`).
- Visual properties such as visibility (`https://developer.android.com/reference/android/view/ViewStructure#setVisibility(int)`), dimensions (`https://developer.android.com/reference/android/view/ViewStructure#setDimens(int,%20int,%20int,%20int,%20int,%20int)`), and opacity (`https://developer.android.com/reference/android/view/ViewStructure#setOpaque(boolean)`).
- For views representing text fields, text properties such as the text itself (`https://developer.android.com/reference/android/view/ViewStructure#setText(java.lang.CharSequence)`), text hints (`https://developer.android.com/reference/android/view/ViewStructure#setHint(java.lang.CharSequence)`, input type (`https://developer.android.com/reference/android/view/ViewStructure#setInputType(int)`),
- For views representing HTML nodes, its web domain (`https://developer.android.com/reference/android/view/ViewStructure#setWebDomain(java.lang.String)`) and HTML properties ((`https://developer.android.com/reference/android/view/ViewStructure#setHtmlInfo(android.view.ViewStructure.HtmlInfo)`).

The default implementation of this method already sets most of these properties based on
related `https://developer.android.com/reference/android/view/View` methods (for example, the autofill id is set using
`https://developer.android.com/reference/android/view/View#getAutofillId()`, the autofill type set using `https://developer.android.com/reference/android/view/View#getAutofillType()`, etc.),
and views in the standard Android widgets library also override it to set their
relevant properties (for example, `https://developer.android.com/reference/android/widget/TextView` already sets the text
properties), so it's recommended to only override this method
(and call `super.onProvideAutofillStructure()`) when:

- The view contents does not include PII (Personally Identifiable Information), so it can call `https://developer.android.com/reference/android/view/ViewStructure#setDataIsSensitive(boolean)` passing `false`.
- The view can only be autofilled with predefined options, so it can call `https://developer.android.com/reference/android/view/ViewStructure#setAutofillOptions(java.lang.CharSequence[])`.

**Note:** The `left` and `top` values set in
`https://developer.android.com/reference/android/view/ViewStructure#setDimens(int,%20int,%20int,%20int,%20int,%20int)` must be relative to the next
`https://developer.android.com/reference/android/view/View#isImportantForAutofill()` predecessor view included in the structure.

Views support the Autofill Framework mainly by:

- Providing the metadata defining what the view means and how it can be autofilled.
- Notifying the Android System when the view value changed by calling `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyValueChanged(android.view.View)`.
- Implementing the methods that autofill the view.

This method is responsible for the former; `https://developer.android.com/reference/android/view/View#autofill(android.view.autofill.AutofillValue)` is responsible
for the latter.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: fill in with structured view data for autofill purposes. <br /> |
| `flags` | `int`: optional flags. Value is either `0` or - `https://developer.android.com/reference/android/view/View#AUTOFILL_FLAG_INCLUDE_NOT_IMPORTANT_VIEWS` |

**See also:**

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

### onProvideAutofillVirtualStructure

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onProvideAutofillVirtualStructure (ViewStructure structure, 
                int flags)
```

Populates a `https://developer.android.com/reference/android/view/ViewStructure` containing virtual children to fullfil an autofill
request.

This method should be used when the view manages a virtual structure under this view. For
example, a view that draws input fields using `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`.

When implementing this method, subclasses must follow the rules below:

- Add virtual children by calling the `https://developer.android.com/reference/android/view/ViewStructure#newChild(int)` or `https://developer.android.com/reference/android/view/ViewStructure#asyncNewChild(int)` methods, where the `id` is an unique id identifying the children in the virtual structure.
- The children hierarchy can have multiple levels if necessary, but ideally it should exclude intermediate levels that are irrelevant for autofill; that would improve the autofill performance.
- Also implement `https://developer.android.com/reference/android/view/View#autofill(android.util.SparseArray<android.view.autofill.AutofillValue>)` to autofill the virtual children.
- Set the autofill properties of the child structure as defined by `https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)`, using `https://developer.android.com/reference/android/view/ViewStructure#setAutofillId(android.view.autofill.AutofillId,%20int)` to set its autofill id.
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyViewEntered(android.view.View,%20int,%20android.graphics.Rect)` and/or `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyViewExited(android.view.View,%20int)` when the focused virtual child changed.
- Override `https://developer.android.com/reference/android/view/View#isVisibleToUserForAutofill(int)` to allow the platform to query whether a given virtual view is visible to the user in order to support triggering save when all views of interest go away.
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyValueChanged(android.view.View,%20int,%20android.view.autofill.AutofillValue)` when the value of a virtual child changed.
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyViewVisibilityChanged(android.view.View,%20int,%20boolean)` when the visibility of a virtual child changed.
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#notifyViewClicked(android.view.View,%20int)` when a virtual child is clicked.
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#commit()` when the autofill context of the view structure changed and the current context should be committed (for example, when the user tapped a `SUBMIT` button in an HTML page).
- Call `https://developer.android.com/reference/android/view/autofill/AutofillManager#cancel()` when the autofill context of the view structure changed and the current context should be canceled (for example, when the user tapped a `CANCEL` button in an HTML page).
- Provide ways for users to manually request autofill by calling `https://developer.android.com/reference/android/view/autofill/AutofillManager#requestAutofill(android.view.View,%20int,%20android.graphics.Rect)`.
- The `left` and `top` values set in `https://developer.android.com/reference/android/view/ViewStructure#setDimens(int,%20int,%20int,%20int,%20int,%20int)` must be relative to the next `https://developer.android.com/reference/android/view/View#isImportantForAutofill()` predecessor view included in the structure.

Views with virtual children support the Autofill Framework mainly by:

- Providing the metadata defining what the virtual children mean and how they can be autofilled.
- Implementing the methods that autofill the virtual children.

This method is responsible for the former; `https://developer.android.com/reference/android/view/View#autofill(android.util.SparseArray<android.view.autofill.AutofillValue>)` is responsible
for the latter.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: fill in with virtual children data for autofill purposes. <br /> |
| `flags` | `int`: optional flags. <br /> |

**See also:**

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

### 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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#getContentCaptureVersion()`
- `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#VERSION_2`

### onProvideContentCaptureStructure

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onProvideContentCaptureStructure (ViewStructure structure, 
                int flags)
```

Populates a `https://developer.android.com/reference/android/view/ViewStructure` for content capture.

This method is called after a view that is eligible for content capture
(for example, if it `https://developer.android.com/reference/android/view/View#isImportantForContentCapture()`, an intelligence service is
enabled for the user, and the activity rendering the view is enabled for content capture)
is laid out and is visible. The populated structure is then passed to the service through
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyViewAppeared(android.view.ViewStructure)`.

The default implementation of this method sets the most relevant properties based on
related `https://developer.android.com/reference/android/view/View` methods, and views in the standard Android widgets library also
override it to set their relevant properties. Therefore, if overriding this method, it
is recommended to call `super.onProvideContentCaptureStructure()`.

**Note:** views that manage a virtual structure under this view must populate just
the node representing this view and return right away, then asynchronously report (not
necessarily in the UI thread) when the children nodes appear, disappear or have their text
changed by calling
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyViewAppeared(android.view.ViewStructure)`,
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyViewDisappeared(android.view.autofill.AutofillId)`, and
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#notifyViewTextChanged(android.view.autofill.AutofillId,%20java.lang.CharSequence)`
respectively. The structure for a child must be created using
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#newVirtualViewStructure(android.view.autofill.AutofillId,%20long)`, and the
`autofillId` for a child can be obtained either through
`childStructure.getAutofillId()` or
`https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#newAutofillId(android.view.autofill.AutofillId,%20long)`.

When the virtual view hierarchy represents a web page, you should also:

- Call `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureManager#getContentCaptureConditions()` to infer content capture events should be generate for that URL.
- Create a new `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` child for every HTML element that renders a new URL (like an `IFRAME`) and use that session to notify events from that subtree.

**Note:** the following methods of the `structure` will be ignored:

- `https://developer.android.com/reference/android/view/ViewStructure#setChildCount(int)`
- `https://developer.android.com/reference/android/view/ViewStructure#addChildCount(int)`
- `https://developer.android.com/reference/android/view/ViewStructure#getChildCount()`
- `https://developer.android.com/reference/android/view/ViewStructure#newChild(int)`
- `https://developer.android.com/reference/android/view/ViewStructure#asyncNewChild(int)`
- `https://developer.android.com/reference/android/view/ViewStructure#asyncCommit()`
- `https://developer.android.com/reference/android/view/ViewStructure#setWebDomain(java.lang.String)`
- `https://developer.android.com/reference/android/view/ViewStructure#newHtmlInfoBuilder(java.lang.String)`
- `https://developer.android.com/reference/android/view/ViewStructure#setHtmlInfo(android.view.ViewStructure.HtmlInfo)`
- `https://developer.android.com/reference/android/view/ViewStructure#setDataIsSensitive(boolean)`
- `https://developer.android.com/reference/android/view/ViewStructure#setAlpha(float)`
- `https://developer.android.com/reference/android/view/ViewStructure#setElevation(float)`
- `https://developer.android.com/reference/android/view/ViewStructure#setTransformation(android.graphics.Matrix)`

<br />

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: This value cannot be `null`. <br /> |
| `flags` | `int` <br /> |

### onProvideStructure

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onProvideStructure (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)`.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: Fill in with structured view data. The default implementation fills in all data that can be inferred from the view itself. <br /> |

### onProvideVirtualStructure

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onProvideVirtualStructure (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. The default implementation
uses `https://developer.android.com/reference/android/view/View#getAccessibilityNodeProvider()` to try to generate this from the
view's virtual accessibility nodes, if any. You can override this for a more
optimal implementation providing this data.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure` <br /> |

### onReceiveContent

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ContentInfo onReceiveContent (ContentInfo payload)
```

Implements the default behavior for receiving content for this type of view. The default
view implementation is a no-op (returns the passed-in content without acting on it).

Widgets should override this method to define their default behavior for receiving
content. Apps should `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)` to provide
app-specific handling for receiving content.

See `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)` and `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` for more info.

<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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/PointerIcon`
- `https://developer.android.com/reference/android/hardware/input/InputManager#isStylusPointerIconEnabled()`

### 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` |

**See also:**

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

### 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 /> |

### onScrollCaptureSearch

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onScrollCaptureSearch (Rect localVisibleRect, 
                Point windowOffset, 
                Consumer<ScrollCaptureTarget> targets)
```

Called when scroll capture is requested, to search for appropriate content to scroll. If
applicable, this view adds itself to the provided list for consideration, subject to the
flags set by `https://developer.android.com/reference/android/view/View#setScrollCaptureHint(int)`.

<br />

| Parameters ||
|---|---|
| `localVisibleRect` | `Rect`: the local visible rect of this view. This value cannot be `null`. <br /> |
| `windowOffset` | `Point`: the offset of localVisibleRect within the window. This value cannot be `null`. <br /> |
| `targets` | `Consumer`: accepts potential scroll capture targets; `https://developer.android.com/reference/java/util/function/Consumer#accept(T)` may be called zero or more times on the calling thread before onScrollCaptureSearch returns. This value cannot be `null`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if this view is not attached to a window |

### onStartTemporaryDetach

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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)`.
It will either be followed by `https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()` or
`https://developer.android.com/reference/android/view/View#onDetachedFromWindow()` when the container is done.

<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 /> |

### onViewTranslationResponse

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onViewTranslationResponse (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. The `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` should be saved here so that
the `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` can be used to display the translation when the system
calls `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback#onShowTranslation(android.view.View)`.

The default implementation will set the ViewTranslationResponse that can be get from
`https://developer.android.com/reference/android/view/View#getViewTranslationResponse()`.

<br />

<br />

| Parameters ||
|---|---|
| `response` | `ViewTranslationResponse`: a `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` that contains the translated information which can be shown in the view. This value cannot be `null`. <br /> |

### onVirtualViewTranslationResponses

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onVirtualViewTranslationResponses (LongSparseArray<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.

The default implementation does nothing.

<br />

<br />

| Parameters ||
|---|---|
| `response` | `LongSparseArray`: a `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` SparseArray for the request that send by `https://developer.android.com/reference/android/view/View#onCreateVirtualViewTranslationRequests(long[],%20int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` that contains the translated information which can be shown in the view. The key of SparseArray is the virtual child ids. This value cannot be `null`. <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 /> |

### onWindowSystemUiVisibilityChanged

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onWindowSystemUiVisibilityChanged (int visible)
```


**This method was deprecated
in API level 30.**   

SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.

Override to find out when the window's requested system UI visibility
has changed, that is the value returned by `https://developer.android.com/reference/android/view/View#getWindowSystemUiVisibility()`.
This is different from the callbacks received through
`https://developer.android.com/reference/android/view/View#setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener)`
in that this is only telling you about the local request of the window,
not the actual values applied by the system.

<br />

| Parameters ||
|---|---|
| `visible` | `int` <br /> |

### performAccessibilityAction

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performAccessibilityAction (int action, 
                Bundle arguments)
```

Performs the specified accessibility action on the view. For
possible accessibility actions look at `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo`.


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#performAccessibilityAction(android.view.View,%20int,%20android.os.Bundle)`
is responsible for handling this call.

The default implementation will delegate
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#ACTION_SCROLL_BACKWARD` and
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#ACTION_SCROLL_FORWARD` to nested scrolling parents if
`https://developer.android.com/reference/android/view/View#isNestedScrollingEnabled()` on this view.


**Note:** Avoid setting accessibility focus with
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#ACTION_ACCESSIBILITY_FOCUS`. This is intended to be controlled
by screen readers. Apps changing focus can confuse screen readers, so the resulting behavior
can vary by device and screen reader version.

<br />

| Parameters ||
|---|---|
| `action` | `int`: The action to perform. <br /> |
| `arguments` | `Bundle`: Optional action arguments. This value may be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether the action was performed. <br /> |

### performClick

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performClick ()
```

Call this view's OnClickListener, if it is defined. Performs all normal
actions associated with clicking: reporting accessibility event, playing
a sound, etc.

<br />

| Returns ||
|---|---|
| `boolean` | True there was an assigned OnClickListener that was called, false otherwise is returned. <br /> |

### performContextClick

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performContextClick (float x, 
                float y)
```

Call this view's OnContextClickListener, if it is defined.

<br />

| Parameters ||
|---|---|
| `x` | `float`: the x coordinate of the context click <br /> |
| `y` | `float`: the y coordinate of the context click <br /> |

| Returns ||
|---|---|
| `boolean` | True if there was an assigned OnContextClickListener that consumed the event, false otherwise. <br /> |

### performContextClick

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performContextClick ()
```

Call this view's OnContextClickListener, if it is defined.

<br />

| Returns ||
|---|---|
| `boolean` | True if there was an assigned OnContextClickListener that consumed the event, false otherwise. <br /> |

### performHapticFeedback

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performHapticFeedback (int feedbackConstant)
```

BZZZTT!!1!

Provide haptic feedback to the user for this view.

The framework will provide haptic feedback for some built in actions,
such as long presses, but you may wish to provide feedback for your
own widget.

The feedback will only be performed if
`https://developer.android.com/reference/android/view/View#isHapticFeedbackEnabled()` is true.

<br />

| Parameters ||
|---|---|
| `feedbackConstant` | `int`: One of the constants defined in `https://developer.android.com/reference/android/view/HapticFeedbackConstants` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### performHapticFeedback

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean performHapticFeedback (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`.

Using a `https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest` allows you to make more elaborate haptic feedback
requests, including setting the usage type for the requested feedback.

Specifying the usage type for your feedback allows the system to understand the context of
the feedback better, and tune the haptic accordingly. When not specifying the usage type for
the feedback request, or when using the other performHapticFeedback APIs, the system will do
a best guess of the vibration usage based on the constant.

See `https://developer.android.com/reference/android/os/VibrationAttributes` to learn more about vibration usages. The usage provided
for this API must be of `https://developer.android.com/reference/android/os/VibrationAttributes#USAGE_CLASS_FEEDBACK`, or
`https://developer.android.com/reference/android/os/VibrationAttributes#USAGE_UNKNOWN`. Otherwise, the haptic feedback will not be played.
If `https://developer.android.com/reference/android/os/VibrationAttributes#USAGE_UNKNOWN` is used, the system will do a best guess of the
vibration usage based on the constant.

Note that, if you will be calling this API repeatedly and your
`https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest` does not change across these repeated calls, it is recommended
that you create, cache, and reuse the request object to avoid the costs of repeated object
creation and garbage collection.

<br />

| Parameters ||
|---|---|
| `request` | `HapticFeedbackRequest`: the `https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest` encapsulating the request for haptic. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | `false` if `https://developer.android.com/reference/android/view/View#isHapticFeedbackEnabled()` is `false`, or this View is not attached to a visible window, or the vibration usage in the provided request is not valid (i.e. neither has `https://developer.android.com/reference/android/os/VibrationAttributes#USAGE_CLASS_FEEDBACK` nor is `https://developer.android.com/reference/android/os/VibrationAttributes#USAGE_UNKNOWN`); otherwise, `true`, indicating that the haptic feedback request has been sent to the system. Note that `true` could be returned but no vibration may be produced if the service decides that the device's states do not allow for this haptic feedback (for example, the user disabled vibrations for this usage). <br /> |

**See also:**

- `https://developer.android.com/reference/android/os/VibrationAttributes#getUsage()`
- `https://developer.android.com/reference/android/os/VibrationAttributes#getUsageClass()`

### performHapticFeedback

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performHapticFeedback (int feedbackConstant, 
                int flags)
```

BZZZTT!!1!

Like `https://developer.android.com/reference/android/view/View#performHapticFeedback(int)`, with additional options.

<br />

| Parameters ||
|---|---|
| `feedbackConstant` | `int`: One of the constants defined in `https://developer.android.com/reference/android/view/HapticFeedbackConstants` <br /> |
| `flags` | `int`: Additional flags as per `https://developer.android.com/reference/android/view/HapticFeedbackConstants`. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### performLongClick

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean performLongClick (float x, 
                float y)
```

Calls this view's OnLongClickListener, if it is defined. Invokes the
context menu if the OnLongClickListener did not consume the event,
anchoring it to an (x,y) coordinate.

<br />

| Parameters ||
|---|---|
| `x` | `float`: x coordinate of the anchoring touch event, or `https://developer.android.com/reference/java/lang/Float#NaN` to disable anchoring <br /> |
| `y` | `float`: y coordinate of the anchoring touch event, or `https://developer.android.com/reference/java/lang/Float#NaN` to disable anchoring <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if one of the above receivers consumed the event, `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 /> |

### performReceiveContent

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ContentInfo performReceiveContent (ContentInfo payload)
```

Receives the given content. If no listener is set, invokes `https://developer.android.com/reference/android/view/View#onReceiveContent(android.view.ContentInfo)`. If a
listener is `https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)`, invokes the listener instead; if the
listener returns a non-null result, invokes `https://developer.android.com/reference/android/view/View#onReceiveContent(android.view.ContentInfo)` to handle it.

<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 accepted (may be all, some, or none of the passed-in content). <br /> |

### playSoundEffect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void playSoundEffect (int soundConstant)
```

Play a sound effect for this view.

The framework will play sound effects for some built in actions, such as
clicking, but you may wish to play these effects in your widget,
for instance, for internal navigation.

The sound effect will only be played if sound effects are enabled by the user, and
`https://developer.android.com/reference/android/view/View#isSoundEffectsEnabled()` is true.

<br />

| Parameters ||
|---|---|
| `soundConstant` | `int`: One of the constants defined in `https://developer.android.com/reference/android/view/SoundEffectConstants`. Value is one of the following: - `https://developer.android.com/reference/android/view/SoundEffectConstants#CLICK` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_LEFT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_UP` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_RIGHT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_DOWN` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_LEFT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_UP` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_RIGHT` - `https://developer.android.com/reference/android/view/SoundEffectConstants#NAVIGATION_REPEAT_DOWN` |

### post

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean post (Runnable action)
```

<br />

Causes the Runnable to be added to the message queue.
The runnable will be run on the user interface thread.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `Runnable`: The Runnable that will be executed. <br /> |

| Returns ||
|---|---|
| `boolean` | Returns true if the Runnable was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#postDelayed(java.lang.Runnable,%20long)`
- `https://developer.android.com/reference/android/view/View#removeCallbacks(java.lang.Runnable)`

### postDelayed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean postDelayed (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.
The runnable will be run on the user interface thread.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `Runnable`: The Runnable that will be executed. <br /> |
| `delayMillis` | `long`: The delay (in milliseconds) until the Runnable will be executed. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the Runnable was successfully placed in to the message queue. Returns false on failure, usually because the looper processing the message queue is exiting. Note that a result of true does not mean the Runnable will be processed -- if the looper is quit before the delivery time of the message occurs then the message will be dropped. <br /> |

**See also:**

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

### postInvalidate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidate ()
```

<br />

Cause an invalidate to happen on a subsequent cycle through the event loop.
Use this to invalidate the View from a non-UI thread.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#invalidate()`
- `https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long)`

### postInvalidate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidate (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. Use this to invalidate the View from a non-UI thread.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

| Parameters ||
|---|---|
| `left` | `int`: The left coordinate of the rectangle to invalidate. <br /> |
| `top` | `int`: The top coordinate of the rectangle to invalidate. <br /> |
| `right` | `int`: The right coordinate of the rectangle to invalidate. <br /> |
| `bottom` | `int`: The bottom coordinate of the rectangle to invalidate. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#invalidate(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/view/View#invalidate(android.graphics.Rect)`
- `https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long,%20int,%20int,%20int,%20int)`

### postInvalidateDelayed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidateDelayed (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. Waits for the specified amount of time.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

| Parameters ||
|---|---|
| `delayMilliseconds` | `long`: the duration in milliseconds to delay the invalidation by <br /> |
| `left` | `int`: The left coordinate of the rectangle to invalidate. <br /> |
| `top` | `int`: The top coordinate of the rectangle to invalidate. <br /> |
| `right` | `int`: The right coordinate of the rectangle to invalidate. <br /> |
| `bottom` | `int`: The bottom coordinate of the rectangle to invalidate. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#invalidate(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/view/View#invalidate(android.graphics.Rect)`
- `https://developer.android.com/reference/android/view/View#postInvalidate(int,%20int,%20int,%20int)`

### postInvalidateDelayed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidateDelayed (long delayMilliseconds)
```

<br />

Cause an invalidate to happen on a subsequent cycle through the event
loop. Waits for the specified amount of time.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

| Parameters ||
|---|---|
| `delayMilliseconds` | `long`: the duration in milliseconds to delay the invalidation by <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#invalidate()`
- `https://developer.android.com/reference/android/view/View#postInvalidate()`

### postInvalidateOnAnimation

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidateOnAnimation (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.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

| Parameters ||
|---|---|
| `left` | `int`: The left coordinate of the rectangle to invalidate. <br /> |
| `top` | `int`: The top coordinate of the rectangle to invalidate. <br /> |
| `right` | `int`: The right coordinate of the rectangle to invalidate. <br /> |
| `bottom` | `int`: The bottom coordinate of the rectangle to invalidate. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#invalidate(int,%20int,%20int,%20int)`
- `https://developer.android.com/reference/android/view/View#invalidate(android.graphics.Rect)`

### postInvalidateOnAnimation

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postInvalidateOnAnimation ()
```

<br />

Cause an invalidate to happen on the next animation time step, typically the
next display frame.

This method can be invoked from outside of the UI thread
only when this View is attached to a window.

<br />

<br />

**See also:**

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

### postOnAnimation

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postOnAnimation (Runnable action)
```

<br />

Causes the Runnable to execute on the next animation time step.
The runnable will be run on the user interface thread.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `Runnable`: The Runnable that will be executed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#postOnAnimationDelayed(java.lang.Runnable,%20long)`
- `https://developer.android.com/reference/android/view/View#removeCallbacks(java.lang.Runnable)`

### postOnAnimationDelayed

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void postOnAnimationDelayed (Runnable action, 
                long delayMillis)
```

<br />

Causes the Runnable to execute on the next animation time step,
after the specified amount of time elapses.
The runnable will be run on the user interface thread.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `Runnable`: The Runnable that will be executed. <br /> |
| `delayMillis` | `long`: The delay (in milliseconds) until the Runnable will be executed. <br /> |

**See also:**

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

### refreshDrawableState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void refreshDrawableState ()
```

Call this to force a view to update its drawable state. This will cause
drawableStateChanged to be called on this view. Views that are interested
in the new state should call getDrawableState.

<br />

**See also:**

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

### registerCalledFromWrongThreadListener

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static void registerCalledFromWrongThreadListener (View.CalledFromWrongThreadListener listener)
```

Registers a listener that is notified when a View API is called from the wrong thread.

Most View APIs should only be called on the UI thread, and will throw a
`CalledFromWrongThreadException` if they are called from the wrong thread. View APIs
that throw `CalledFromWrongThreadException` will not notify registered listeners.

For certain APIs, if they are called on the wrong thread
then an exception may not be thrown, subject to App Compatibility settings. Instead,
applications may be notified when a call to such an API is made from the wrong thread by
registering a `https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener` using this method.

<br />

| Parameters ||
|---|---|
| `listener` | `View.CalledFromWrongThreadListener`: The listener to register. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#unregisterCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)`

### releasePointerCapture

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void releasePointerCapture ()
```

Releases the pointer capture.


If the window does not have pointer capture, this call will do nothing.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#requestPointerCapture()`
- `https://developer.android.com/reference/android/view/View#hasPointerCapture()`
- `https://developer.android.com/reference/android/view/View#onPointerCaptureChange(boolean)`

### removeCallbacks

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean removeCallbacks (Runnable action)
```

<br />

Removes the specified Runnable from the message queue.

<br />

<br />

| Parameters ||
|---|---|
| `action` | `Runnable`: The Runnable to remove from the message handling queue <br /> |

| Returns ||
|---|---|
| `boolean` | true if this view could ask the Handler to remove the Runnable, false otherwise. When the returned value is true, the Runnable may or may not have been actually removed from the message queue (for instance, if the Runnable was not in the queue already.) <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)`
- `https://developer.android.com/reference/android/view/View#postDelayed(java.lang.Runnable,%20long)`
- `https://developer.android.com/reference/android/view/View#postOnAnimation(java.lang.Runnable)`
- `https://developer.android.com/reference/android/view/View#postOnAnimationDelayed(java.lang.Runnable,%20long)`

### removeOnAttachStateChangeListener

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeOnAttachStateChangeListener (View.OnAttachStateChangeListener listener)
```

Remove a listener for attach state changes. The listener will receive no further
notification of window attach/detach events.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnAttachStateChangeListener`: Listener to remove <br /> |

**See also:**

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

### removeOnLayoutChangeListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeOnLayoutChangeListener (View.OnLayoutChangeListener listener)
```

Remove a listener for layout changes.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnLayoutChangeListener`: The listener for layout bounds change. <br /> |

### removeOnUnhandledKeyEventListener

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeOnUnhandledKeyEventListener (View.OnUnhandledKeyEventListener listener)
```

Removes a listener which will receive unhandled `https://developer.android.com/reference/android/view/KeyEvent`s. This must be called on the
UI thread.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnUnhandledKeyEventListener`: a receiver of unhandled `https://developer.android.com/reference/android/view/KeyEvent`s. <br /> |

**See also:**

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

### reportAppJankStats

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void reportAppJankStats (AppJankStats appJankStats)
```

Called from apps when they want to report jank stats to the system.

<br />

| Parameters ||
|---|---|
| `appJankStats` | `AppJankStats`: the stats that will be merged with the stats collected by the system. This value cannot be `null`. <br /> |

### requestApplyInsets

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestApplyInsets ()
```

Ask that a new dispatch of `https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` be performed.

<br />

### requestFitSystemWindows

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestFitSystemWindows ()
```


**This method was deprecated
in API level 20.**   

Use `https://developer.android.com/reference/android/view/View#requestApplyInsets()` for newer platform versions.

Ask that a new dispatch of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` be performed.

<br />

### requestFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean requestFocus (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.

A view will not actually take focus if it is not focusable (`https://developer.android.com/reference/android/view/View#isFocusable()` returns
false), or if it is focusable and it is not focusable in touch mode
(`https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()`) while the device is in touch mode.

See also `https://developer.android.com/reference/android/view/View#focusSearch(int)`, which is what you call to say that you
have focus, and you want your parent to look for the next one.

This is equivalent to calling `https://developer.android.com/reference/android/view/View#requestFocus(int,%20android.graphics.Rect)` with
`null` set for the previously focused rectangle.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT <br /> |

| Returns ||
|---|---|
| `boolean` | Whether this view or one of its descendants actually took focus. <br /> |

### requestFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean requestFocus ()
```

Call this to try to give focus to a specific view or to one of its
descendants.

A view will not actually take focus if it is not focusable (`https://developer.android.com/reference/android/view/View#isFocusable()` returns
false), or if it can't be focused due to other conditions (not focusable in touch mode
(`https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()`) while the device is in touch mode, not visible, not
enabled, or has no size).

See also `https://developer.android.com/reference/android/view/View#focusSearch(int)`, which is what you call to say that you
have focus, and you want your parent to look for the next one.

This is equivalent to calling `https://developer.android.com/reference/android/view/View#requestFocus(int,%20android.graphics.Rect)` with arguments
`https://developer.android.com/reference/android/view/View#FOCUS_DOWN` and `null`.

<br />

| Returns ||
|---|---|
| `boolean` | Whether this view or one of its descendants actually took focus. <br /> |

### requestFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestFocus (int direction, 
                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. The rectangle can help give larger views a finer grained hint
about where focus is coming from, and therefore, where to show selection, or
forward focus change internally.

A view will not actually take focus if it is not focusable (`https://developer.android.com/reference/android/view/View#isFocusable()` returns
false), or if it is focusable and it is not focusable in touch mode
(`https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()`) while the device is in touch mode.

A View will not take focus if it is not visible.

A View will not take focus if one of its parents has
`https://developer.android.com/reference/android/view/ViewGroup#getDescendantFocusability()` equal to
`https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS`.

See also `https://developer.android.com/reference/android/view/View#focusSearch(int)`, which is what you call to say that you
have focus, and you want your parent to look for the next one.

You may wish to override this method if your custom `https://developer.android.com/reference/android/view/View` has an internal
`https://developer.android.com/reference/android/view/View` that it wishes to forward the request to.

<br />

| Parameters ||
|---|---|
| `direction` | `int`: One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT <br /> |
| `previouslyFocusedRect` | `Rect`: The rectangle (in this View's coordinate system) to give a finer grained hint about where focus is coming from. May be null if there is no hint. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether this view or one of its descendants actually took focus. <br /> |

### requestFocusFromTouch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean requestFocusFromTouch ()
```

Call this to try to give focus to a specific view or to one of its descendants. This is a
special variant of `https://developer.android.com/reference/android/view/View#requestFocus()` that will allow views that are not focusable in
touch mode to request focus when they are touched.

<br />

| Returns ||
|---|---|
| `boolean` | Whether this view or one of its descendants actually took focus. <br /> |

**See also:**

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

### requestLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestLayout ()
```

Call this when something has changed which has invalidated the
layout of this view. This will schedule a layout pass of the view
tree. This should not be called while the view hierarchy is currently in a layout
pass (`https://developer.android.com/reference/android/view/View#isInLayout()`. If layout is happening, the request may be honored at the
end of the current layout pass (and then layout will run again) or after the current
frame is drawn and the next layout occurs.

Subclasses which override this method should call the superclass method to
handle possible request-during-layout errors correctly.
.   
If you override this method you *must* call through to the superclass implementation.

<br />

<br />

### requestPointerCapture

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestPointerCapture ()
```

Requests pointer capture in
relative mode.


Equivalent to calling `https://developer.android.com/reference/android/view/View#requestPointerCapture(int)` with
`https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_RELATIVE`.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/View#releasePointerCapture()`
- `https://developer.android.com/reference/android/view/View#hasPointerCapture()`
- `https://developer.android.com/reference/android/view/View#onPointerCaptureChange(boolean)`

### requestPointerCapture

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestPointerCapture (int mode)
```

Requests pointer capture in the specified mode.


When the window has pointer capture, the mouse pointer icon will disappear and will not
change its position. Enabling pointer capture will change the behavior of input devices in
the following ways:

- Events from a mouse will be delivered with the source `https://developer.android.com/reference/android/view/InputDevice#SOURCE_MOUSE_RELATIVE`, and relative position changes will be available through `https://developer.android.com/reference/android/view/MotionEvent#getX()` and `https://developer.android.com/reference/android/view/MotionEvent#getY()`.
- Events from a touchpad (also known as a trackpad) will be delivered according to the chosen pointer capture mode. See `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_RELATIVE` and `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_ABSOLUTE` for details.
- Events from other types of devices, such as touchscreens, will not be affected.


Pointer ballistics curves and the user's pointer speed settings will not be applied in this
mode.


When pointer capture changes, connected mouse and touchpad devices may be reconfigured,
and their properties (such as their sources or motion ranges) may change. Use an
`https://developer.android.com/reference/android/hardware/input/InputManager.InputDeviceListener` to be notified when a device
changes (which may happen after enabling or disabling pointer capture), and use
`https://developer.android.com/reference/android/view/InputDevice#getDevice(int)` to get the updated `https://developer.android.com/reference/android/view/InputDevice`.


Events captured through pointer capture will be dispatched to
`https://developer.android.com/reference/android/view/View.OnCapturedPointerListener#onCapturedPointer(android.view.View,%20android.view.MotionEvent)` if an
`https://developer.android.com/reference/android/view/View.OnCapturedPointerListener` is set, and otherwise to
`https://developer.android.com/reference/android/view/View#onCapturedPointerEvent(android.view.MotionEvent)`.


If the window already has pointer capture in the same mode, this call does nothing. If it
already has pointer capture in a different mode, it will transition to the new mode.


The capture may be released through `https://developer.android.com/reference/android/view/View#releasePointerCapture()`, or will be lost
automatically when the window loses focus.

<br />

| Parameters ||
|---|---|
| `mode` | `int`: The mode in which to capture the pointer, which determines how events from touchpads are delivered. Value is one of the following: - `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_UNCAPTURED` - `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_ABSOLUTE` - `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_RELATIVE` |

**See also:**

- `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_RELATIVE`
- `https://developer.android.com/reference/android/view/View#POINTER_CAPTURE_MODE_ABSOLUTE`
- `https://developer.android.com/reference/android/view/View#releasePointerCapture()`
- `https://developer.android.com/reference/android/view/View#hasPointerCapture()`
- `https://developer.android.com/reference/android/view/View#onPointerCaptureChange(boolean)`

### requestRectangleOnScreen

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean requestRectangleOnScreen (Rect rectangle, 
                boolean immediate, 
                int source)
```

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.

A View should call this if it maintains some notion of which part
of its content is interesting. For example, a text editing view
should call this when its cursor moves.

The Rectangle passed into this method should be in the View's content coordinate space.
It should not be affected by which part of the View is currently visible or its scroll
position.

When `immediate` is set to true, scrolling will not be
animated.

The `source` parameter is used to differentiate behaviors of certain
system features, like focus-following with display magnification, based on user
preferences and the source of requests to show content on-screen. Callers are
encouraged to provide one of the following request sources, when applicable,
instead of using `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)`:

1. `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_SCROLL_ONLY`
2. `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_TEXT_CURSOR`
3. `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_INPUT_FOCUS`

<br />

<br />

| Parameters ||
|---|---|
| `rectangle` | `Rect`: The rectangle in the View's content coordinate space. This value cannot be `null`. <br /> |
| `immediate` | `boolean`: True to forbid animated scrolling, false otherwise <br /> |
| `source` | `int`: The type of user interaction that requested this rectangle. Value is one of the following: - `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_UNDEFINED` - `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_SCROLL_ONLY` - `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_TEXT_CURSOR` - `https://developer.android.com/reference/android/view/View#RECTANGLE_ON_SCREEN_REQUEST_SOURCE_INPUT_FOCUS` |

| Returns ||
|---|---|
| `boolean` | Whether any parent scrolled. <br /> |

### requestRectangleOnScreen

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestRectangleOnScreen (Rect rectangle)
```

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.

A View should call this if it maintains some notion of which part
of its content is interesting. For example, a text editing view
should call this when its cursor moves.

The Rectangle passed into this method should be in the View's content coordinate space.
It should not be affected by which part of the View is currently visible or its scroll
position.

<br />

| Parameters ||
|---|---|
| `rectangle` | `Rect`: The rectangle in the View's content coordinate space <br /> |

| Returns ||
|---|---|
| `boolean` | Whether any parent scrolled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo.AccessibilityAction#ACTION_SHOW_ON_SCREEN`
- `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)`

  `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)`

### requestRectangleOnScreen

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestRectangleOnScreen (Rect rectangle, 
                boolean immediate)
```

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.

A View should call this if it maintains some notion of which part
of its content is interesting. For example, a text editing view
should call this when its cursor moves.

The Rectangle passed into this method should be in the View's content coordinate space.
It should not be affected by which part of the View is currently visible or its scroll
position.

When `immediate` is set to true, scrolling will not be
animated.

<br />

| Parameters ||
|---|---|
| `rectangle` | `Rect`: The rectangle in the View's content coordinate space <br /> |
| `immediate` | `boolean`: True to forbid animated scrolling, false otherwise <br /> |

| Returns ||
|---|---|
| `boolean` | Whether any parent scrolled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)`

  `https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)`

### requestUnbufferedDispatch

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void requestUnbufferedDispatch (int source)
```

Request unbuffered dispatch of the given event source class to this view.
This is similar to `https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent)`, but does not
automatically terminate, and allows the specification of arbitrary input source classes.

Prior to `https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE`, calling this method
will not result in any behavioral changes when this View is not attached to a window.

<br />

| Parameters ||
|---|---|
| `source` | `int`: The combined input source class to request unbuffered dispatch for. All events coming from these source classes will not be buffered. Set to `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_NONE` in order to return to default behaviour. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_NONE` - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_BUTTON` - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_POINTER` - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_TRACKBALL` - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_POSITION` - `https://developer.android.com/reference/android/view/InputDevice#SOURCE_CLASS_JOYSTICK` |

**See also:**

- `https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent)`

### requestUnbufferedDispatch

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void requestUnbufferedDispatch (MotionEvent event)
```

Request unbuffered dispatch of the given stream of MotionEvents to this View.

Until this View receives a corresponding `https://developer.android.com/reference/android/view/MotionEvent#ACTION_UP`, ask that the input
system not batch `https://developer.android.com/reference/android/view/MotionEvent`s but instead deliver them as soon as they're
available. This method should only be called for touch events.

This API is not intended for most applications. Buffered dispatch
provides many of benefits, and just requesting unbuffered dispatch on most MotionEvent
streams will not improve your input latency. Side effects include: increased latency,
jittery scrolls and inability to take advantage of system resampling. Talk to your input
professional to see if `https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent)` is right for
you.
To receive unbuffered events for arbitrary input device source classes, use `https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(int)`,

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent` <br /> |

**See also:**

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

### requireViewById

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final T requireViewById (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.


**Note:** In most cases -- depending on compiler support --
the resulting view is automatically cast to the target class type. If
the target class type is unconstrained, an explicit cast may be
necessary.

<br />

| Parameters ||
|---|---|
| `id` | `int`: the ID to search for <br /> |

| Returns ||
|---|---|
| `T` | a view with given ID. This value cannot be `null`. <br /> |

**See also:**

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

### resetPivot

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void 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)`. After calling this `https://developer.android.com/reference/android/view/View#isPivotSet()` will be false
and the pivot used for rotation will return to default of being centered on the view.

<br />

### resolveSize

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int resolveSize (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.

<br />

| Parameters ||
|---|---|
| `size` | `int` <br /> |
| `measureSpec` | `int` <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### resolveSizeAndState

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int resolveSizeAndState (int size, 
                int measureSpec, 
                int childMeasuredState)
```

Utility to reconcile a desired size and state, with constraints imposed
by a MeasureSpec. Will take the desired size, unless a different size
is imposed by the constraints. The returned value is a compound integer,
with the resolved size in the `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` bits and
optionally the bit `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL` set if the
resulting size is smaller than the size the view wants to be.

<br />

| Parameters ||
|---|---|
| `size` | `int`: How big the view wants to be. <br /> |
| `measureSpec` | `int`: Constraints imposed by the parent. <br /> |
| `childMeasuredState` | `int`: Size information bit mask for the view's children. <br /> |

| Returns ||
|---|---|
| `int` | Size information bit mask as defined by `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` and `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`. <br /> |

### restoreDefaultFocus

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean restoreDefaultFocus ()
```

Gives focus to the default-focus view in the view hierarchy that has this view as a root.
If the default-focus view cannot be found, falls back to calling `https://developer.android.com/reference/android/view/View#requestFocus(int)`.

<br />

| Returns ||
|---|---|
| `boolean` | Whether this view or one of its descendants actually took focus <br /> |

### restoreHierarchyState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void restoreHierarchyState (SparseArray<Parcelable> container)
```

Restore this view hierarchy's frozen state from the given container.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: The SparseArray which holds previously frozen states. <br /> |

**See also:**

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

### saveAttributeDataForStyleable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void saveAttributeDataForStyleable (Context context, 
                int[] styleable, 
                AttributeSet attrs, 
                TypedArray t, 
                int defStyleAttr, 
                int defStyleRes)
```

Stores debugging information about attributes. This should be called in a constructor by
every custom `https://developer.android.com/reference/android/view/View` that uses a custom styleable. If the custom view does not call it,
then the custom attributes used by this view will not be visible in layout inspection tools.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: Context under which this view is created. This value cannot be `null`. <br /> |
| `styleable` | `int`: A reference to styleable array R.styleable.Foo. This value cannot be `null`. <br /> |
| `attrs` | `AttributeSet`: AttributeSet used to construct this view. This value may be `null`. <br /> |
| `t` | `TypedArray`: Resolved `https://developer.android.com/reference/android/content/res/TypedArray` returned by a call to `https://developer.android.com/reference/android/content/res/Resources#obtainAttributes(android.util.AttributeSet,%20int[])`. This value cannot be `null`. <br /> |
| `defStyleAttr` | `int`: Default style attribute passed into the view constructor. <br /> |
| `defStyleRes` | `int`: Default style resource passed into the view constructor. <br /> |

### saveHierarchyState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void saveHierarchyState (SparseArray<Parcelable> container)
```

Store this view hierarchy's frozen state into the given container.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: The SparseArray in which to save the view's state. <br /> |

**See also:**

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

### scheduleDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void scheduleDrawable (Drawable who, 
                Runnable what, 
                long when)
```

Schedules an action on a drawable to occur at a specified time.

<br />

| Parameters ||
|---|---|
| `who` | `Drawable`: the recipient of the action. This value cannot be `null`. <br /> |
| `what` | `Runnable`: the action to run on the drawable. This value cannot be `null`. <br /> |
| `when` | `long`: the time at which the action must occur. Uses the `https://developer.android.com/reference/android/os/SystemClock#uptimeMillis()` timebase. <br /> |

### scrollBy

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void scrollBy (int x, 
                int y)
```

Move the scrolled position of your view. This will cause a call to
`https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)` and the view will be
invalidated.

<br />

| Parameters ||
|---|---|
| `x` | `int`: the amount of pixels to scroll by horizontally <br /> |
| `y` | `int`: the amount of pixels to scroll by vertically <br /> |

### scrollTo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void scrollTo (int x, 
                int y)
```

Set the scrolled position of your view. This will cause a call to
`https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)` and the view will be
invalidated.

<br />

| Parameters ||
|---|---|
| `x` | `int`: the x position to scroll to <br /> |
| `y` | `int`: the y position to scroll to <br /> |

### sendAccessibilityEvent

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void sendAccessibilityEvent (int eventType)
```

Sends an accessibility event of the given type. If accessibility is
not enabled this method has no effect. The default implementation calls
`https://developer.android.com/reference/android/view/View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)` first
to populate information about the event source (this View), then calls
`https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)` to
populate the text content of the event source including its descendants,
then for events type `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_VIEW_SCROLLED`
and `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED` with
subtype `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_STATE_DESCRIPTION`,
throttle the events, and last calls
`https://developer.android.com/reference/android/view/ViewParent#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
on its parent to request sending of the event to interested parties.


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#sendAccessibilityEvent(android.view.View,%20int)` is
responsible for handling this call.


If this view uses `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeProvider` to provide virtual view hierarchy rooted
at this view, this method should not be called to send events from virtual children because
it will populate the events with wrong information and the events should be throttled per
child instead at the virtual root level. To send events from virtual children, call
`https://developer.android.com/reference/android/view/ViewParent#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)` on the view's
parent to request sending of the event to interested parties.

<br />

<br />

| Parameters ||
|---|---|
| `eventType` | `int`: The type of the event to send, as defined by several types from `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`, such as `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_VIEW_CLICKED` or `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_VIEW_HOVER_ENTER`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`
- `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`
- `https://developer.android.com/reference/android/view/ViewParent#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`
- `https://developer.android.com/reference/android/view/View.AccessibilityDelegate`

### 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 /> |

**See also:**

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

### setAccessibilityDataSensitive

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityDataSensitive (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.

<br />

| Parameters ||
|---|---|
| `accessibilityDataSensitive` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_AUTO` - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_YES` - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_DATA_SENSITIVE_NO` |

### setAccessibilityDelegate

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityDelegate (View.AccessibilityDelegate delegate)
```

Sets a delegate for implementing accessibility support via composition
(as opposed to inheritance). For more details, see
`https://developer.android.com/reference/android/view/View.AccessibilityDelegate`.


**Note:** On platform versions prior to
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, delegate methods on
views in the `android.widget.*` package are called *before*
host methods. This prevents certain properties such as class name from
being modified by overriding
`https://developer.android.com/reference/android/view/View.AccessibilityDelegate#onInitializeAccessibilityNodeInfo(android.view.View,%20android.view.accessibility.AccessibilityNodeInfo)`,
as any changes will be overwritten by the host class.


Starting in `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, delegate
methods are called *after* host methods, which all properties to be
modified without being overwritten by the host class.

<br />

| Parameters ||
|---|---|
| `delegate` | `View.AccessibilityDelegate`: the object to which accessibility method calls should be delegated. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View.AccessibilityDelegate`

### setAccessibilityHeading

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityHeading (boolean isHeading)
```

Set if view is a heading for a section of content for accessibility purposes.


Users of some accessibility services can choose to navigate between headings
instead of between paragraphs, words, etc. Apps that provide headings on
sections of text can help the text navigation experience.


**Note:** Use `https://developer.android.com/reference/androidx/core/view/ViewCompat.html#setAccessibilityHeading(android.view.View,%20boolean)`
for backwards-compatibility.

<br />

**Related XML Attributes:**

- [android:accessibilityHeading](https://developer.android.com/reference/android/view/View#attr_android:accessibilityHeading)

| Parameters ||
|---|---|
| `isHeading` | `boolean`: `true` if the view is a heading, `false` otherwise. <br /> |

### setAccessibilityLiveRegion

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityLiveRegion (int mode)
```

Sets the live region mode for this view. This indicates to accessibility
services whether they should automatically notify the user about changes
to the view's content description or text, or to the content descriptions
or text of the view's children (where applicable).


Different priority levels are available:

- `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_POLITE`: Indicates that updates to the region should be presented to the user. Suitable in most cases for prominent updates within app content that don't require the user's immediate attention.
- `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_ASSERTIVE`: Indicates that updates to the region have the highest priority and should be presented to the user immediately. This may result in disruptive notifications from an accessibility service, which may potentially interrupt other feedback or user actions, so it should generally be used only for critical, time-sensitive information.
- `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_NONE`: Disables change announcements (the default for most views).


Examples:

- Selecting an option in a dropdown menu updates a panel below with the updated content. This panel may be marked as a live region with `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_POLITE` to notify users of the change. A screen reader may queue changes as announcements that don't disrupt ongoing speech.
- An emergency alert may be marked with `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_ASSERTIVE` to immediately inform users of the emergency.


For error notifications, like an "incorrect password" warning in a login screen, views
should send a `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED`
`AccessibilityEvent` with a content change type
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_ERROR` and set
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setError(java.lang.CharSequence)`. Custom widgets should provide
error-setting methods that support accessibility. For example, use
`https://developer.android.com/reference/android/widget/TextView#setError(java.lang.CharSequence)` instead of explicitly sending events.


Don't use live regions for frequently-updating UI elements (e.g., progress bars), as this can
overwhelm the user with feedback from accessibility services. If necessary, use
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setMinDurationBetweenContentChanges(java.time.Duration)` to throttle
feedback and reduce disruptions.


**Note:** Use `https://developer.android.com/reference/androidx/core/view/ViewCompat.html#setAccessibilityLiveRegion(android.view.View,%20int)` for backwards-compatibility.

<br />

<br />

**Related XML Attributes:**

- [android:accessibilityLiveRegion](https://developer.android.com/reference/android/view/View#attr_android:accessibilityLiveRegion)

| Parameters ||
|---|---|
| `mode` | `int`: The live region mode for this view, one of: - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_NONE` - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_POLITE` - `https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_ASSERTIVE` <br /> |

### setAccessibilityPaneTitle

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityPaneTitle (CharSequence accessibilityPaneTitle)
```

Visually distinct portion of a window with window-like semantics are considered panes for
accessibility purposes. One example is the content view of a large fragment that is replaced.
In order for accessibility services to understand a pane's window-like behavior, panes
should have descriptive titles. Views with pane titles produce
`https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#TYPE_WINDOW_STATE_CHANGED`s when they appear, disappear, or change
title.


When transitioning from one Activity to another, instead of using
`setAccessibilityPaneTitle()`, set a descriptive title for its window by using
`android:label`
for the matching Activity entry in your application's manifest or updating the title at
runtime with `https://developer.android.com/reference/android/app/Activity#setTitle(java.lang.CharSequence)`.


**Note:** Use `https://developer.android.com/reference/androidx/core/view/ViewCompat.html#setAccessibilityPaneTitle(android.view.View,%20java.lang.CharSequence)` for backwards-compatibility.

<br />

<br />

**Related XML Attributes:**

- [android:accessibilityPaneTitle](https://developer.android.com/reference/android/view/View#attr_android:accessibilityPaneTitle)

| Parameters ||
|---|---|
| `accessibilityPaneTitle` | `CharSequence`: The pane's title. Setting to `null` indicates that this View is not a pane. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#setPaneTitle(java.lang.CharSequence)`

### setAccessibilityTraversalAfter

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityTraversalAfter (int afterId)
```

Sets the id of a view that screen readers are requested to visit before this view.


For example, if view B should be visited after A, with B.setAccessibilityTraversalAfter(A),
then this requests that screen readers visit and traverse view A before visiting view B.


**Note:** Views are visited in the order determined by the screen reader. Avoid
explicitly manipulating focus order, as this may result in inconsistent user
experiences between apps. Instead, use other semantics, such as restructuring the view
hierarchy layout, to communicate order.


Setting this view to be after a view that is not important for accessibility,
or if this view is not important for accessibility, means this method will have no effect if
the service is not aware of unimportant views.


To avoid a risk of loops, set clear relationships between views. For example, if focus order
should be B -\> A, and B.setAccessibilityTraversalBefore(A), then also call
A.setAccessibilityTraversalAfter(B).

<br />

**Related XML Attributes:**

- [android:accessibilityTraversalAfter](https://developer.android.com/reference/android/view/View#attr_android:accessibilityTraversalAfter)

| Parameters ||
|---|---|
| `afterId` | `int`: The id of a view this one succeeds in accessibility traversal. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setImportantForAccessibility(int)`
- `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalBefore(int)`

### setAccessibilityTraversalBefore

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAccessibilityTraversalBefore (int beforeId)
```

Sets the id of a view that screen readers are requested to visit after this view.


For example, if view B should be visited before view A, with
B.setAccessibilityTraversalBefore(A), this requests that screen readers visit and traverse
view B before visiting view A.


**Note:** Views are visited in the order determined by the screen reader. Avoid
explicitly manipulating focus order, as this may result in inconsistent user
experiences between apps. Instead, use other semantics, such as restructuring the view
hierarchy layout, to communicate order.


Setting this view to be after a view that is not important for accessibility,
or if this view is not important for accessibility, means this method will have no effect if
the service is not aware of unimportant views.


To avoid a risk of loops, set clear relationships between views. For example, if focus order
should be B -\> A, and B.setAccessibilityTraversalBefore(A), then also call
A.setAccessibilityTraversalAfter(B).

<br />

**Related XML Attributes:**

- [android:accessibilityTraversalBefore](https://developer.android.com/reference/android/view/View#attr_android:accessibilityTraversalBefore)

| Parameters ||
|---|---|
| `beforeId` | `int`: The id of a view this one precedes in accessibility traversal. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setImportantForAccessibility(int)`
- `https://developer.android.com/reference/android/view/View#setAccessibilityTraversalAfter(int)`

### setActivated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setActivated (boolean activated)
```

Changes the activated state of this view. A view can be activated or not.
Note that activation is not the same as selection. Selection is
a transient property, representing the view (hierarchy) the user is
currently interacting with. Activation is a longer-term state that the
user can move views in and out of. For example, in a list view with
single or multiple selection enabled, the views in the current selection
set are activated. (Um, yeah, we are deeply sorry about the terminology
here.) The activated state is propagated down to children of the view it
is set on.

<br />

| Parameters ||
|---|---|
| `activated` | `boolean`: true if the view must be activated, false otherwise <br /> |

### setAllowClickWhenDisabled

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAllowClickWhenDisabled (boolean clickableWhenDisabled)
```

Enables or disables click events for this view when disabled.

<br />

**Related XML Attributes:**

- [android:allowClickWhenDisabled](https://developer.android.com/reference/android/view/View#attr_android:allowClickWhenDisabled)

| Parameters ||
|---|---|
| `clickableWhenDisabled` | `boolean`: true to make the view clickable, false otherwise <br /> |

### setAllowedHandwritingDelegatePackage

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAllowedHandwritingDelegatePackage (String allowedPackageName)
```

Specifies that this view may act as a handwriting initiation delegator for a delegate editor
view from the specified package. If this method is not called, delegators may only be used to
initiate handwriting mode for a delegate editor view from the same package as the delegator
view. This method allows specifying a different trusted package which may contain a delegate
editor view linked to this delegator view.

This method has no effect unless `https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)` is also called
to configure this view to act as a handwriting delegator.

If this method is called on the delegator view, then `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)` should also be called on the delegate editor view.

For example, to configure a delegator view in package 1:

```
delegatorView.setHandwritingDelegatorCallback(callback);
delegatorView.setAllowedHandwritingDelegatePackage(package2);
```
Then to configure the corresponding delegate editor view in package 2:

```
delegateEditorView.setIsHandwritingDelegate(true);
delegateEditorView.setAllowedHandwritingDelegatorPackage(package1);
```

<br />

<br />

| Parameters ||
|---|---|
| `allowedPackageName` | `String`: the package name of a delegate editor view linked to this delegator view, or `null` to restore the default behavior of only allowing delegate editor views from the same package as this delegator view <br /> |

### setAllowedHandwritingDelegatorPackage

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAllowedHandwritingDelegatorPackage (String allowedPackageName)
```

Specifies that a view from the specified package may act as a handwriting delegator for this
delegate editor view. If this method is not called, only views from the same package as this
delegate editor view may act as a handwriting delegator. This method allows specifying a
different trusted package which may contain a delegator view linked to this delegate editor
view.

This method has no effect unless `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)` is also called to
configure this view to act as a handwriting delegate.

If this method is called on the delegate editor view, then `https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatePackage(java.lang.String)` should also be called on the delegator view.

<br />

| Parameters ||
|---|---|
| `allowedPackageName` | `String`: the package name of a delegator view linked to this delegate editor view, or `null` to restore the default behavior of only allowing delegator views from the same package as this delegate editor view <br /> |

### setAlpha

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAlpha (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.

**Note:** setting alpha to a translucent value (0 \< alpha \< 1)
can have significant performance implications, especially for large views. It is best to use
the alpha property sparingly and transiently, as in the case of fading animations.

For a view with a frequently changing alpha, such as during a fading animation, it is
strongly recommended for performance reasons to either override
`https://developer.android.com/reference/android/view/View#hasOverlappingRendering()` to return `false` if appropriate, or setting a
`https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` on the view for the duration
of the animation. On versions `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M` and below,
the default path for rendering an unlayered View with alpha could add multiple milliseconds
of rendering cost, even for simple or small views. Starting with
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE` is automatically
applied to the view at the rendering level.

If this view overrides `https://developer.android.com/reference/android/view/View#onSetAlpha(int)` to return true, then this view is
responsible for applying the opacity itself.

On versions `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP_MR1` and below, note that if
the view is backed by a `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` and is
associated with a `https://developer.android.com/reference/android/view/View#setLayerPaint(android.graphics.Paint)`, setting an
alpha value less than 1.0 will supersede the alpha of the layer paint.

Starting with `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, setting a translucent alpha
value will clip a View to its bounds, unless the View returns `false` from
`https://developer.android.com/reference/android/view/View#hasOverlappingRendering()`.

<br />

<br />

**Related XML Attributes:**

- [android:alpha](https://developer.android.com/reference/android/view/View#attr_android:alpha)

| Parameters ||
|---|---|
| `alpha` | `float`: The opacity of the view. Value is between 0.0f and 1.0f inclusive <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#hasOverlappingRendering()`
- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`

### setAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAnimation (Animation animation)
```

Sets the next animation to play for this view.
If you want the animation to play immediately, use
`https://developer.android.com/reference/android/view/View#startAnimation(android.view.animation.Animation)` instead.
This method provides allows fine-grained
control over the start time and invalidation, but you
must make sure that 1) the animation has a start time set, and
2) the view's parent (which controls animations on its children)
will be invalidated when the animation is supposed to
start.

<br />

| Parameters ||
|---|---|
| `animation` | `Animation`: The next animation, or null. <br /> |

### setAnimationMatrix

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAnimationMatrix (Matrix matrix)
```

Changes the transformation matrix on the view. This is used in animation frameworks,
such as `https://developer.android.com/reference/android/transition/Transition`. When the animation finishes, the matrix
should be cleared by calling this method with `null` as the matrix parameter.
Application developers should use transformation methods like `https://developer.android.com/reference/android/view/View#setRotation(float)`,
`https://developer.android.com/reference/android/view/View#setScaleX(float)`, `https://developer.android.com/reference/android/view/View#setScaleX(float)`, `https://developer.android.com/reference/android/view/View#setTranslationX(float)`}
and `https://developer.android.com/reference/android/view/View#setTranslationY(float)` (float)}} instead.

<br />

| Parameters ||
|---|---|
| `matrix` | `Matrix`: The matrix, null indicates that the matrix should be cleared. <br /> |

**See also:**

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

### setAutoHandwritingEnabled

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutoHandwritingEnabled (boolean enabled)
```

Set whether this view enables automatic handwriting initiation.

For a view with an active `https://developer.android.com/reference/android/view/inputmethod/InputConnection`, if auto handwriting is enabled then
stylus movement within its view boundary will automatically trigger the handwriting mode.
Check `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#startStylusHandwriting(android.view.View)` for
more details about handwriting mode.

If the View wants to initiate handwriting mode by itself, it can set this field to
`false` and call
`https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#startStylusHandwriting(android.view.View)` when there
is stylus movement detected.

Note that this attribute has no effect on the View's children. For example, if a
`https://developer.android.com/reference/android/view/ViewGroup` disables auto handwriting but its children set auto handwriting to true,
auto handwriting will still work for the children, and vice versa.

<br />

**Related XML Attributes:**

- [android:autoHandwritingEnabled](https://developer.android.com/reference/android/view/View#attr_android:autoHandwritingEnabled)

| Parameters ||
|---|---|
| `enabled` | `boolean`: whether auto handwriting initiation is enabled for this view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo)`
- `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#startStylusHandwriting(android.view.View)`

### setAutofillHints

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutofillHints (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.

Typically, there is only one way to autofill a view, but there could be more than one.
For example, if the application accepts either an username or email address to identify
an user.

These hints are not validated by the Android System, but passed "as is" to the service.
Hence, they can have any value, but it's recommended to use the `AUTOFILL_HINT_`
constants such as:
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_USERNAME`, `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PASSWORD`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_EMAIL_ADDRESS`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_NAME`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_PHONE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_ADDRESS`, `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_POSTAL_CODE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_NUMBER`, `https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_SECURITY_CODE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DATE`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_DAY`,
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_MONTH` or
`https://developer.android.com/reference/android/view/View#AUTOFILL_HINT_CREDIT_CARD_EXPIRATION_YEAR`.

<br />

**Related XML Attributes:**

- [android:autofillHints](https://developer.android.com/reference/android/view/View#attr_android:autofillHints)

| Parameters ||
|---|---|
| `autofillHints` | `String`: The autofill hints to set. If the array is emtpy, `null` is set. <br /> |

### setAutofillId

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAutofillId (AutofillId id)
```

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

The autofill id is created on demand, and this method should only be called when a view is
reused after `https://developer.android.com/reference/android/view/View#dispatchProvideAutofillStructure(android.view.ViewStructure,%20int)` is called, as
that method creates a snapshot of the view that is passed along to the autofill service.

This method is typically used when view subtrees are recycled to represent different
content\* ---in this case, the autofill id can be saved before the view content is swapped
out, and restored later when it's swapped back in. For example:

```
EditText reusableView = ...;
ViewGroup parentView = ...;
AutofillManager afm = ...;

// Swap out the view and change its contents
AutofillId oldId = reusableView.getAutofillId();
CharSequence oldText = reusableView.getText();
parentView.removeView(reusableView);
AutofillId newId = afm.getNextAutofillId();
reusableView.setText("New I am");
reusableView.setAutofillId(newId);
parentView.addView(reusableView);

// Later, swap the old content back in
parentView.removeView(reusableView);
reusableView.setAutofillId(oldId);
reusableView.setText(oldText);
parentView.addView(reusableView);
```

NOTE: If this view is a descendant of an `https://developer.android.com/reference/android/widget/AdapterView`, the system
may reset its autofill id when this view is recycled. If the autofill ids need to be stable,
they should be set again in
`https://developer.android.com/reference/android/widget/Adapter#getView(int,%20android.view.View,%20android.view.ViewGroup)`.

<br />

| Parameters ||
|---|---|
| `id` | `AutofillId`: an autofill ID that is unique in the `https://developer.android.com/reference/android/app/Activity` hosting the view, or `null` to reset it. Usually it's an id previously allocated to another view (and obtained through `https://developer.android.com/reference/android/view/View#getAutofillId()`), or a new value obtained through `https://developer.android.com/reference/android/view/autofill/AutofillManager#getNextAutofillId()`. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | if the id is an autofill id associated with a virtual view. |
| `https://developer.android.com/reference/java/lang/IllegalStateException` | if the view is already `https://developer.android.com/reference/android/view/View#isAttachedToWindow()`. |

### setBackdropRenderEffect

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void setBackdropRenderEffect (RenderEffect renderEffect)
```

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to the backdrop contents of this
View. This will apply a visual effect to the result of the backdrop contents of this View
before it is drawn. For example if
`https://developer.android.com/reference/android/graphics/RenderEffect#createBlurEffect(float,%20float,%20android.graphics.RenderEffect,%20android.graphics.Shader.TileMode)`
is provided, the previous content behind this View will be blurred before this View is drawn.

<br />

| Parameters ||
|---|---|
| `renderEffect` | `RenderEffect`: to be applied to the View. Passing null clears the previously configured `https://developer.android.com/reference/android/graphics/RenderEffect` <br /> |

### setBackground

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackground (Drawable background)
```

Set the background to a given Drawable, or remove the background. If the
background has padding, this View's padding is set to the background's
padding. However, when a background is removed, this View's padding isn't
touched. If setting the padding is desired, please use
`https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)`.

<br />

| Parameters ||
|---|---|
| `background` | `Drawable`: The Drawable to use as the background, or null to remove the background <br /> |

### setBackgroundColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundColor (int color)
```

Sets the background color for this view.

<br />

| Parameters ||
|---|---|
| `color` | `int`: the color of the background <br /> |

### setBackgroundDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundDrawable (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

<br />

<br />

| Parameters ||
|---|---|
| `background` | `Drawable` <br /> |

### setBackgroundResource

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundResource (int resid)
```

Set the background to a given resource. The resource should refer to
a Drawable object or 0 to remove the background.

<br />

**Related XML Attributes:**

- [android:background](https://developer.android.com/reference/android/view/View#attr_android:background)

| Parameters ||
|---|---|
| `resid` | `int`: The identifier of the resource. <br /> |

### setBackgroundTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundTintBlendMode (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. The default mode is `https://developer.android.com/reference/android/graphics/BlendMode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:backgroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:backgroundTintMode)

| 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/view/View#getBackgroundTintMode()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintBlendMode(android.graphics.BlendMode)`

### setBackgroundTintList

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundTintList (ColorStateList tint)
```

Applies a tint to the background drawable. 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/view/View#setBackground(android.graphics.drawable.Drawable)` will automatically
mutate the drawable 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:backgroundTint](https://developer.android.com/reference/android/view/View#attr_android:backgroundTint)

| Parameters ||
|---|---|
| `tint` | `ColorStateList`: the tint to apply, may be `null` to clear tint <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getBackgroundTintList()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintList(android.content.res.ColorStateList)`

### setBackgroundTintMode

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setBackgroundTintMode (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. The default mode is `https://developer.android.com/reference/android/graphics/PorterDuff.Mode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:backgroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:backgroundTintMode)

| 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/view/View#getBackgroundTintMode()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintMode(android.graphics.PorterDuff.Mode)`

### setBottom

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setBottom (int bottom)
```

Sets the bottom position of this view relative to its parent. This method is meant to be
called by the layout system and should not generally be called otherwise, because the
property may be changed at any time by the layout.

<br />

| Parameters ||
|---|---|
| `bottom` | `int`: The bottom of this view, in pixels. <br /> |

### setCameraDistance

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setCameraDistance (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. The camera's distance
affects 3D transformations, for instance rotations around the X and Y
axis. If the rotationX or rotationY properties are changed and this view is
large (more than half the size of the screen), it is recommended to always
use a camera distance that's greater than the height (X axis rotation) or
the width (Y axis rotation) of this view.

The distance of the camera from the view plane can have an affect on the
perspective distortion of the view when it is rotated around the x or y axis.
For example, a large distance will result in a large viewing angle, and there
will not be much perspective distortion of the view as it rotates. A short
distance may cause much more perspective distortion upon rotation, and can
also result in some drawing artifacts if the rotated view ends up partially
behind the camera (which is why the recommendation is to use a distance at
least as far as the size of the view, if the view is to be rotated.)

The distance is expressed in "depth pixels." The default distance depends
on the screen density. For instance, on a medium density display, the
default distance is 1280. On a high density display, the default distance
is 1920.

If you want to specify a distance that leads to visually consistent
results across various densities, use the following formula:

```
float scale = context.getResources().getDisplayMetrics().density;
view.setCameraDistance(distance * scale);
```

The density scale factor of a high density display is 1.5,
and 1920 = 1280 \* 1.5.

<br />

<br />

| Parameters ||
|---|---|
| `distance` | `float`: The distance in "depth pixels", if negative the opposite value is used <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setRotationX(float)`
- `https://developer.android.com/reference/android/view/View#setRotationY(float)`

### setClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClickable (boolean clickable)
```

Enables or disables click events for this view. When a view
is clickable it will change its state to "pressed" on every click.
Subclasses should set the view clickable to visually react to
user's clicks.

<br />

**Related XML Attributes:**

- [android:clickable](https://developer.android.com/reference/android/view/View#attr_android:clickable)

| Parameters ||
|---|---|
| `clickable` | `boolean`: true to make the view clickable, false otherwise <br /> |

**See also:**

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

### setClipBounds

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClipBounds (Rect clipBounds)
```

Sets a rectangular area on this view to which the view will be clipped
when it is drawn. Setting the value to null will remove the clip bounds
and the view will draw normally, using its full bounds.

<br />

| Parameters ||
|---|---|
| `clipBounds` | `Rect`: The rectangular area, in the local coordinates of this view, to which future drawing operations will be clipped. <br /> |

### setClipToOutline

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClipToOutline (boolean clipToOutline)
```

Sets whether the View's Outline should be used to clip the contents of the View.


Only a single non-rectangular clip can be applied on a View at any time.
Circular clips from a `https://developer.android.com/reference/android/view/ViewAnimationUtils#createCircularReveal(android.view.View,%20int,%20int,%20float,%20float)` animation take priority over Outline clipping, and
child Outline clipping takes priority over Outline clipping done by a
parent.


Note that this flag will only be respected if the View's Outline returns true from
`https://developer.android.com/reference/android/graphics/Outline#canClip()`.

<br />

**Related XML Attributes:**

- [android:clipToOutline](https://developer.android.com/reference/android/view/View#attr_android:clipToOutline)

| Parameters ||
|---|---|
| `clipToOutline` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setOutlineProvider(android.view.ViewOutlineProvider)`
- `https://developer.android.com/reference/android/view/View#getClipToOutline()`

### setContentCaptureSession

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setContentCaptureSession (ContentCaptureSession contentCaptureSession)
```

Sets the (optional) `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` associated with this view.

This method should be called when you need to associate a `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureContext` to
the content capture events associated with this view or its view hierarchy (if it's a
`https://developer.android.com/reference/android/view/ViewGroup`).

For example, if your activity is associated with a web domain, first you would need to
set the context for the main DOM:

```
  ContentCaptureSession mainSession = rootView.getContentCaptureSession();
  mainSession.setContentCaptureContext(ContentCaptureContext.forLocusId(Uri.parse(myUrl));
```

Then if the page had an `IFRAME`, you would create a new session for it:

```
  ContentCaptureSession iframeSession = mainSession.createContentCaptureSession(
      ContentCaptureContext.forLocusId(Uri.parse(iframeUrl)));
  iframeView.setContentCaptureSession(iframeSession);
```

<br />

<br />

| Parameters ||
|---|---|
| `contentCaptureSession` | `ContentCaptureSession`: a session created by `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession#createContentCaptureSession(android.view.contentcapture.ContentCaptureContext)`. This value may be `null`. <br /> |

### setContentDescription

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setContentDescription (CharSequence contentDescription)
```

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


A content description briefly describes the view and is primarily used
for accessibility support to determine how a view should be presented to
the user. In the case of a view with no textual representation, such as
`https://developer.android.com/reference/android/widget/ImageButton`, a useful content description
explains what the view does. For example, an image button with a phone
icon that is used to place a call may use "Call" as its content
description. An image of a floppy disk that is used to save a file may
use "Save".


This should omit role or state. Role refers to the kind of user-interface element the View
is, such as a Button or Checkbox. State refers to a frequently changing property of the View,
such as an On/Off state of a button or the audio level of a volume slider.


Content description updates are not frequent, and are used when the semantic content - not
the state - of the element changes. For example, a Play button might change to a Pause
button during music playback.

<br />

**Related XML Attributes:**

- [android:contentDescription](https://developer.android.com/reference/android/view/View#attr_android:contentDescription)

| Parameters ||
|---|---|
| `contentDescription` | `CharSequence`: The content description. <br /> |

**See also:**

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

### setContentSensitivity

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setContentSensitivity (int mode)
```

Sets content sensitivity mode to determine whether this view displays sensitive content
(e.g. username, password etc.). The system will improve user privacy i.e. hide content
drawn by a sensitive view from screen sharing and recording.

The window hosting a sensitive view will be marked as secure during an active media
projection session. This would be equivalent to applying
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_SECURE` to the window.

<br />

| Parameters ||
|---|---|
| `mode` | `int`: `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO`, `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_NOT_SENSITIVE` or `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_SENSITIVE` Value is one of the following: - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_AUTO` - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_SENSITIVE` - `https://developer.android.com/reference/android/view/View#CONTENT_SENSITIVITY_NOT_SENSITIVE` |

### setContextClickable

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setContextClickable (boolean contextClickable)
```

Enables or disables context clicking for this view. This event can launch the listener.

<br />

**Related XML Attributes:**

- [android:contextClickable](https://developer.android.com/reference/android/view/View#attr_android:contextClickable)

| Parameters ||
|---|---|
| `contextClickable` | `boolean`: true to make the view react to a context click, false otherwise <br /> |

**See also:**

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

### setDefaultFocusHighlightEnabled

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDefaultFocusHighlightEnabled (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.

<br />

**Related XML Attributes:**

- [android:defaultFocusHighlightEnabled](https://developer.android.com/reference/android/view/View#attr_android:defaultFocusHighlightEnabled)

| Parameters ||
|---|---|
| `defaultFocusHighlightEnabled` | `boolean`: `true` to set this view to use a default focus highlight, `false` otherwise. <br /> |

### setDrawingCacheBackgroundColor

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDrawingCacheBackgroundColor (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.

Setting a solid background color for the drawing cache's bitmaps will improve
performance and memory usage. Note, though that this should only be used if this
view will always be drawn on top of a solid color.

<br />

| Parameters ||
|---|---|
| `color` | `int`: The background color to use for the drawing cache's bitmap <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#buildDrawingCache()`
- `https://developer.android.com/reference/android/view/View#getDrawingCache()`

### setDrawingCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDrawingCacheEnabled (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.

<br />

Enables or disables the drawing cache. When the drawing cache is enabled, the next call
to `https://developer.android.com/reference/android/view/View#getDrawingCache()` or `https://developer.android.com/reference/android/view/View#buildDrawingCache()` will draw the view in a
bitmap. Calling `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` will not draw from the cache when
the cache is enabled. To benefit from the cache, you must request the drawing cache by
calling `https://developer.android.com/reference/android/view/View#getDrawingCache()` and draw it on screen if the returned bitmap is not
null.

Enabling the drawing cache is similar to
`https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` when hardware
acceleration is turned off. When hardware acceleration is turned on, enabling the
drawing cache has no effect on rendering because the system uses a different mechanism
for acceleration which ignores the flag. If you want to use a Bitmap for the view, even
when hardware acceleration is enabled, see `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`
for information on how to enable software and hardware layers.

This API can be used to manually generate
a bitmap copy of this view, by setting the flag to `true` and calling
`https://developer.android.com/reference/android/view/View#getDrawingCache()`.

<br />

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable the drawing cache, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()`
- `https://developer.android.com/reference/android/view/View#getDrawingCache()`
- `https://developer.android.com/reference/android/view/View#buildDrawingCache()`
- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`

### setDrawingCacheQuality

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDrawingCacheQuality (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.

Set the drawing cache quality of this view. This value is used only when the
drawing cache is enabled

<br />

**Related XML Attributes:**

- [android:drawingCacheQuality](https://developer.android.com/reference/android/view/View#attr_android:drawingCacheQuality)

| Parameters ||
|---|---|
| `quality` | `int`: One of `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_AUTO`, `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_LOW`, or `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_HIGH` Value is one of the following: - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_LOW` - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_HIGH` - `https://developer.android.com/reference/android/view/View#DRAWING_CACHE_QUALITY_AUTO` |

**See also:**

- `https://developer.android.com/reference/android/view/View#getDrawingCacheQuality()`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()`

### setDuplicateParentStateEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDuplicateParentStateEnabled (boolean enabled)
```

<br />

Enables or disables the duplication of the parent's state into this view. When
duplication is enabled, this view gets its drawable state from its parent rather
than from its own internal properties.

Note: in the current implementation, setting this property to true after the
view was added to a ViewGroup might have no effect at all. This property should
always be used from XML or set to true before adding this view to a ViewGroup.

Note: if this view's parent addStateFromChildren property is enabled and this
property is enabled, an exception will be thrown.

Note: if the child view uses and updates additional states which are unknown to the
parent, these states should not be affected by this method.

<br />

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: True to enable duplication of the parent's drawable state, false to disable it. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getDrawableState()`
- `https://developer.android.com/reference/android/view/View#isDuplicateParentStateEnabled()`

### setElevation

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setElevation (float elevation)
```

Sets the base elevation of this view, in pixels.

<br />

**Related XML Attributes:**

- [android:elevation](https://developer.android.com/reference/android/view/View#attr_android:elevation)

| Parameters ||
|---|---|
| `elevation` | `float` <br /> |

### 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 /> |

### setFadingEdgeLength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFadingEdgeLength (int length)
```

Set the size of the faded edge used to indicate that more content in this
view is available. Will not change whether the fading edge is enabled; use
`https://developer.android.com/reference/android/view/View#setVerticalFadingEdgeEnabled(boolean)` or
`https://developer.android.com/reference/android/view/View#setHorizontalFadingEdgeEnabled(boolean)` to enable the fading edge
for the vertical or horizontal fading edges.

<br />

| Parameters ||
|---|---|
| `length` | `int`: The size in pixels of the faded edge used to indicate that more content in this view is visible. <br /> |

### setFilterTouchesWhenObscured

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFilterTouchesWhenObscured (boolean enabled)
```

Sets whether the framework should discard touches when the view's
window is obscured by another visible window at the touched location.
Refer to the `https://developer.android.com/reference/android/view/View` security documentation for more details.

<br />

**Related XML Attributes:**

- [android:filterTouchesWhenObscured](https://developer.android.com/reference/android/view/View#attr_android:filterTouchesWhenObscured)

| Parameters ||
|---|---|
| `enabled` | `boolean`: True if touch filtering should be enabled. <br /> |

**See also:**

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

### setFitsSystemWindows

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFitsSystemWindows (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. See that method for more details.

Note that if you are providing your own implementation of
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`, then there is no need to set this
flag to true -- your implementation will be overriding the default
implementation that checks this flag.

<br />

**Related XML Attributes:**

- [android:fitsSystemWindows](https://developer.android.com/reference/android/view/View#attr_android:fitsSystemWindows)

| Parameters ||
|---|---|
| `fitSystemWindows` | `boolean`: If true, then the default implementation of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` will be executed. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getFitsSystemWindows()`
- `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`
- `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`

### setFocusable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusable (boolean focusable)
```

Set whether this view can receive the focus.


Setting this to false will also ensure that this view is not focusable
in touch mode.

<br />

**Related XML Attributes:**

- [android:focusable](https://developer.android.com/reference/android/view/View#attr_android:focusable)

| Parameters ||
|---|---|
| `focusable` | `boolean`: If true, this view can receive the focus. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setFocusableInTouchMode(boolean)`
- `https://developer.android.com/reference/android/view/View#setFocusable(int)`

### setFocusable

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusable (int focusable)
```

Sets whether this view can receive focus.


Setting this to `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO` tells the framework to determine focusability
automatically based on the view's interactivity. This is the default.


Setting this to NOT_FOCUSABLE will ensure that this view is also not focusable
in touch mode.

<br />

**Related XML Attributes:**

- [android:focusable](https://developer.android.com/reference/android/view/View#attr_android:focusable)

| Parameters ||
|---|---|
| `focusable` | `int`: One of `https://developer.android.com/reference/android/view/View#NOT_FOCUSABLE`, `https://developer.android.com/reference/android/view/View#FOCUSABLE`, or `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#NOT_FOCUSABLE` - `https://developer.android.com/reference/android/view/View#FOCUSABLE` - `https://developer.android.com/reference/android/view/View#FOCUSABLE_AUTO` |

**See also:**

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

### setFocusableInTouchMode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusableInTouchMode (boolean focusableInTouchMode)
```

Set whether this view can receive focus while in touch mode.

Setting this to true will also ensure that this view is focusable.

<br />

**Related XML Attributes:**

- [android:focusableInTouchMode](https://developer.android.com/reference/android/view/View#attr_android:focusableInTouchMode)

| Parameters ||
|---|---|
| `focusableInTouchMode` | `boolean`: If true, this view can receive the focus while in touch mode. <br /> |

**See also:**

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

### setFocusedByDefault

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFocusedByDefault (boolean isFocusedByDefault)
```

Sets whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


Focus gets restored for a view hierarchy when the root of the hierarchy gets added to a
window or serves as a target of cluster navigation.

<br />

**Related XML Attributes:**

- [android:focusedByDefault](https://developer.android.com/reference/android/view/View#attr_android:focusedByDefault)

| Parameters ||
|---|---|
| `isFocusedByDefault` | `boolean`: `true` to set this view as the default-focus view, `false` otherwise. <br /> |

**See also:**

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

### setForceDarkAllowed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForceDarkAllowed (boolean allow)
```

Sets whether or not to allow force dark to apply to this view.

Setting this to false will disable the auto-dark feature on everything this view
draws, including any descendants.

Setting this to true will allow this view to be automatically made dark, however
a value of 'true' will not override any 'false' value in its parent chain nor will
it prevent any 'false' in any of its children.

The default behavior of force dark is also influenced by the Theme's
`https://developer.android.com/reference/android/R.styleable#Theme_isLightTheme` attribute.
If a theme is isLightTheme="false", then force dark is globally disabled for that theme.

<br />

| Parameters ||
|---|---|
| `allow` | `boolean`: Whether or not to allow force dark. <br /> |

### setForeground

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForeground (Drawable foreground)
```

Supply a Drawable that is to be rendered on top of all of the content in the view.

<br />

**Related XML Attributes:**

- [android:foreground](https://developer.android.com/reference/android/view/View#attr_android:foreground)

| Parameters ||
|---|---|
| `foreground` | `Drawable`: the Drawable to be drawn on top of the children <br /> |

### setForegroundGravity

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForegroundGravity (int gravity)
```

Describes how the foreground is positioned. Defaults to START and TOP.

<br />

**Related XML Attributes:**

- [android:foregroundGravity](https://developer.android.com/reference/android/view/View#attr_android:foregroundGravity)

| Parameters ||
|---|---|
| `gravity` | `int`: see `https://developer.android.com/reference/android/view/Gravity` <br /> |

**See also:**

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

### setForegroundTintBlendMode

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForegroundTintBlendMode (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. The default mode is `https://developer.android.com/reference/android/graphics/BlendMode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:foregroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:foregroundTintMode)

| 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/view/View#getForegroundTintMode()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintBlendMode(android.graphics.BlendMode)`

### setForegroundTintList

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForegroundTintList (ColorStateList tint)
```

Applies a tint to the foreground drawable. Does not modify the current tint
mode, which is `https://developer.android.com/reference/android/graphics/PorterDuff.Mode#SRC_IN` by default.


Subsequent calls to `https://developer.android.com/reference/android/view/View#setForeground(android.graphics.drawable.Drawable)` will automatically
mutate the drawable 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:foregroundTint](https://developer.android.com/reference/android/view/View#attr_android:foregroundTint)

| Parameters ||
|---|---|
| `tint` | `ColorStateList`: the tint to apply, may be `null` to clear tint <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getForegroundTintList()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintList(android.content.res.ColorStateList)`

### setForegroundTintMode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setForegroundTintMode (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. The default mode is `https://developer.android.com/reference/android/graphics/PorterDuff.Mode#SRC_IN`.

<br />

**Related XML Attributes:**

- [android:foregroundTintMode](https://developer.android.com/reference/android/view/View#attr_android:foregroundTintMode)

| 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/view/View#getForegroundTintMode()`
- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setTintMode(android.graphics.PorterDuff.Mode)`

### setFrameContentVelocity

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setFrameContentVelocity (float pixelsPerSecond)
```

Set the current velocity of the View, we only track positive value.
We will use the velocity information to adjust the frame rate when applicable.
For example, we could potentially lower the frame rate when
the velocity of a fling gesture becomes slower.
Note that this is only valid till the next drawn frame.

<br />

| Parameters ||
|---|---|
| `pixelsPerSecond` | `float`: how many pixels move per second. <br /> |

### setHandwritingBoundsOffsets

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHandwritingBoundsOffsets (float offsetLeft, 
                float offsetTop, 
                float offsetRight, 
                float offsetBottom)
```

Set the amount of offset applied to this view's stylus handwriting bounds. A positive offset
will offset the edge outwards.The base handwriting bounds of a view is its visible bounds.
The handwriting bounds offsets are applied to the base handwriting bounds to determine the
final handwriting bounds.

This method is mainly used to enlarge the view's handwriting bounds for a better user
experience.

Note that when the view is clipped (e.g. the view is in a
`https://developer.android.com/reference/android/widget/ScrollView`), the offsets are applied after the view's handwriting
bounds is clipped.

<br />

| Parameters ||
|---|---|
| `offsetLeft` | `float`: the amount of pixel offset applied to the left edge outwards of the view's handwriting bounds. <br /> |
| `offsetTop` | `float`: the amount of pixel offset applied to the top edge outwards of the view's handwriting bounds. <br /> |
| `offsetRight` | `float`: the amount of pixel offset applied to the right edge outwards of the view's handwriting bounds. <br /> |
| `offsetBottom` | `float`: the amount of pixel offset applied to the bottom edge outwards of the view's handwriting bounds. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetLeft()`
- `https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetTop()`
- `https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetRight()`
- `https://developer.android.com/reference/android/view/View#getHandwritingBoundsOffsetBottom()`

### setHandwritingDelegateFlags

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHandwritingDelegateFlags (int flags)
```

Sets flags configuring the handwriting delegation behavior for this delegate editor view.

This method has no effect unless `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)` is also called to
configure this view to act as a handwriting delegate.

<br />

| Parameters ||
|---|---|
| `flags` | `int`: `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HANDWRITING_DELEGATE_FLAG_HOME_DELEGATOR_ALLOWED` or `0` Value is either `0` or - `https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#HANDWRITING_DELEGATE_FLAG_HOME_DELEGATOR_ALLOWED` |

### setHandwritingDelegatorCallback

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHandwritingDelegatorCallback (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. The callback will be called from the UI thread.

Setting a callback allows this view to act as a handwriting delegator, so that handwriting
mode for a delegate editor view can be initiated by stylus movement on this delegator view.
The callback implementation is expected to show and focus the delegate editor view. If a view
which returns `true` for `https://developer.android.com/reference/android/view/View#isHandwritingDelegate()` creates an input connection
while the same stylus `https://developer.android.com/reference/android/view/MotionEvent` sequence is ongoing, handwriting mode will be
initiated for that view.

A common use case is a custom view which looks like a text editor but does not actually
support text editing itself, and clicking on the custom view causes an EditText to be shown.
To support handwriting initiation in this case, this method can be called on the custom view
to configure it as a delegator. The EditText should call `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)` to
set it as a delegate. The `callback` implementation is typically the same as the click
listener implementation which shows the EditText.

If `null` is passed, this view will no longer act as a handwriting initiation
delegator.

<br />

| Parameters ||
|---|---|
| `callback` | `Runnable`: a callback which should be called when a stylus `https://developer.android.com/reference/android/view/MotionEvent` occurs within this view's bounds. This value may be `null`. <br /> |

### setHapticFeedbackEnabled

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHapticFeedbackEnabled (boolean hapticFeedbackEnabled)
```

Set whether this view should have haptic feedback for events such as
long presses.

You may wish to disable haptic feedback if your view already controls
its own haptic feedback.

<br />

**Related XML Attributes:**

- [android:hapticFeedbackEnabled](https://developer.android.com/reference/android/view/View#attr_android:hapticFeedbackEnabled)

| Parameters ||
|---|---|
| `hapticFeedbackEnabled` | `boolean`: whether haptic feedback enabled for this view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isHapticFeedbackEnabled()`
- `https://developer.android.com/reference/android/view/View#performHapticFeedback(int)`

### setHasTransientState

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHasTransientState (boolean hasTransientState)
```

Set whether this view is currently tracking transient state that the
framework should attempt to preserve when possible. This flag is reference counted,
so every call to setHasTransientState(true) should be paired with a later call
to setHasTransientState(false).

A view with transient state cannot be trivially rebound from an external
data source, such as an adapter binding item views in a list. This may be
because the view is performing an animation, tracking user selection
of content, or similar.

<br />

<br />

| Parameters ||
|---|---|
| `hasTransientState` | `boolean`: true if this view has transient state <br /> |

### setHorizontalFadingEdgeEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHorizontalFadingEdgeEnabled (boolean horizontalFadingEdgeEnabled)
```

<br />

Define whether the horizontal edges should be faded when this view
is scrolled horizontally.

<br />

<br />

**Related XML Attributes:**

- [android:requiresFadingEdge](https://developer.android.com/reference/android/view/View#attr_android:requiresFadingEdge)

| Parameters ||
|---|---|
| `horizontalFadingEdgeEnabled` | `boolean`: true if the horizontal edges should be faded when the view is scrolled horizontally <br /> |

**See also:**

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

### setHorizontalScrollBarEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHorizontalScrollBarEnabled (boolean horizontalScrollBarEnabled)
```

<br />

Define whether the horizontal scrollbar should be drawn or not. The
scrollbar is not drawn by default.

<br />

<br />

| Parameters ||
|---|---|
| `horizontalScrollBarEnabled` | `boolean`: true if the horizontal scrollbar should be painted <br /> |

**See also:**

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

### setHorizontalScrollbarThumbDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHorizontalScrollbarThumbDrawable (Drawable drawable)
```

Defines the horizontal thumb drawable

<br />

**Related XML Attributes:**

- [android:scrollbarThumbHorizontal](https://developer.android.com/reference/android/view/View#attr_android:scrollbarThumbHorizontal)

| Parameters ||
|---|---|
| `drawable` | `Drawable`: This value may be `null`. <br /> |

**See also:**

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

### setHorizontalScrollbarTrackDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHorizontalScrollbarTrackDrawable (Drawable drawable)
```

Defines the horizontal track drawable

<br />

**Related XML Attributes:**

- [android:scrollbarTrackHorizontal](https://developer.android.com/reference/android/view/View#attr_android:scrollbarTrackHorizontal)

| Parameters ||
|---|---|
| `drawable` | `Drawable`: This value may be `null`. <br /> |

**See also:**

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

### setHovered

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setHovered (boolean hovered)
```

Sets whether the view is currently hovered.


Calling this method also changes the drawable state of the view. This
enables the view to react to hover by using different drawable resources
to change its appearance.


The `https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)` method is called when the hovered state changes.

<br />

<br />

| Parameters ||
|---|---|
| `hovered` | `boolean`: True if the view is hovered. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isHovered()`
- `https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)`

### setId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setId (int id)
```

Sets the identifier for this view. The identifier does not have to be
unique in this view's hierarchy. The identifier should be a positive
number.

<br />

**Related XML Attributes:**

- [android:id](https://developer.android.com/reference/android/view/View#attr_android:id)

| Parameters ||
|---|---|
| `id` | `int`: a number used to identify the view <br /> |

**See also:**

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

### setImportantForAccessibility

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImportantForAccessibility (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.

<br />

**Related XML Attributes:**

- [android:importantForAccessibility](https://developer.android.com/reference/android/view/View#attr_android:importantForAccessibility)

| Parameters ||
|---|---|
| `mode` | `int`: How to determine whether this view is important for accessibility. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_YES`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS`
- `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_ACCESSIBILITY_AUTO`

### setImportantForAutofill

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImportantForAutofill (int mode)
```

Sets the mode for determining whether this view is considered important for autofill.

The platform determines the importance for autofill automatically but you
can use this method to customize the behavior. For example:

1. When the view contents is irrelevant for autofill (for example, a text field used in a "Captcha" challenge), it should be `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO`.
2. When both the view and its children are irrelevant for autofill (for example, the root view of an activity containing a spreadhseet editor), it should be `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS`.
3. When the view content is relevant for autofill but its children aren't (for example, a credit card expiration date represented by a custom view that overrides the proper autofill methods and has 2 children representing the month and year), it should be `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`.

**Note:** Setting the mode as `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO` or
`https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS` does not guarantee the view (and its
children) will not be used for autofill purpose; for example, when the user explicitly
makes an autofill request, all views are included in the ViewStructure, and starting in
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#UPSIDE_DOWN_CAKE` the system uses other factors along
with importance to determine the autofill behavior. See `https://developer.android.com/reference/android/view/View#isImportantForAutofill()`
for more details about how the View's importance for autofill is used.

<br />

**Related XML Attributes:**

- [android:importantForAutofill](https://developer.android.com/reference/android/view/View#attr_android:importantForAutofill)

| Parameters ||
|---|---|
| `mode` | `int`: `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS`, or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_AUTO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_YES_EXCLUDE_DESCENDANTS` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS` |

### setImportantForContentCapture

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setImportantForContentCapture (int mode)
```

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

The platform determines the importance for autofill automatically but you
can use this method to customize the behavior. Typically, a view that provides text should
be marked as `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES`.

<br />

**Related XML Attributes:**

- [android:importantForContentCapture](https://developer.android.com/reference/android/view/View#attr_android:importantForContentCapture)

| Parameters ||
|---|---|
| `mode` | `int`: `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO`, `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS`, or `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_YES_EXCLUDE_DESCENDANTS` - `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_NO_EXCLUDE_DESCENDANTS` |

### setIsCredential

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIsCredential (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.

Sets whether this view is a credential for Credential Manager purposes.

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

<br />

**Related XML Attributes:**

- [android:isCredential](https://developer.android.com/reference/android/view/View#attr_android:isCredential)

| Parameters ||
|---|---|
| `isCredential` | `boolean`: Whether the view is a credential. <br /> |

### setIsHandwritingDelegate

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setIsHandwritingDelegate (boolean isHandwritingDelegate)
```

Sets this view to be a handwriting delegate. If a delegate view creates an input connection
while a stylus `https://developer.android.com/reference/android/view/MotionEvent` sequence from a delegator view is ongoing, handwriting
mode will be initiated for the delegate view.

<br />

| Parameters ||
|---|---|
| `isHandwritingDelegate` | `boolean`: whether this view is a handwriting initiation delegate <br /> |

**See also:**

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

### setKeepScreenOn

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setKeepScreenOn (boolean keepScreenOn)
```

Controls whether the screen should remain on, modifying the
value of `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`.

<br />

**Related XML Attributes:**

- [android:keepScreenOn](https://developer.android.com/reference/android/view/View#attr_android:keepScreenOn)

| Parameters ||
|---|---|
| `keepScreenOn` | `boolean`: Supply true to set `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`. <br /> |

**See also:**

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

### setKeyboardNavigationCluster

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setKeyboardNavigationCluster (boolean isCluster)
```

Set whether this view is a root of a keyboard navigation cluster.

<br />

**Related XML Attributes:**

- [android:keyboardNavigationCluster](https://developer.android.com/reference/android/view/View#attr_android:keyboardNavigationCluster)

| Parameters ||
|---|---|
| `isCluster` | `boolean`: If true, this view is a root of a cluster. <br /> |

### setLabelFor

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLabelFor (int id)
```

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

<br />

| Parameters ||
|---|---|
| `id` | `int`: The labeled view id. <br /> |

### setLayerPaint

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayerPaint (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`). Changed properties of the Paint
provided to `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` will be used the next time
the View is redrawn, but `https://developer.android.com/reference/android/view/View#setLayerPaint(android.graphics.Paint)` must be called to
ensure that the view gets redrawn immediately.

A layer is associated with an optional `https://developer.android.com/reference/android/graphics/Paint`
instance that controls how the layer is composed on screen. The following
properties of the paint are taken into account when composing the layer:

- `https://developer.android.com/reference/android/graphics/Paint#getAlpha()`
- `https://developer.android.com/reference/android/graphics/Paint#getXfermode()`
- `https://developer.android.com/reference/android/graphics/Paint#getColorFilter()`

If this view has an alpha value set to \< 1.0 by calling `https://developer.android.com/reference/android/view/View#setAlpha(float)`, the
alpha value of the layer's paint is superseded by this view's alpha value.

<br />

<br />

| Parameters ||
|---|---|
| `paint` | `Paint`: The paint used to compose the layer. This argument is optional and can be null. It is ignored when the layer type is `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`

### setLayerType

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayerType (int layerType, 
                Paint paint)
```

<br />

Specifies the type of layer backing this view. The layer can be
`https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`, `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` or
`https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`.

A layer is associated with an optional `https://developer.android.com/reference/android/graphics/Paint`
instance that controls how the layer is composed on screen. The following
properties of the paint are taken into account when composing the layer:

- `https://developer.android.com/reference/android/graphics/Paint#getAlpha()`
- `https://developer.android.com/reference/android/graphics/Paint#getXfermode()`
- `https://developer.android.com/reference/android/graphics/Paint#getColorFilter()`

If this view has an alpha value set to \< 1.0 by calling
`https://developer.android.com/reference/android/view/View#setAlpha(float)`, the alpha value of the layer's paint is superseded
by this view's alpha value.

Refer to the documentation of `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`,
`https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` and `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`
for more information on when and how to use layers.

<br />

<br />

**Related XML Attributes:**

- [android:layerType](https://developer.android.com/reference/android/view/View#attr_android:layerType)

| Parameters ||
|---|---|
| `layerType` | `int`: The type of layer to use with this view, must be one of `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`, `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` or `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE` Value is one of the following: - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE` - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE` - `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE` |
| `paint` | `Paint`: The paint used to compose the layer. This argument is optional and can be null. It is ignored when the layer type is `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getLayerType()`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_SOFTWARE`
- `https://developer.android.com/reference/android/view/View#LAYER_TYPE_HARDWARE`
- `https://developer.android.com/reference/android/view/View#setAlpha(float)`

### setLayoutDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutDirection (int layoutDirection)
```

Set the layout direction for this view. This will propagate a reset of layout direction
resolution to the view's children and resolve layout direction for this view.

<br />

**Related XML Attributes:**

- [android:layoutDirection](https://developer.android.com/reference/android/view/View#attr_android:layoutDirection)

| Parameters ||
|---|---|
| `layoutDirection` | `int`: the layout direction to set. Should be one of: `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`, `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_RTL`, `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_INHERIT`, `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LOCALE`. Resolution will be done if the value is set to LAYOUT_DIRECTION_INHERIT. The resolution proceeds up the parent chain of the view to get the value. If there is no parent, then it will return the default `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LTR`. 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` - `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_INHERIT` - `https://developer.android.com/reference/android/view/View#LAYOUT_DIRECTION_LOCALE` |

### setLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutParams (ViewGroup.LayoutParams params)
```

Set the layout parameters associated with this view. These supply
parameters to the *parent* of this view specifying how it should be
arranged. There are many subclasses of ViewGroup.LayoutParams, and these
correspond to the different subclasses of ViewGroup that are responsible
for arranging their children.

<br />

| Parameters ||
|---|---|
| `params` | `ViewGroup.LayoutParams`: The layout parameters for this view, cannot be null <br /> |

### setLeft

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setLeft (int left)
```

Sets the left position of this view relative to its parent. This method is meant to be called
by the layout system and should not generally be called otherwise, because the property
may be changed at any time by the layout.

<br />

| Parameters ||
|---|---|
| `left` | `int`: The left of this view, in pixels. <br /> |

### setLeftTopRightBottom

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setLeftTopRightBottom (int left, 
                int top, 
                int right, 
                int bottom)
```

Assign a size and position to this view.

This method is meant to be used in animations only as it applies this position and size
for the view only temporary and it can be changed back at any time by the layout.

<br />

| Parameters ||
|---|---|
| `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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setLeft(int)`
- `https://developer.android.com/reference/android/view/View#setRight(int)`
- `https://developer.android.com/reference/android/view/View#setTop(int)`
- `https://developer.android.com/reference/android/view/View#setBottom(int)`

### setLongClickable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLongClickable (boolean longClickable)
```

Enables or disables long click events for this view. When a view is long
clickable it reacts to the user holding down the button for a longer
duration than a tap. This event can either launch the listener or a
context menu.

<br />

**Related XML Attributes:**

- [android:longClickable](https://developer.android.com/reference/android/view/View#attr_android:longClickable)

| Parameters ||
|---|---|
| `longClickable` | `boolean`: true to make the view long clickable, false otherwise <br /> |

**See also:**

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

### setMinimumHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinimumHeight (int minHeight)
```

Sets the minimum height of the view. It is not guaranteed the view will
be able to achieve this minimum height (for example, if its parent layout
constrains it with less available height).

<br />

**Related XML Attributes:**

- [android:minHeight](https://developer.android.com/reference/android/view/View#attr_android:minHeight)

| Parameters ||
|---|---|
| `minHeight` | `int`: The minimum height the view will try to be, in pixels <br /> |

**See also:**

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

### setMinimumWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMinimumWidth (int minWidth)
```

Sets the minimum width of the view. It is not guaranteed the view will
be able to achieve this minimum width (for example, if its parent layout
constrains it with less available width).

<br />

**Related XML Attributes:**

- [android:minWidth](https://developer.android.com/reference/android/view/View#attr_android:minWidth)

| Parameters ||
|---|---|
| `minWidth` | `int`: The minimum width the view will try to be, in pixels <br /> |

**See also:**

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

### setNestedScrollingEnabled

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNestedScrollingEnabled (boolean enabled)
```

Enable or disable nested scrolling for this view.

If this property is set to true the view will be permitted to initiate nested
scrolling operations with a compatible parent view in the current hierarchy. If this
view does not implement nested scrolling this will have no effect. Disabling nested scrolling
while a nested scroll is in progress has the effect of `https://developer.android.com/reference/android/view/View#stopNestedScroll()`
the nested scroll.

<br />

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable nested scrolling, false to disable <br /> |

**See also:**

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

### setNextClusterForwardId

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextClusterForwardId (int nextClusterForwardId)
```

Sets the id of the view to use as the root of the next keyboard navigation cluster.

<br />

**Related XML Attributes:**

- [android:nextClusterForward](https://developer.android.com/reference/android/view/View#attr_android:nextClusterForward)

| Parameters ||
|---|---|
| `nextClusterForwardId` | `int`: The next cluster ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setNextFocusDownId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextFocusDownId (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`.

<br />

**Related XML Attributes:**

- [android:nextFocusDown](https://developer.android.com/reference/android/view/View#attr_android:nextFocusDown)

| Parameters ||
|---|---|
| `nextFocusDownId` | `int`: The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setNextFocusForwardId

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextFocusForwardId (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`.

<br />

**Related XML Attributes:**

- [android:nextFocusForward](https://developer.android.com/reference/android/view/View#attr_android:nextFocusForward)

| Parameters ||
|---|---|
| `nextFocusForwardId` | `int`: The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setNextFocusLeftId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextFocusLeftId (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`.

<br />

**Related XML Attributes:**

- [android:nextFocusLeft](https://developer.android.com/reference/android/view/View#attr_android:nextFocusLeft)

| Parameters ||
|---|---|
| `nextFocusLeftId` | `int`: The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setNextFocusRightId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextFocusRightId (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`.

<br />

**Related XML Attributes:**

- [android:nextFocusRight](https://developer.android.com/reference/android/view/View#attr_android:nextFocusRight)

| Parameters ||
|---|---|
| `nextFocusRightId` | `int`: The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setNextFocusUpId

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setNextFocusUpId (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`.

<br />

**Related XML Attributes:**

- [android:nextFocusUp](https://developer.android.com/reference/android/view/View#attr_android:nextFocusUp)

| Parameters ||
|---|---|
| `nextFocusUpId` | `int`: The next focus ID, or `https://developer.android.com/reference/android/view/View#NO_ID` if the framework should decide automatically. <br /> |

### setOnApplyWindowInsetsListener

Added in [API level 20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnApplyWindowInsetsListener (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. The listener's
`https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener#onApplyWindowInsets(android.view.View,%20android.view.WindowInsets)`
method will be called instead of the view's
`https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` method.

<br />

| Parameters ||
|---|---|
| `listener` | `View.OnApplyWindowInsetsListener`: Listener to set <br /> |

**See also:**

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

### setOnCapturedPointerListener

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnCapturedPointerListener (View.OnCapturedPointerListener l)
```

Set a listener to receive callbacks when the pointer capture state of a view changes.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnCapturedPointerListener`: The `https://developer.android.com/reference/android/view/View.OnCapturedPointerListener` to receive callbacks. <br /> |

### setOnClickListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnClickListener (View.OnClickListener l)
```

Register a callback to be invoked when this view is clicked. If this view is not
clickable, it becomes clickable.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnClickListener`: The callback that will run. This value may be `null`. <br /> |

**See also:**

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

### setOnContextClickListener

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnContextClickListener (View.OnContextClickListener l)
```

Register a callback to be invoked when this view is context clicked. If the view is not
context clickable, it becomes context clickable.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnContextClickListener`: The callback that will run. This value may be `null`. <br /> |

**See also:**

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

### setOnCreateContextMenuListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnCreateContextMenuListener (View.OnCreateContextMenuListener l)
```

Register a callback to be invoked when the context menu for this view is
being built. If this view is not long clickable, it becomes long clickable.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnCreateContextMenuListener`: The callback that will run <br /> |

### setOnDragListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnDragListener (View.OnDragListener l)
```

Register a drag event listener callback object for this View. The parameter is
an implementation of `https://developer.android.com/reference/android/view/View.OnDragListener`. To send a drag event to a
View, the system calls the
`https://developer.android.com/reference/android/view/View.OnDragListener#onDrag(android.view.View,%20android.view.DragEvent)` method.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnDragListener`: An implementation of `https://developer.android.com/reference/android/view/View.OnDragListener`. <br /> |

### setOnFocusChangeListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnFocusChangeListener (View.OnFocusChangeListener l)
```

Register a callback to be invoked when focus of this view changed.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnFocusChangeListener`: The callback that will run. <br /> |

### setOnGenericMotionListener

Added in [API level 12](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnGenericMotionListener (View.OnGenericMotionListener l)
```

Register a callback to be invoked when a generic motion event is sent to this view.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnGenericMotionListener`: the generic motion listener to attach to this view <br /> |

### setOnHoverListener

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnHoverListener (View.OnHoverListener l)
```

Register a callback to be invoked when a hover event is sent to this view.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnHoverListener`: the hover listener to attach to this view <br /> |

### setOnKeyListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnKeyListener (View.OnKeyListener l)
```

Register a callback to be invoked when a hardware key is pressed in this view.
Key presses in software input methods will generally not trigger the methods of
this listener.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnKeyListener`: the key listener to attach to this view <br /> |

### setOnLongClickListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnLongClickListener (View.OnLongClickListener l)
```

Register a callback to be invoked when this view is clicked and held. If this view is not
long clickable, it becomes long clickable.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnLongClickListener`: The callback that will run. This value may be `null`. <br /> |

**See also:**

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

### setOnReceiveContentListener

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnReceiveContentListener (String[] mimeTypes, 
                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.

Depending on the type of view, this listener may be invoked for different scenarios. For
example, for an editable `https://developer.android.com/reference/android/widget/TextView`, this listener will be invoked for
the following scenarios:

1. Paste from the clipboard (e.g. "Paste" or "Paste as plain text" action in the insertion/selection menu)
2. Content insertion from the keyboard (from `https://developer.android.com/reference/android/view/inputmethod/InputConnection#commitContent(android.view.inputmethod.InputContentInfo,%20int,%20android.os.Bundle)`)
3. Drag and drop (drop events from `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)`)
4. Autofill
5. Selection replacement via `https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT`

When setting a listener, clients must also declare the accepted MIME types.
The listener will still be invoked even if the MIME type of the content is not one of the
declared MIME types (e.g. if the user pastes content whose type is not one of the declared
MIME types).
In that case, the listener may reject the content (defer to the default platform behavior)
or execute some other fallback logic (e.g. show an appropriate message to the user).
The declared MIME types serve as a hint to allow different features to optionally alter
their behavior. For example, a soft keyboard may optionally choose to hide its UI for
inserting GIFs for a particular input field if the MIME types set here for that field
don't include "image/gif" or "image/\*".

Note: MIME type matching in the Android framework is case-sensitive, unlike formal RFC
MIME types. As a result, you should always write your MIME types with lowercase letters,
or use `https://developer.android.com/reference/android/content/Intent#normalizeMimeType(java.lang.String)` to ensure that it is converted to
lowercase.

<br />

| Parameters ||
|---|---|
| `mimeTypes` | `String`: The MIME types accepted by the given listener. These may use patterns such as "image/\*", but may not start with a wildcard. This argument must not be null or empty if a non-null listener is passed in. <br /> |
| `listener` | `OnReceiveContentListener`: The listener to use. This can be null to reset to the default behavior. <br /> |

### setOnScrollChangeListener

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnScrollChangeListener (View.OnScrollChangeListener l)
```

Register a callback to be invoked when the scroll X or Y positions of
this view change.


**Note:** Some views handle scrolling independently from View and may
have their own separate listeners for scroll-type events. For example,
`https://developer.android.com/reference/android/widget/ListView` allows clients to register an
`https://developer.android.com/reference/android/widget/AbsListView#setOnScrollListener(android.widget.AbsListView.OnScrollListener)`
to listen for changes in list scroll position.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnScrollChangeListener`: The listener to notify when the scroll X or Y position changes. <br /> |

**See also:**

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

### setOnSystemUiVisibilityChangeListener

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnSystemUiVisibilityChangeListener (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.

Set a listener to receive callbacks when the visibility of the system bar changes.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnSystemUiVisibilityChangeListener`: The `https://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener` to receive callbacks. <br /> |

### setOnTouchListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnTouchListener (View.OnTouchListener l)
```

Register a callback to be invoked when a touch event is sent to this view.

<br />

| Parameters ||
|---|---|
| `l` | `View.OnTouchListener`: the touch listener to attach to this view <br /> |

### setOutlineAmbientShadowColor

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOutlineAmbientShadowColor (int color)
```

Sets the color of the ambient shadow that is drawn when the view has a positive Z or
elevation value.


By default the shadow color is black. Generally, this color will be opaque so the intensity
of the shadow is consistent between different views with different colors.


The opacity of the final ambient shadow is a function of the shadow caster height, the
alpha channel of the outlineAmbientShadowColor (typically opaque), and the
`https://developer.android.com/reference/android/R.attr#ambientShadowAlpha` theme attribute.

<br />

**Related XML Attributes:**

- [android:outlineAmbientShadowColor](https://developer.android.com/reference/android/view/View#attr_android:outlineAmbientShadowColor)

| Parameters ||
|---|---|
| `color` | `int`: The color this View will cast for its elevation shadow. <br /> |

### setOutlineProvider

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOutlineProvider (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.


The default ViewOutlineProvider, `https://developer.android.com/reference/android/view/ViewOutlineProvider#BACKGROUND`, queries the Outline
from the View's background drawable, via `https://developer.android.com/reference/android/graphics/drawable/Drawable#getOutline(android.graphics.Outline)`. Changing the
outline provider with this method allows this behavior to be overridden.


If the ViewOutlineProvider is null, if querying it for an outline returns false,
or if the produced Outline is `https://developer.android.com/reference/android/graphics/Outline#isEmpty()`, shadows will not be cast.


Only outlines that return true from `https://developer.android.com/reference/android/graphics/Outline#canClip()` may be used for clipping.

<br />

| Parameters ||
|---|---|
| `provider` | `ViewOutlineProvider` <br /> |

**See also:**

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

### setOutlineSpotShadowColor

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOutlineSpotShadowColor (int color)
```

Sets the color of the spot shadow that is drawn when the view has a positive Z or
elevation value.


By default the shadow color is black. Generally, this color will be opaque so the intensity
of the shadow is consistent between different views with different colors.


The opacity of the final spot shadow is a function of the shadow caster height, the
alpha channel of the outlineSpotShadowColor (typically opaque), and the
`https://developer.android.com/reference/android/R.attr#spotShadowAlpha` theme attribute.

<br />

**Related XML Attributes:**

- [android:outlineSpotShadowColor](https://developer.android.com/reference/android/view/View#attr_android:outlineSpotShadowColor)

| Parameters ||
|---|---|
| `color` | `int`: The color this View will cast for its elevation spot shadow. <br /> |

### setOverScrollMode

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOverScrollMode (int overScrollMode)
```

Set the over-scroll mode for this view. Valid over-scroll modes are
`https://developer.android.com/reference/android/view/View#OVER_SCROLL_ALWAYS`, `https://developer.android.com/reference/android/view/View#OVER_SCROLL_IF_CONTENT_SCROLLS`
(allow over-scrolling only if the view content is larger than the container),
or `https://developer.android.com/reference/android/view/View#OVER_SCROLL_NEVER`.

Setting the over-scroll mode of a view will have an effect only if the
view is capable of scrolling.

<br />

| Parameters ||
|---|---|
| `overScrollMode` | `int`: The new over-scroll mode for this view. <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 />

**Related XML Attributes:**

- [android:padding](https://developer.android.com/reference/android/view/View#attr_android:padding)
- [android:paddingBottom](https://developer.android.com/reference/android/view/View#attr_android:paddingBottom)
- [android:paddingLeft](https://developer.android.com/reference/android/view/View#attr_android:paddingLeft)
- [android:paddingRight](https://developer.android.com/reference/android/view/View#attr_android:paddingRight)
- [android:paddingTop](https://developer.android.com/reference/android/view/View#attr_android:paddingTop)

| 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 /> |

### setPaddingRelative

Added in [API level 17](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 />

**Related XML Attributes:**

- [android:padding](https://developer.android.com/reference/android/view/View#attr_android:padding)
- [android:paddingBottom](https://developer.android.com/reference/android/view/View#attr_android:paddingBottom)
- [android:paddingStart](https://developer.android.com/reference/android/view/View#attr_android:paddingStart)
- [android:paddingEnd](https://developer.android.com/reference/android/view/View#attr_android:paddingEnd)
- [android:paddingTop](https://developer.android.com/reference/android/view/View#attr_android:paddingTop)

| 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 /> |

### setPendingCredentialRequest

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPendingCredentialRequest (GetCredentialRequest request, 
                OutcomeReceiver<GetCredentialResponse, GetCredentialException> callback)
```

Sets a `https://developer.android.com/reference/android/credentials/CredentialManager` request to retrieve credentials, when the user focuses
on this given view.

When this view is focused, the given `request` will be fired to
`https://developer.android.com/reference/android/credentials/CredentialManager`, which will fetch content from all
`https://developer.android.com/reference/android/service/credentials/CredentialProviderService` services on the
device, and then display credential options to the user on a relevant UI
(dropdown, keyboard suggestions etc.).

When the user selects a credential, the final `https://developer.android.com/reference/android/credentials/GetCredentialResponse` will be
propagated to the given `callback`. Developers are expected to handle the response
programmatically and perform a relevant action, e.g. signing in the user.

For details on how to build a Credential Manager request, please see
`https://developer.android.com/reference/android/credentials/GetCredentialRequest`.

This API should be called at any point before the user focuses on the view, e.g. during
`onCreate` of an Activity.

<br />

| Parameters ||
|---|---|
| `request` | `GetCredentialRequest`: the request to be fired when this view is entered. This value cannot be `null`. <br /> |
| `callback` | `OutcomeReceiver`: to be invoked when either a response or an exception needs to be propagated for the given view. This value cannot be `null`. <br /> |

### setPivotX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPivotX (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)`.
By default, the pivot point is centered on the object.
Setting this property disables this behavior and causes the view to use only the
explicitly set pivotX and pivotY values.

<br />

**Related XML Attributes:**

- [android:transformPivotX](https://developer.android.com/reference/android/view/View#attr_android:transformPivotX)

| Parameters ||
|---|---|
| `pivotX` | `float`: The x location of the pivot point. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getScaleX()`
- `https://developer.android.com/reference/android/view/View#getScaleY()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`

### setPivotY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPivotY (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)`. By default, the pivot point is centered on the object.
Setting this property disables this behavior and causes the view to use only the
explicitly set pivotX and pivotY values.

<br />

**Related XML Attributes:**

- [android:transformPivotY](https://developer.android.com/reference/android/view/View#attr_android:transformPivotY)

| Parameters ||
|---|---|
| `pivotY` | `float`: The y location of the pivot point. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getScaleX()`
- `https://developer.android.com/reference/android/view/View#getScaleY()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`

### setPointerIcon

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPointerIcon (PointerIcon pointerIcon)
```

Set the pointer icon to be used for a mouse pointer in the current view.

Passing `null` will restore the pointer icon to its default value.
Note that setting the pointer icon using this method will only set it for events coming from
a mouse device (i.e. with source `https://developer.android.com/reference/android/view/InputDevice#SOURCE_MOUSE`). To resolve
the pointer icon for other device types like styluses, override
`https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int)`.

<br />

| Parameters ||
|---|---|
| `pointerIcon` | `PointerIcon`: A PointerIcon instance which will be shown when the mouse hovers. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int)`
- `https://developer.android.com/reference/android/view/PointerIcon`

### setPreferKeepClear

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setPreferKeepClear (boolean preferKeepClear)
```

Set a preference to keep the bounds of this view clear from floating windows above this
view's window. This informs the system that the view is considered a vital area for the
user and that ideally it should not be covered. Setting this is only appropriate for UI
where the user would likely take action to uncover it.


The system will try to respect this preference, but when not possible will ignore it.


Note: This is independent from `https://developer.android.com/reference/android/view/View#setPreferKeepClearRects(java.util.List<android.graphics.Rect>)`. If both are set, both will
be taken into account.

<br />

<br />

**Related XML Attributes:**

- [android:preferKeepClear](https://developer.android.com/reference/android/view/View#attr_android:preferKeepClear)

| Parameters ||
|---|---|
| `preferKeepClear` | `boolean` <br /> |

**See also:**

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

### setPreferKeepClearRects

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setPreferKeepClearRects (List<Rect> rects)
```

Set a preference to keep the provided rects clear from floating windows above this
view's window. This informs the system that these rects are considered vital areas for the
user and that ideally they should not be covered. Setting this is only appropriate for UI
where the user would likely take action to uncover it.


The system will try to respect this preference, but when not possible will ignore it.


Note: This is independent from `https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)`. If both are set, both will be
taken into account.

<br />

<br />

| Parameters ||
|---|---|
| `rects` | `List`: A list of rects in this view's local coordinate system. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)`
- `https://developer.android.com/reference/android/view/View#getPreferKeepClearRects()`

### setPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setPressed (boolean pressed)
```

Sets the pressed state for this view.

<br />

| Parameters ||
|---|---|
| `pressed` | `boolean`: Pass true to set the View's internal state to "pressed", or false to reverts the View's internal state from a previously set "pressed" state. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isClickable()`
- `https://developer.android.com/reference/android/view/View#setClickable(boolean)`

### setRenderEffect

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRenderEffect (RenderEffect renderEffect)
```

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to this View.
This will apply a visual effect to the results of the View before it is drawn. For example if
`https://developer.android.com/reference/android/graphics/RenderEffect#createBlurEffect(float,%20float,%20android.graphics.RenderEffect,%20android.graphics.Shader.TileMode)`
is provided, the contents will be drawn in a separate layer, then this layer will be blurred
when this View is drawn.

<br />

| Parameters ||
|---|---|
| `renderEffect` | `RenderEffect`: to be applied to the View. Passing null clears the previously configured `https://developer.android.com/reference/android/graphics/RenderEffect` <br /> |

### setRequestedFrameRate

Added in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRequestedFrameRate (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.
Keep in mind that the preferred frame rate affects the frame rate for the next frame,
so use this method carefully. It's important to note that the preference is valid as
long as the View is invalidated. Please also be aware that the requested frame rate
will not propagate to child views when this API is used on a ViewGroup.

<br />

| Parameters ||
|---|---|
| `frameRate` | `float`: the preferred frame rate of the view. <br /> |

### setRevealOnFocusHint

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setRevealOnFocusHint (boolean revealOnFocus)
```

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

When set to true, this is a signal to ancestor views in the hierarchy that
this view would prefer to be brought fully into view when it gains focus.
For example, a text field that a user is meant to type into. Other views such
as scrolling containers may prefer to opt-out of this behavior.

The default value for views is true, though subclasses may change this
based on their preferred behavior.

<br />

<br />

| Parameters ||
|---|---|
| `revealOnFocus` | `boolean`: true to request reveal on focus in ancestors, false otherwise <br /> |

**See also:**

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

### setRight

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setRight (int right)
```

Sets the right position of this view relative to its parent. This method is meant to be called
by the layout system and should not generally be called otherwise, because the property
may be changed at any time by the layout.

<br />

| Parameters ||
|---|---|
| `right` | `int`: The right of this view, in pixels. <br /> |

### setRotation

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRotation (float rotation)
```

Sets the degrees that the view is rotated around the pivot point. Increasing values
result in clockwise rotation.

<br />

**Related XML Attributes:**

- [android:rotation](https://developer.android.com/reference/android/view/View#attr_android:rotation)

| Parameters ||
|---|---|
| `rotation` | `float`: The degrees of rotation. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotation()`
- `https://developer.android.com/reference/android/view/View#getPivotX()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`
- `https://developer.android.com/reference/android/view/View#setRotationX(float)`
- `https://developer.android.com/reference/android/view/View#setRotationY(float)`

### setRotationX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRotationX (float rotationX)
```

Sets the degrees that the view is rotated around the horizontal axis through the pivot point.
Increasing values result in clockwise rotation from the viewpoint of looking down the
x axis.

When rotating large views, it is recommended to adjust the camera distance
accordingly. Refer to `https://developer.android.com/reference/android/view/View#setCameraDistance(float)` for more information.

<br />

**Related XML Attributes:**

- [android:rotationX](https://developer.android.com/reference/android/view/View#attr_android:rotationX)

| Parameters ||
|---|---|
| `rotationX` | `float`: The degrees of X rotation. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotationX()`
- `https://developer.android.com/reference/android/view/View#getPivotX()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`
- `https://developer.android.com/reference/android/view/View#setRotation(float)`
- `https://developer.android.com/reference/android/view/View#setRotationY(float)`
- `https://developer.android.com/reference/android/view/View#setCameraDistance(float)`

### setRotationY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setRotationY (float rotationY)
```

Sets the degrees that the view is rotated around the vertical axis through the pivot point.
Increasing values result in counter-clockwise rotation from the viewpoint of looking
down the y axis.

When rotating large views, it is recommended to adjust the camera distance
accordingly. Refer to `https://developer.android.com/reference/android/view/View#setCameraDistance(float)` for more information.

<br />

**Related XML Attributes:**

- [android:rotationY](https://developer.android.com/reference/android/view/View#attr_android:rotationY)

| Parameters ||
|---|---|
| `rotationY` | `float`: The degrees of Y rotation. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getRotationY()`
- `https://developer.android.com/reference/android/view/View#getPivotX()`
- `https://developer.android.com/reference/android/view/View#getPivotY()`
- `https://developer.android.com/reference/android/view/View#setRotation(float)`
- `https://developer.android.com/reference/android/view/View#setRotationX(float)`
- `https://developer.android.com/reference/android/view/View#setCameraDistance(float)`

### setSaveEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSaveEnabled (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). Note that even if freezing is enabled, the
view still must have an id assigned to it (via `https://developer.android.com/reference/android/view/View#setId(int)`)
for its state to be saved. This flag can only disable the
saving of this view; any child views may still have their state saved.

<br />

**Related XML Attributes:**

- [android:saveEnabled](https://developer.android.com/reference/android/view/View#attr_android:saveEnabled)

| Parameters ||
|---|---|
| `enabled` | `boolean`: Set to false to *disable* state saving, or true (the default) to allow it. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isSaveEnabled()`
- `https://developer.android.com/reference/android/view/View#setId(int)`
- `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`

### setSaveFromParentEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSaveFromParentEnabled (boolean enabled)
```

Controls whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent. The default
is true; if false, these views will not be saved unless
`https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)` is called directly on this view.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: Set to false to *disable* state saving, or true (the default) to allow it. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isSaveFromParentEnabled()`
- `https://developer.android.com/reference/android/view/View#setId(int)`
- `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`

### setScaleX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScaleX (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. A value of 1 means that no scaling is applied.

<br />

**Related XML Attributes:**

- [android:scaleX](https://developer.android.com/reference/android/view/View#attr_android:scaleX)

| Parameters ||
|---|---|
| `scaleX` | `float`: The scaling factor. <br /> |

**See also:**

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

### setScaleY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScaleY (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. A value of 1 means that no scaling is applied.

<br />

**Related XML Attributes:**

- [android:scaleY](https://developer.android.com/reference/android/view/View#attr_android:scaleY)

| Parameters ||
|---|---|
| `scaleY` | `float`: The scaling factor. <br /> |

**See also:**

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

### setScreenReaderFocusable

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScreenReaderFocusable (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.


Note: this is similar to using [`android:focusable`,
but does not impact input focus behavior.](https://developer.android.com/reference/android/view/View#attr_android:focusable)

<br />

[**Related XML Attributes:**](https://developer.android.com/reference/android/view/View#attr_android:focusable)

[](https://developer.android.com/reference/android/view/View#attr_android:focusable)
- [](https://developer.android.com/reference/android/view/View#attr_android:focusable)[android:screenReaderFocusable](https://developer.android.com/reference/android/view/View#attr_android:screenReaderFocusable)

| Parameters ||
|---|---|
| `screenReaderFocusable` | `boolean`: Whether the view should be treated as a unit by screen reader accessibility tools. <br /> |

### setScrollBarDefaultDelayBeforeFade

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollBarDefaultDelayBeforeFade (int scrollBarDefaultDelayBeforeFade)
```

Define the delay before scrollbars fade.

<br />

**Related XML Attributes:**

- [android:scrollbarDefaultDelayBeforeFade](https://developer.android.com/reference/android/view/View#attr_android:scrollbarDefaultDelayBeforeFade)

| Parameters ||
|---|---|
| `scrollBarDefaultDelayBeforeFade` | `int`: - the delay before scrollbars fade <br /> |

### setScrollBarFadeDuration

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollBarFadeDuration (int scrollBarFadeDuration)
```

Define the scrollbar fade duration.

<br />

**Related XML Attributes:**

- [android:scrollbarFadeDuration](https://developer.android.com/reference/android/view/View#attr_android:scrollbarFadeDuration)

| Parameters ||
|---|---|
| `scrollBarFadeDuration` | `int`: - the scrollbar fade duration, in milliseconds <br /> |

### setScrollBarSize

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollBarSize (int scrollBarSize)
```

Define the scrollbar size.

<br />

**Related XML Attributes:**

- [android:scrollbarSize](https://developer.android.com/reference/android/view/View#attr_android:scrollbarSize)

| Parameters ||
|---|---|
| `scrollBarSize` | `int`: - the scrollbar size <br /> |

### setScrollBarStyle

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollBarStyle (int style)
```

<br />

Specify the style of the scrollbars. The scrollbars can be overlaid or
inset. When inset, they add to the padding of the view. And the scrollbars
can be drawn inside the padding area or on the edge of the view. For example,
if a view has a background drawable and you want to draw the scrollbars
inside the padding specified by the drawable, you can use
SCROLLBARS_INSIDE_OVERLAY or SCROLLBARS_INSIDE_INSET. If you want them to
appear at the edge of the view, ignoring the padding, then you can use
SCROLLBARS_OUTSIDE_OVERLAY or SCROLLBARS_OUTSIDE_INSET.

<br />

<br />

**Related XML Attributes:**

- [android:scrollbarStyle](https://developer.android.com/reference/android/view/View#attr_android:scrollbarStyle)

| Parameters ||
|---|---|
| `style` | `int`: the style of the scrollbars. Should be one of SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_INSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY or SCROLLBARS_OUTSIDE_INSET. Value is one of the following: - `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_OVERLAY` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_INSET` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_OVERLAY` - `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_INSET` |

**See also:**

- `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_OVERLAY`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_INSIDE_INSET`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_OVERLAY`
- `https://developer.android.com/reference/android/view/View#SCROLLBARS_OUTSIDE_INSET`

### setScrollCaptureCallback

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setScrollCaptureCallback (ScrollCaptureCallback callback)
```

Sets the callback to receive scroll capture requests. This component is the adapter between
the scroll capture API and application UI code. If no callback is set, the system may provide
an implementation. Any value provided here will take precedence over a system version.


This view will be ignored when `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE` is set in its `https://developer.android.com/reference/android/view/View#setScrollCaptureHint(int)`, regardless whether a callback has been set.


It is recommended to set the scroll capture hint `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE` when
setting a custom callback to help ensure it is selected as the target.

<br />

| Parameters ||
|---|---|
| `callback` | `ScrollCaptureCallback`: the new callback to assign. This value may be `null`. <br /> |

### setScrollCaptureHint

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollCaptureHint (int hint)
```

Sets the scroll capture hint for this View. These flags affect the search for a potential
scroll capture targets.

<br />

| Parameters ||
|---|---|
| `hint` | `int`: the scrollCaptureHint flags value to set. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_AUTO` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_INCLUDE` - `https://developer.android.com/reference/android/view/View#SCROLL_CAPTURE_HINT_EXCLUDE_DESCENDANTS` |

### setScrollContainer

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollContainer (boolean isScrollContainer)
```

Change whether this view is one of the set of scrollable containers in
its window. This will be used to determine whether the window can
resize or must pan when a soft input area is open -- scrollable
containers allow the window to use resize mode since the container
will appropriately shrink.

<br />

**Related XML Attributes:**

- [android:isScrollContainer](https://developer.android.com/reference/android/view/View#attr_android:isScrollContainer)

| Parameters ||
|---|---|
| `isScrollContainer` | `boolean` <br /> |

### setScrollIndicators

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollIndicators (int indicators, 
                int mask)
```

Sets the state of the scroll indicators specified by the mask. To change
all scroll indicators at once, see `https://developer.android.com/reference/android/view/View#setScrollIndicators(int)`.


When a scroll indicator is enabled, it will be displayed if the view
can scroll in the direction of the indicator.


Multiple indicator types may be enabled or disabled by passing the
logical OR of the desired types. If multiple types are specified, they
will all be set to the same enabled state.


For example, to enable the top scroll indicatorExample: `setScrollIndicators`

<br />

**Related XML Attributes:**

- [android:scrollIndicators](https://developer.android.com/reference/android/view/View#attr_android:scrollIndicators)

| Parameters ||
|---|---|
| `indicators` | `int`: the indicator direction, or the logical OR of multiple indicator directions. One or more of: - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END` . Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END` |
| `mask` | `int`: Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END` |

**See also:**

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

### setScrollIndicators

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollIndicators (int indicators)
```

Sets the state of all scroll indicators.


See `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)` for usage information.

<br />

**Related XML Attributes:**

- [android:scrollIndicators](https://developer.android.com/reference/android/view/View#attr_android:scrollIndicators)

| Parameters ||
|---|---|
| `indicators` | `int`: a bitmask of indicators that should be enabled, or `0` to disable all indicators. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_TOP` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_BOTTOM` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_LEFT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_RIGHT` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_START` - `https://developer.android.com/reference/android/view/View#SCROLL_INDICATOR_END` |

**See also:**

- `https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getScrollIndicators()`

### setScrollX

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollX (int value)
```

Set the horizontal scrolled position of your view. This will cause a call to
`https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)` and the view will be
invalidated.

<br />

| Parameters ||
|---|---|
| `value` | `int`: the x position to scroll to <br /> |

### setScrollY

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollY (int value)
```

Set the vertical scrolled position of your view. This will cause a call to
`https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)` and the view will be
invalidated.

<br />

| Parameters ||
|---|---|
| `value` | `int`: the y position to scroll to <br /> |

### setScrollbarFadingEnabled

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setScrollbarFadingEnabled (boolean fadeScrollbars)
```

Define whether scrollbars will fade when the view is not scrolling.

<br />

**Related XML Attributes:**

- [android:fadeScrollbars](https://developer.android.com/reference/android/view/View#attr_android:fadeScrollbars)

| Parameters ||
|---|---|
| `fadeScrollbars` | `boolean`: whether to enable fading <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 /> |

### setSoundEffectsEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSoundEffectsEnabled (boolean soundEffectsEnabled)
```

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

You may wish to disable sound effects for a view if you already play sounds,
for instance, a dial key that plays dtmf tones.

<br />

**Related XML Attributes:**

- [android:soundEffectsEnabled](https://developer.android.com/reference/android/view/View#attr_android:soundEffectsEnabled)

| Parameters ||
|---|---|
| `soundEffectsEnabled` | `boolean`: whether sound effects are enabled for this view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#isSoundEffectsEnabled()`
- `https://developer.android.com/reference/android/view/View#playSoundEffect(int)`

### setStateDescription

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setStateDescription (CharSequence stateDescription)
```

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


A state description briefly describes the states of the view and is primarily used
for accessibility support to determine how the states of a view should be presented to
the user. It is a supplement to the boolean states (for example, checked/unchecked) and
it is used for customized state description (for example, "wifi, connected, three bars").
State description changes frequently while content description should change less often.
State description should be localized. For android widgets which have default state
descriptions, app developers can call this method to override the state descriptions.
Setting state description to null restores the default behavior.

<br />

| Parameters ||
|---|---|
| `stateDescription` | `CharSequence`: The state description. This value may be `null`. <br /> |

**See also:**

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

### setStateListAnimator

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setStateListAnimator (StateListAnimator stateListAnimator)
```

Attaches the provided StateListAnimator to this View.


Any previously attached StateListAnimator will be detached.

<br />

| Parameters ||
|---|---|
| `stateListAnimator` | `StateListAnimator`: The StateListAnimator to update the view <br /> |

**See also:**

- `https://developer.android.com/reference/android/animation/StateListAnimator`

### setSupplementalDescription

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSupplementalDescription (CharSequence supplementalDescription)
```

Sets the `https://developer.android.com/reference/android/view/View`'s supplemental description.


A supplemental description provides
brief supplemental information for this node, such as the purpose of the node when
that purpose is not conveyed within its textual representation. For example, if a
dropdown select has a purpose of setting font family, the supplemental description
could be "font family". If this node has children, its supplemental description serves
as additional information and is not intended to replace any existing information
in the subtree. This is different from the `https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)`
in that this description is purely supplemental while a content description may be used
to replace a description for a node or its subtree that an assistive technology
would otherwise compute based on other properties of the node and its descendants.


This should omit role or state. Role refers to the kind of user-interface element the View
is, such as a Button or Checkbox. State refers to a frequently changing property of the View,
such as an On/Off state of a button or the audio level of a volume slider.

<br />

**Related XML Attributes:**

- [android:supplementalDescription](https://developer.android.com/reference/android/view/View#attr_android:supplementalDescription)

| Parameters ||
|---|---|
| `supplementalDescription` | `CharSequence`: The supplemental description. This value may be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getSupplementalDescription()`
- `https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)`
- `https://developer.android.com/reference/android/view/View#setStateDescription(java.lang.CharSequence)`

### setSystemGestureExclusionRects

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSystemGestureExclusionRects (List<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. *This method should
be called by `https://developer.android.com/reference/android/view/View#onLayout(boolean,%20int,%20int,%20int,%20int)` or `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`.*

Use this to tell the system which specific sub-areas of a view need to receive gesture
input in order to function correctly in the presence of global system gestures that may
conflict. For example, if the system wishes to capture swipe-in-from-screen-edge gestures
to provide system-level navigation functionality, a view such as a navigation drawer
container can mark the left (or starting) edge of itself as requiring gesture capture
priority using this API. The system may then choose to relax its own gesture recognition
to allow the app to consume the user's gesture. It is not necessary for an app to register
exclusion rects for broadly spanning regions such as the entirety of a
`ScrollView` or for simple press and release click targets such as
`Button`. Mark an exclusion rect when interacting with a view requires
a precision touch gesture in a small area in either the X or Y dimension, such as
an edge swipe or dragging a `SeekBar` thumb.

Note: the system will put a limit of `200dp` on the vertical extent of the
exclusions it takes into account. The limit does not apply while the navigation
bar is `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE_STICKY` hidden, nor to the
`https://developer.android.com/reference/android/inputmethodservice/InputMethodService` and
`https://developer.android.com/reference/android/content/Intent#CATEGORY_HOME`.

<br />

<br />

| Parameters ||
|---|---|
| `rects` | `List`: A list of precision gesture regions that this view needs to function correctly. This value cannot be `null`. <br /> |

### setSystemUiVisibility

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setSystemUiVisibility (int visibility)
```


**This method was deprecated
in API level 30.**   

SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.

Request that the visibility of the status bar or other screen/window
decorations be changed.

This method is used to put the over device UI into temporary modes
where the user's attention is focused more on the application content,
by dimming or hiding surrounding system affordances. This is typically
used in conjunction with `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR_OVERLAY`, allowing the applications content
to be placed behind the action bar (and with these flags other system
affordances) so that smooth transitions between hiding and showing them
can be done.

Two representative examples of the use of system UI visibility is
implementing a content browsing application (like a magazine reader)
and a video playing application.

The first code shows a typical implementation of a View in a content
browsing application. In this implementation, the application goes
into a content-oriented mode by hiding the status bar and action bar,
and putting the navigation elements into lights out mode. The user can
then interact with content while in this mode. Such an application should
provide an easy way for the user to toggle out of the mode (such as to
check information in the status bar or access notifications). In the
implementation here, this is done simply by tapping on the content.

```
public static class Content extends ScrollView
        implements View.OnSystemUiVisibilityChangeListener, View.OnClickListener {
    TextView mText;
    TextView mTitleView;
    SeekBar mSeekView;
    boolean mNavVisible;
    int mBaseSystemUiVisibility = SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | SYSTEM_UI_FLAG_LAYOUT_STABLE;
    int mLastSystemUiVis;

    Runnable mNavHider = new Runnable() {
        @Override public void run() {
            setNavVisibility(false);
        }
    };

    public Content(Context context, AttributeSet attrs) {
        super(context, attrs);

        mText = new TextView(context);
        mText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
        mText.setText(context.getString(R.string.alert_dialog_two_buttons2ultra_msg));
        mText.setClickable(false);
        mText.setOnClickListener(this);
        mText.setTextIsSelectable(true);
        addView(mText, new ViewGroup.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));

        setOnSystemUiVisibilityChangeListener(this);
    }

    public void init(TextView title, SeekBar seek) {
        // This called by the containing activity to supply the surrounding
        // state of the content browser that it will interact with.
        mTitleView = title;
        mSeekView = seek;
        setNavVisibility(true);
    }

    @Override public void onSystemUiVisibilityChange(int visibility) {
        // Detect when we go out of low-profile mode, to also go out
        // of full screen.  We only do this when the low profile mode
        // is changing from its last state, and turning off.
        int diff = mLastSystemUiVis ^ visibility;
        mLastSystemUiVis = visibility;
        if ((diff&SYSTEM_UI_FLAG_LOW_PROFILE) != 0
                && (visibility&SYSTEM_UI_FLAG_LOW_PROFILE) == 0) {
            setNavVisibility(true);
        }
    }

    @Override protected void onWindowVisibilityChanged(int visibility) {
        super.onWindowVisibilityChanged(visibility);

        // When we become visible, we show our navigation elements briefly
        // before hiding them.
        setNavVisibility(true);
        getHandler().postDelayed(mNavHider, 2000);
    }

    @Override protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);

        // When the user scrolls, we hide navigation elements.
        setNavVisibility(false);
    }

    @Override public void onClick(View v) {
        // When the user clicks, we toggle the visibility of navigation elements.
        int curVis = getSystemUiVisibility();
        setNavVisibility((curVis&SYSTEM_UI_FLAG_LOW_PROFILE) != 0);
    }

    void setBaseSystemUiVisibility(int visibility) {
        mBaseSystemUiVisibility = visibility;
    }

    void setNavVisibility(boolean visible) {
        int newVis = mBaseSystemUiVisibility;
        if (!visible) {
            newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN;
        }
        final boolean changed = newVis == getSystemUiVisibility();

        // Unschedule any pending event to hide navigation if we are
        // changing the visibility, or making the UI visible.
        if (changed || visible) {
            Handler h = getHandler();
            if (h != null) {
                h.removeCallbacks(mNavHider);
            }
        }

        // Set the new desired visibility.
        setSystemUiVisibility(newVis);
        mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE);
        mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE);
    }
}
```

This second code sample shows a typical implementation of a View
in a video playing application. In this situation, while the video is
playing the application would like to go into a complete full-screen mode,
to use as much of the display as possible for the video. When in this state
the user can not interact with the application; the system intercepts
touching on the screen to pop the UI out of full screen mode. See
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` for a sample layout that goes with this code.

```
public static class Content extends ImageView implements
        View.OnSystemUiVisibilityChangeListener, View.OnClickListener,
        ActionBar.OnMenuVisibilityListener {
    Activity mActivity;
    TextView mTitleView;
    Button mPlayButton;
    SeekBar mSeekView;
    boolean mAddedMenuListener;
    boolean mMenusOpen;
    boolean mPaused;
    boolean mNavVisible;
    int mLastSystemUiVis;

    Runnable mNavHider = new Runnable() {
        @Override public void run() {
            setNavVisibility(false);
        }
    };

    public Content(Context context, AttributeSet attrs) {
        super(context, attrs);
        setOnSystemUiVisibilityChangeListener(this);
        setOnClickListener(this);
    }

    public void init(Activity activity, TextView title, Button playButton,
            SeekBar seek) {
        // This called by the containing activity to supply the surrounding
        // state of the video player that it will interact with.
        mActivity = activity;
        mTitleView = title;
        mPlayButton = playButton;
        mSeekView = seek;
        mPlayButton.setOnClickListener(this);
        setPlayPaused(true);
    }

    @Override protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (mActivity != null) {
            mAddedMenuListener = true;
            mActivity.getActionBar().addOnMenuVisibilityListener(this);
        }
    }

    @Override protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();
        if (mAddedMenuListener) {
            mActivity.getActionBar().removeOnMenuVisibilityListener(this);
        }
    }

    @Override public void onSystemUiVisibilityChange(int visibility) {
        // Detect when we go out of nav-hidden mode, to clear our state
        // back to having the full UI chrome up.  Only do this when
        // the state is changing and nav is no longer hidden.
        int diff = mLastSystemUiVis ^ visibility;
        mLastSystemUiVis = visibility;
        if ((diff&SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
                && (visibility&SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
            setNavVisibility(true);
        }
    }

    @Override protected void onWindowVisibilityChanged(int visibility) {
        super.onWindowVisibilityChanged(visibility);

        // When we become visible or invisible, play is paused.
        setPlayPaused(true);
    }

    @Override public void onClick(View v) {
        if (v == mPlayButton) {
            // Clicking on the play/pause button toggles its state.
            setPlayPaused(!mPaused);
        } else {
            // Clicking elsewhere makes the navigation visible.
            setNavVisibility(true);
        }
    }

    @Override public void onMenuVisibilityChanged(boolean isVisible) {
        mMenusOpen = isVisible;
        setNavVisibility(true);
    }

    void setPlayPaused(boolean paused) {
        mPaused = paused;
        mPlayButton.setText(paused ? R.string.play : R.string.pause);
        setKeepScreenOn(!paused);
        setNavVisibility(true);
    }

    void setNavVisibility(boolean visible) {
        int newVis = SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | SYSTEM_UI_FLAG_LAYOUT_STABLE;
        if (!visible) {
            newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN
                    | SYSTEM_UI_FLAG_HIDE_NAVIGATION;
        }

        // If we are now visible, schedule a timer for us to go invisible.
        if (visible) {
            Handler h = getHandler();
            if (h != null) {
                h.removeCallbacks(mNavHider);
                if (!mMenusOpen && !mPaused) {
                    // If the menus are open or play is paused, we will not auto-hide.
                    h.postDelayed(mNavHider, 3000);
                }
            }
        }

        // Set the new desired visibility.
        setSystemUiVisibility(newVis);
        mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE);
        mPlayButton.setVisibility(visible ? VISIBLE : INVISIBLE);
        mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE);
    }
}
```

<br />

<br />

| Parameters ||
|---|---|
| `visibility` | `int`: Bitwise-or of flags `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`, `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE`, and `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_IMMERSIVE_STICKY`. <br /> |

### setTag

Added in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTag (int key, 
                Object tag)
```

Sets a tag associated with this view and a key. A tag can be used
to mark a view in its hierarchy and does not have to be unique within
the hierarchy. Tags can also be used to store data within a view
without resorting to another data structure.

The specified key should be an id declared in the resources of the
application to ensure it is unique (see the [ID resource type](https://developer.android.com/guide/topics/resources/more-resources#Id)).
Keys identified as belonging to
the Android framework or not associated with any package will cause
an `https://developer.android.com/reference/java/lang/IllegalArgumentException` to be thrown.

<br />

| Parameters ||
|---|---|
| `key` | `int`: The key identifying the tag <br /> |
| `tag` | `Object`: An Object to tag the view with <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/IllegalArgumentException` | If they specified key is not valid |

**See also:**

- `https://developer.android.com/reference/android/view/View#setTag(java.lang.Object)`
- `https://developer.android.com/reference/android/view/View#getTag(int)`

### setTag

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTag (Object tag)
```

Sets the tag associated with this view. A tag can be used to mark
a view in its hierarchy and does not have to be unique within the
hierarchy. Tags can also be used to store data within a view without
resorting to another data structure.

<br />

| Parameters ||
|---|---|
| `tag` | `Object`: an Object to tag the view with <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getTag()`
- `https://developer.android.com/reference/android/view/View#setTag(int,%20java.lang.Object)`

### setTextAlignment

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextAlignment (int textAlignment)
```

Set the text alignment.

<br />

**Related XML Attributes:**

- [android:textAlignment](https://developer.android.com/reference/android/view/View#attr_android:textAlignment)

| Parameters ||
|---|---|
| `textAlignment` | `int`: The text alignment to set. Should be one of `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_INHERIT`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_CENTER`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_START`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_END`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_START`, `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_END` Resolution will be done if the value is set to TEXT_ALIGNMENT_INHERIT. The resolution proceeds up the parent chain of the view to get the value. If there is no parent, then it will return the default `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY`. Value is one of the following: - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_INHERIT` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_GRAVITY` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_CENTER` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_START` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_TEXT_END` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_START` - `https://developer.android.com/reference/android/view/View#TEXT_ALIGNMENT_VIEW_END` |

### setTextDirection

Added in [API level 17](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTextDirection (int textDirection)
```

Set the text direction.

<br />

**Related XML Attributes:**

- [android:textDirection](https://developer.android.com/reference/android/view/View#attr_android:textDirection)

| Parameters ||
|---|---|
| `textDirection` | `int`: the direction to set. Should be one of: `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_INHERIT`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_ANY_RTL`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LTR`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_RTL`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_LOCALE` `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_LTR`, `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG_RTL`, Resolution will be done if the value is set to TEXT_DIRECTION_INHERIT. The resolution proceeds up the parent chain of the view to get the value. If there is no parent, then it will return the default `https://developer.android.com/reference/android/view/View#TEXT_DIRECTION_FIRST_STRONG`. <br /> |

### setTooltipText

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTooltipText (CharSequence tooltipText)
```

Sets the tooltip text which will be displayed in a small popup next to the view.


The tooltip will be displayed:

- On long click, unless it is handled otherwise (by OnLongClickListener or a context menu).
- On hover, after a brief delay since the pointer has stopped moving


**Note:** Do not override this method, as it will have no
effect on the text displayed in the tooltip.

<br />

**Related XML Attributes:**

- [android:tooltipText](https://developer.android.com/reference/android/view/View#attr_android:tooltipText)

| Parameters ||
|---|---|
| `tooltipText` | `CharSequence`: the tooltip text, or null if no tooltip is required <br /> |

**See also:**

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

### setTop

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setTop (int top)
```

Sets the top position of this view relative to its parent. This method is meant to be called
by the layout system and should not generally be called otherwise, because the property
may be changed at any time by the layout.

<br />

| Parameters ||
|---|---|
| `top` | `int`: The top of this view, in pixels. <br /> |

### setTouchDelegate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTouchDelegate (TouchDelegate delegate)
```

Sets the TouchDelegate for this View.

<br />

| Parameters ||
|---|---|
| `delegate` | `TouchDelegate` <br /> |

### setTransitionAlpha

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTransitionAlpha (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. This value is composited with the other alpha value
(and the AlphaAnimation value, when that is present) to produce a final visual
translucency result, which is what is passed into the DisplayList.

<br />

| Parameters ||
|---|---|
| `alpha` | `float` <br /> |

### setTransitionName

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void setTransitionName (String transitionName)
```

Sets the name of the View to be used to identify Views in Transitions.
Names should be unique in the View hierarchy.

<br />

| Parameters ||
|---|---|
| `transitionName` | `String`: The name of the View to uniquely identify it for Transitions. <br /> |

### setTransitionVisibility

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTransitionVisibility (int visibility)
```

Changes the visibility of this View without triggering any other changes. This should only
be used by animation frameworks, such as `https://developer.android.com/reference/android/transition/Transition`, where
visibility changes should not adjust focus or trigger a new layout. Application developers
should use `https://developer.android.com/reference/android/view/View#setVisibility(int)` instead to ensure that the hierarchy is correctly updated.

Only call this method when a temporary visibility must be applied during an
animation and the original visibility value is guaranteed to be reset after the
animation completes. Use `https://developer.android.com/reference/android/view/View#setVisibility(int)` in all other cases.

<br />

<br />

| Parameters ||
|---|---|
| `visibility` | `int`: 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` |

**See also:**

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

### setTranslationX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTranslationX (float translationX)
```

Sets the horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.
This effectively positions the object post-layout, in addition to wherever the object's
layout placed it.

<br />

**Related XML Attributes:**

- [android:translationX](https://developer.android.com/reference/android/view/View#attr_android:translationX)

| Parameters ||
|---|---|
| `translationX` | `float`: The horizontal position of this view relative to its left position, in pixels. <br /> |

### setTranslationY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTranslationY (float translationY)
```

Sets the vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.
This effectively positions the object post-layout, in addition to wherever the object's
layout placed it.

<br />

**Related XML Attributes:**

- [android:translationY](https://developer.android.com/reference/android/view/View#attr_android:translationY)

| Parameters ||
|---|---|
| `translationY` | `float`: The vertical position of this view relative to its top position, in pixels. <br /> |

### setTranslationZ

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTranslationZ (float translationZ)
```

Sets the depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.

<br />

**Related XML Attributes:**

- [android:translationZ](https://developer.android.com/reference/android/view/View#attr_android:translationZ)

| Parameters ||
|---|---|
| `translationZ` | `float` <br /> |

### setVerticalFadingEdgeEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVerticalFadingEdgeEnabled (boolean verticalFadingEdgeEnabled)
```

<br />

Define whether the vertical edges should be faded when this view
is scrolled vertically.

<br />

<br />

**Related XML Attributes:**

- [android:requiresFadingEdge](https://developer.android.com/reference/android/view/View#attr_android:requiresFadingEdge)

| Parameters ||
|---|---|
| `verticalFadingEdgeEnabled` | `boolean`: true if the vertical edges should be faded when the view is scrolled vertically <br /> |

**See also:**

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

### setVerticalScrollBarEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVerticalScrollBarEnabled (boolean verticalScrollBarEnabled)
```

<br />

Define whether the vertical scrollbar should be drawn or not. The
scrollbar is not drawn by default.

<br />

<br />

| Parameters ||
|---|---|
| `verticalScrollBarEnabled` | `boolean`: true if the vertical scrollbar should be painted <br /> |

**See also:**

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

### setVerticalScrollbarPosition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVerticalScrollbarPosition (int position)
```

Set the position of the vertical scroll bar. Should be one of
`https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_DEFAULT`, `https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_LEFT` or
`https://developer.android.com/reference/android/view/View#SCROLLBAR_POSITION_RIGHT`.

<br />

| Parameters ||
|---|---|
| `position` | `int`: Where the vertical scroll bar should be positioned. <br /> |

### setVerticalScrollbarThumbDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVerticalScrollbarThumbDrawable (Drawable drawable)
```

Defines the vertical scrollbar thumb drawable

<br />

**Related XML Attributes:**

- [android:scrollbarThumbVertical](https://developer.android.com/reference/android/view/View#attr_android:scrollbarThumbVertical)

| Parameters ||
|---|---|
| `drawable` | `Drawable`: This value may be `null`. <br /> |

**See also:**

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

### setVerticalScrollbarTrackDrawable

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVerticalScrollbarTrackDrawable (Drawable drawable)
```

Defines the vertical scrollbar track drawable

<br />

**Related XML Attributes:**

- [android:scrollbarTrackVertical](https://developer.android.com/reference/android/view/View#attr_android:scrollbarTrackVertical)

| Parameters ||
|---|---|
| `drawable` | `Drawable`: This value may be `null`. <br /> |

**See also:**

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

### setViewTranslationCallback

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setViewTranslationCallback (ViewTranslationCallback callback)
```

Sets a `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` that is used to display/hide the translated
information. Developers can provide the customized implementation for show/hide translated
information.

<br />

| Parameters ||
|---|---|
| `callback` | `ViewTranslationCallback`: a `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` that is used to control how to display the translated information. This value cannot be `null`. <br /> |

### setVisibility

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setVisibility (int visibility)
```

Set the visibility state of this view.

<br />

**Related XML Attributes:**

- [android:visibility](https://developer.android.com/reference/android/view/View#attr_android:visibility)

| Parameters ||
|---|---|
| `visibility` | `int`: 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` |

### setWillNotCacheDrawing

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setWillNotCacheDrawing (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.

When a View's drawing cache is enabled, drawing is redirected to an
offscreen bitmap. Some views, like an ImageView, must be able to
bypass this mechanism if they already draw a single bitmap, to avoid
unnecessary usage of the memory.

<br />

| Parameters ||
|---|---|
| `willNotCacheDrawing` | `boolean`: true if this view does not cache its drawing, false otherwise <br /> |

### setWillNotDraw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setWillNotDraw (boolean willNotDraw)
```

If this view doesn't do any drawing on its own, set this flag to
allow further optimizations. By default, this flag is not set on
View, but could be set on some View subclasses such as ViewGroup.

Typically, if you override `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`
you should clear this flag.

<br />

| Parameters ||
|---|---|
| `willNotDraw` | `boolean`: whether or not this View draw on its own <br /> |

### setWindowInsetsAnimationCallback

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setWindowInsetsAnimationCallback (WindowInsetsAnimation.Callback callback)
```

Sets a `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback` to be notified about animations of windows that
cause insets.


The callback's `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback#getDispatchMode()` will affect whether animation callbacks are dispatched to the children of
this view.

<br />

<br />

| Parameters ||
|---|---|
| `callback` | `WindowInsetsAnimation.Callback`: The callback to set. This value may be `null`. <br /> |

### setX

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setX (float x)
```

Sets the visual x position of this view, in pixels. This is equivalent to setting the
`https://developer.android.com/reference/android/view/View#setTranslationX(float)` property to be the difference between
the x value passed in and the current `https://developer.android.com/reference/android/view/View#getLeft()` property.

<br />

| Parameters ||
|---|---|
| `x` | `float`: The visual x position of this view, in pixels. <br /> |

### setY

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setY (float y)
```

Sets the visual y position of this view, in pixels. This is equivalent to setting the
`https://developer.android.com/reference/android/view/View#setTranslationY(float)` property to be the difference between
the y value passed in and the current `https://developer.android.com/reference/android/view/View#getTop()` property.

<br />

| Parameters ||
|---|---|
| `y` | `float`: The visual y position of this view, in pixels. <br /> |

### setZ

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setZ (float z)
```

Sets the visual z position of this view, in pixels. This is equivalent to setting the
`https://developer.android.com/reference/android/view/View#setTranslationZ(float)` property to be the difference between
the z value passed in and the current `https://developer.android.com/reference/android/view/View#getElevation()` property.

<br />

| Parameters ||
|---|---|
| `z` | `float`: The visual z position of this view, in pixels. <br /> |

### 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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#showContextMenu(float,%20float)`

### 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 /> |

### startActionMode

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode startActionMode (ActionMode.Callback callback, 
                int type)
```

Start an action mode with the given type.

<br />

| Parameters ||
|---|---|
| `callback` | `ActionMode.Callback`: Callback that will control the lifecycle of the action mode <br /> |
| `type` | `int`: One of `https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY` or `https://developer.android.com/reference/android/view/ActionMode#TYPE_FLOATING`. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ActionMode` | The new action mode if it is started, null otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ActionMode`

### startActionMode

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode startActionMode (ActionMode.Callback callback)
```

Start an action mode with the default type `https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`.

<br />

| Parameters ||
|---|---|
| `callback` | `ActionMode.Callback`: Callback that will control the lifecycle of the action mode <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ActionMode` | The new action mode if it is started, null otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ActionMode`
- `https://developer.android.com/reference/android/view/View#startActionMode(android.view.ActionMode.Callback,%20int)`

### startAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startAnimation (Animation animation)
```

Start the specified animation now.

<br />

| Parameters ||
|---|---|
| `animation` | `Animation`: the animation to start now <br /> |

### startDrag

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean startDrag (ClipData data, 
                View.DragShadowBuilder shadowBuilder, 
                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.

<br />

<br />

| Parameters ||
|---|---|
| `data` | `ClipData` <br /> |
| `shadowBuilder` | `View.DragShadowBuilder` <br /> |
| `myLocalState` | `Object` <br /> |
| `flags` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### startDragAndDrop

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final boolean startDragAndDrop (ClipData data, 
                View.DragShadowBuilder shadowBuilder, 
                Object myLocalState, 
                int flags)
```

Starts a drag and drop operation. When your application calls this method, it passes a
`https://developer.android.com/reference/android/view/View.DragShadowBuilder` object to the system. The
system calls this object's `https://developer.android.com/reference/android/view/View.DragShadowBuilder#onProvideShadowMetrics(android.graphics.Point,%20android.graphics.Point)`
to get metrics for the drag shadow, and then calls the object's
`https://developer.android.com/reference/android/view/View.DragShadowBuilder#onDrawShadow(android.graphics.Canvas)` to draw the drag shadow itself.


Once the system has the drag shadow, it begins the drag and drop operation by sending
drag events to all the View objects in your application that are currently visible. It does
this either by calling the View object's drag listener (an implementation of
`https://developer.android.com/reference/android/view/View.OnDragListener#onDrag(android.view.View,%20android.view.DragEvent)` or by calling the
View object's `https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)` method.
Both are passed a `https://developer.android.com/reference/android/view/DragEvent` object that has a
`https://developer.android.com/reference/android/view/DragEvent#getAction()` value of
`https://developer.android.com/reference/android/view/DragEvent#ACTION_DRAG_STARTED`.


Your application can invoke `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` on any attached View object. The View object does not need to be
the one used in `https://developer.android.com/reference/android/view/View.DragShadowBuilder`, nor does it need to be related
to the View the user selected for dragging.

<br />

<br />

| Parameters ||
|---|---|
| `data` | `ClipData`: A `https://developer.android.com/reference/android/content/ClipData` object pointing to the data to be transferred by the drag and drop operation. <br /> |
| `shadowBuilder` | `View.DragShadowBuilder`: A `https://developer.android.com/reference/android/view/View.DragShadowBuilder` object for building the drag shadow. <br /> |
| `myLocalState` | `Object`: An `https://developer.android.com/reference/java/lang/Object` containing local data about the drag and drop operation. When dispatching drag events to views in the same activity this object will be available through `https://developer.android.com/reference/android/view/DragEvent#getLocalState()`. Views in other activities will not have access to this data (`https://developer.android.com/reference/android/view/DragEvent#getLocalState()` will return null). myLocalState is a lightweight mechanism for the sending information from the dragged View to the target Views. For example, it can contain flags that differentiate between a a copy operation and a move operation. <br /> |
| `flags` | `int`: Flags that control the drag and drop operation. This can be set to 0 for no flags, or any combination of the following: - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_READ` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_GLOBAL_URI_WRITE` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_OPAQUE` - `https://developer.android.com/reference/android/view/View#DRAG_FLAG_ACCESSIBILITY_ACTION` <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the method completes successfully, or `false` if it fails anywhere. Returning `false` means the system was unable to do a drag because of another ongoing operation or some other reasons. <br /> |

### startNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean startNestedScroll (int axes)
```

Begin a nestable scroll operation along the given axes.

A view starting a nested scroll promises to abide by the following contract:

The view will call startNestedScroll upon initiating a scroll operation. In the case
of a touch scroll this corresponds to the initial `https://developer.android.com/reference/android/view/MotionEvent#ACTION_DOWN`.
In the case of touch scrolling the nested scroll will be terminated automatically in
the same manner as `https://developer.android.com/reference/android/view/ViewParent#requestDisallowInterceptTouchEvent(boolean)`.
In the event of programmatic scrolling the caller must explicitly call
`https://developer.android.com/reference/android/view/View#stopNestedScroll()` to indicate the end of the nested scroll.

If `startNestedScroll` returns true, a cooperative parent was found.
If it returns false the caller may ignore the rest of this contract until the next scroll.
Calling startNestedScroll while a nested scroll is already in progress will return true.

At each incremental step of the scroll the caller should invoke
`https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])`
once it has calculated the requested scrolling delta. If it returns true the nested scrolling
parent at least partially consumed the scroll and the caller should adjust the amount it
scrolls by.

After applying the remainder of the scroll delta the caller should invoke
`https://developer.android.com/reference/android/view/View#dispatchNestedScroll(int,%20int,%20int,%20int,%20int[])`, passing
both the delta consumed and the delta unconsumed. A nested scrolling parent may treat
these values differently. See `https://developer.android.com/reference/android/view/ViewParent#onNestedScroll(android.view.View,%20int,%20int,%20int,%20int)`.

<br />

<br />

| Parameters ||
|---|---|
| `axes` | `int`: Flags consisting of a combination of `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_HORIZONTAL` and/or `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_VERTICAL`. <br /> |

| Returns ||
|---|---|
| `boolean` | true if a cooperative parent was found and nested scrolling has been enabled for the current gesture. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#stopNestedScroll()`
- `https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])`
- `https://developer.android.com/reference/android/view/View#dispatchNestedScroll(int,%20int,%20int,%20int,%20int[])`

### stopNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void stopNestedScroll ()
```

Stop a nested scroll in progress.

Calling this method when a nested scroll is not currently in progress is harmless.

<br />

<br />

**See also:**

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

### toString

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### transformMatrixToGlobal

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void transformMatrixToGlobal (Matrix matrix)
```

Modifies the input matrix such that it maps view-local coordinates to
on-screen coordinates.

<br />

| Parameters ||
|---|---|
| `matrix` | `Matrix`: input matrix to modify. This value cannot be `null`. <br /> |

### transformMatrixToLocal

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void transformMatrixToLocal (Matrix matrix)
```

Modifies the input matrix such that it maps on-screen coordinates to
view-local coordinates.

<br />

| Parameters ||
|---|---|
| `matrix` | `Matrix`: input matrix to modify. This value cannot be `null`. <br /> |

### unregisterCalledFromWrongThreadListener

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static void unregisterCalledFromWrongThreadListener (View.CalledFromWrongThreadListener listener)
```

Unregisters a listener that was previously registered with
`https://developer.android.com/reference/android/view/View#registerCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)`.

<br />

| Parameters ||
|---|---|
| `listener` | `View.CalledFromWrongThreadListener`: The listener to unregister. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/`

### unscheduleDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unscheduleDrawable (Drawable who, 
                Runnable what)
```

Cancels a scheduled action on a drawable.

<br />

| Parameters ||
|---|---|
| `who` | `Drawable`: the recipient of the action. This value cannot be `null`. <br /> |
| `what` | `Runnable`: the action to cancel. This value cannot be `null`. <br /> |

### unscheduleDrawable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void unscheduleDrawable (Drawable who)
```

Unschedule any events associated with the given Drawable. This can be
used when selecting a new Drawable into a view, so that the previous
one is completely unscheduled.

<br />

| Parameters ||
|---|---|
| `who` | `Drawable`: The Drawable to unschedule. <br /> |

**See also:**

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

### updateDragShadow

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void updateDragShadow (View.DragShadowBuilder shadowBuilder)
```

Updates the drag shadow for the ongoing drag and drop operation.

<br />

| Parameters ||
|---|---|
| `shadowBuilder` | `View.DragShadowBuilder`: A `https://developer.android.com/reference/android/view/View.DragShadowBuilder` object for building the new drag shadow. <br /> |

### willNotCacheDrawing

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public 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.

Returns whether or not this View can cache its drawing or not.

<br />

| Returns ||
|---|---|
| `boolean` | true if this view does not cache its drawing, false otherwise <br /> |

### willNotDraw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean willNotDraw ()
```

Returns whether or not this View draws on its own.

<br />

| Returns ||
|---|---|
| `boolean` | true if this view has nothing to draw, false otherwise <br /> |

## Protected methods

### awakenScrollBars

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean awakenScrollBars (int startDelay, 
                boolean invalidate)
```

<br />


Trigger the scrollbars to draw. When invoked this method starts an
animation to fade the scrollbars out after a fixed delay. If a subclass
provides animated scrolling, the start delay should equal the duration of
the scrolling animation.


The animation starts only if at least one of the scrollbars is enabled,
as specified by `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()` and
`https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`. When the animation is started,
this method returns true, and false otherwise. If the animation is
started, this method calls `https://developer.android.com/reference/android/view/View#invalidate()` if the invalidate parameter
is set to true; in that case the caller
should not call `https://developer.android.com/reference/android/view/View#invalidate()`.


This method should be invoked every time a subclass directly updates the
scroll parameters.

<br />

<br />

| Parameters ||
|---|---|
| `startDelay` | `int`: the delay, in milliseconds, after which the animation should start; when the delay is 0, the animation starts immediately <br /> |
| `invalidate` | `boolean`: Whether this method should call invalidate if an animation is scheduled <br /> |

| Returns ||
|---|---|
| `boolean` | true if the animation is played, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)`
- `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)`
- `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)`

### awakenScrollBars

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean awakenScrollBars (int startDelay)
```

<br />


Trigger the scrollbars to draw. When invoked this method starts an
animation to fade the scrollbars out after a fixed delay. If a subclass
provides animated scrolling, the start delay should equal the duration of
the scrolling animation.


The animation starts only if at least one of the scrollbars is enabled,
as specified by `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()` and
`https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`. When the animation is started,
this method returns true, and false otherwise. If the animation is
started, this method calls `https://developer.android.com/reference/android/view/View#invalidate()`; in that case the caller
should not call `https://developer.android.com/reference/android/view/View#invalidate()`.


This method should be invoked every time a subclass directly updates the
scroll parameters.

<br />

<br />

| Parameters ||
|---|---|
| `startDelay` | `int`: the delay, in milliseconds, after which the animation should start; when the delay is 0, the animation starts immediately <br /> |

| Returns ||
|---|---|
| `boolean` | true if the animation is played, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)`
- `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)`
- `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)`

### awakenScrollBars

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean awakenScrollBars ()
```

<br />

Trigger the scrollbars to draw. When invoked this method starts an
animation to fade the scrollbars out after a default delay. If a subclass
provides animated scrolling, the start delay should equal the duration
of the scrolling animation.

The animation starts only if at least one of the scrollbars is
enabled, as specified by `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()` and
`https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`. When the animation is started,
this method returns true, and false otherwise. If the animation is
started, this method calls `https://developer.android.com/reference/android/view/View#invalidate()`; in that case the
caller should not call `https://developer.android.com/reference/android/view/View#invalidate()`.

This method should be invoked every time a subclass directly updates
the scroll parameters.

This method is automatically invoked by `https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)`
and `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)`.

<br />

<br />

| Returns ||
|---|---|
| `boolean` | true if the animation is played, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#awakenScrollBars(int)`
- `https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)`
- `https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)`
- `https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()`
- `https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)`

### computeHorizontalScrollExtent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeHorizontalScrollExtent ()
```

<br />

Compute the horizontal extent of the horizontal scrollbar's thumb
within the horizontal 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#computeHorizontalScrollRange()` and
`https://developer.android.com/reference/android/view/View#computeHorizontalScrollOffset()`.

The default extent is the drawing width of this view.

<br />

<br />

| Returns ||
|---|---|
| `int` | the horizontal extent of the scrollbar's thumb <br /> |

**See also:**

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

### computeHorizontalScrollOffset

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeHorizontalScrollOffset ()
```

<br />

Compute the horizontal offset of the horizontal scrollbar's thumb
within the horizontal range. This value is used to compute the position
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#computeHorizontalScrollRange()` and
`https://developer.android.com/reference/android/view/View#computeHorizontalScrollExtent()`.

The default offset is the scroll offset of this view.

<br />

<br />

| Returns ||
|---|---|
| `int` | the horizontal offset of the scrollbar's thumb <br /> |

**See also:**

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

### 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 /> |

**See also:**

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

### 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 /> |

**See also:**

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

### computeVerticalScrollOffset

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int computeVerticalScrollOffset ()
```

<br />

Compute the vertical offset of the vertical scrollbar's thumb
within the horizontal range. This value is used to compute the position
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#computeVerticalScrollExtent()`.

The default offset is the scroll offset of this view.

<br />

<br />

| Returns ||
|---|---|
| `int` | the vertical offset of the scrollbar's thumb <br /> |

**See also:**

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

### 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 /> |

**See also:**

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

### dispatchDraw

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchDraw (Canvas canvas)
```

Called by draw to draw the child views. This may be overridden
by derived classes to gain control just before its children are drawn
(but after its own view has been drawn).

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas on which to draw the view. This value cannot be `null`. <br /> |

### dispatchGenericFocusedEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean dispatchGenericFocusedEvent (MotionEvent event)
```

Dispatch a generic motion event to the currently focused view.


Do not call this method directly.
Call `https://developer.android.com/reference/android/view/View#dispatchGenericMotionEvent(android.view.MotionEvent)` instead.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### dispatchGenericPointerEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean dispatchGenericPointerEvent (MotionEvent event)
```

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


Do not call this method directly.
Call `https://developer.android.com/reference/android/view/View#dispatchGenericMotionEvent(android.view.MotionEvent)` instead.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### dispatchHoverEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean dispatchHoverEvent (MotionEvent event)
```

Dispatch a hover event.


Do not call this method directly.
Call `https://developer.android.com/reference/android/view/View#dispatchGenericMotionEvent(android.view.MotionEvent)` instead.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### dispatchRestoreInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchRestoreInstanceState (SparseArray<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. May be overridden to modify how restoring
happens to a view's children; for example, some views may want to not store state
for their children.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: The SparseArray which holds previously saved state. <br /> |

**See also:**

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

### dispatchSaveInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchSaveInstanceState (SparseArray<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. May be overridden to modify how freezing happens to a
view's children; for example, some views may want to not store state for their children.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: The SparseArray in which to save the view's state. <br /> |

**See also:**

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

### dispatchSetActivated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchSetActivated (boolean activated)
```

Dispatch setActivated to all of this View's children.

<br />

| Parameters ||
|---|---|
| `activated` | `boolean`: The new activated state <br /> |

**See also:**

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

### dispatchSetPressed

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchSetPressed (boolean pressed)
```

Dispatch setPressed to all of this View's children.

<br />

| Parameters ||
|---|---|
| `pressed` | `boolean`: The new pressed state <br /> |

**See also:**

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

### dispatchSetSelected

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchSetSelected (boolean selected)
```

Dispatch setSelected to all of this View's children.

<br />

| Parameters ||
|---|---|
| `selected` | `boolean`: The new selected state <br /> |

**See also:**

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

### dispatchVisibilityChanged

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchVisibilityChanged (View changedView, 
                int visibility)
```

Dispatch a view visibility change down the view hierarchy.
ViewGroups should override to route to their children.

<br />

| Parameters ||
|---|---|
| `changedView` | `View`: The view whose visibility changed. Could be 'this' or an ancestor view. This value cannot be `null`. <br /> |
| `visibility` | `int`: The new visibility of changedView: `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` |

### 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 />

**See also:**

- `https://developer.android.com/reference/android/graphics/drawable/Drawable#setState(int[])`

### fitSystemWindows

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
20](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean fitSystemWindows (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.

Called by the view hierarchy when the content insets for a window have
changed, to allow it to adjust its content to fit within those windows.
The content insets tell you the space that the status bar, input method,
and other system windows infringe on the application's window.

You do not normally need to deal with this function, since the default
window decoration given to applications takes care of applying it to the
content of the window. If you use `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`
or `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION` this will not be the case,
and your content can be placed under those system elements. You can then
use this method within your view hierarchy if you have parts of your UI
which you would like to ensure are not being covered.

The default implementation of this method simply applies the content
insets to the view's padding, consuming that content (modifying the
insets to be 0), and returning true. This behavior is off by default, but can
be enabled through `https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)`.

This function's traversal down the hierarchy is depth-first. The same content
insets object is propagated down the hierarchy, so any changes made to it will
be seen by all following views (including potentially ones above in
the hierarchy since this is a depth-first traversal). The first view
that returns true will abort the entire traversal.

The default implementation works well for a situation where it is
used with a container that covers the entire window, allowing it to
apply the appropriate insets to its content on all edges. If you need
a more complicated layout (such as two different views fitting system
windows, one on the top of the window, and one on the bottom),
you can override the method and handle the insets however you would like.
Note that the insets provided by the framework are always relative to the
far edges of the window, not accounting for the location of the called view
within that window. (In fact when this method is called you do not yet know
where the layout will place the view, as it is done before layout happens.)

Note: unlike many View methods, there is no dispatch phase to this
call. If you are overriding it in a ViewGroup and want to allow the
call to continue to your children, you must be sure to call the super
implementation.

Here is a sample layout that makes use of fitting system windows
to have controls for a video view placed inside of the window decorations
that it hides and shows. This can be used with code like the second
sample (video player) shown in `https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)`.

```
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent"
    >
    <view class="com.example.android.apis.view.VideoPlayerActivity$Content"
        android:id="@+id/content"
        android:src="@drawable/frantic"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scaleType="center"
        />
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        android:animateLayoutChanges="true"
        >
        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="top|center_horizontal"
            android:textColor="#ffffffff"
            android:background="#a0000000"
            android:textAppearance="?android:attr/textAppearanceLarge"
            android:gravity="left"
            android:padding="16dp"
            android:text="A title goes here"
            />
        <Button
            android:id="@+id/play"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:textSize="28dp"
            />
        <SeekBar
            android:id="@+id/seekbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|center_horizontal"
            android:layout_marginBottom="16dp"
            />
    </FrameLayout>
</FrameLayout>
```

<br />

<br />

| Parameters ||
|---|---|
| `insets` | `Rect`: Current content insets of the window. Prior to `https://developer.android.com/reference/android/os/Build.VERSION_CODES#JELLY_BEAN` you must not modify the insets or else you and Android will be unhappy. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this view applied the insets and it should not continue propagating further down the hierarchy, `false` otherwise. <br /> |

**See also:**

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

### getBottomFadingEdgeStrength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected float getBottomFadingEdgeStrength ()
```

Returns the strength, or intensity, of the bottom 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 bottom fade as a float between 0.0f and 1.0f <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 /> |

**See also:**

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

### getContextMenuInfo

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected ContextMenu.ContextMenuInfo getContextMenuInfo ()
```

Views should implement this if they have extra information to associate
with the context menu. The return result is supplied as a parameter to
the `https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)`
callback.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo` | Extra information about the item for which the context menu should be shown. This information will vary across different subclasses of View. <br /> |

### getHorizontalScrollbarHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getHorizontalScrollbarHeight ()
```

Returns the height of the horizontal scrollbar.

<br />

| Returns ||
|---|---|
| `int` | The height in pixels of the horizontal scrollbar or 0 if there is no horizontal scrollbar. <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 /> |

**See also:**

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

### 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 /> |

**See also:**

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

### getSuggestedMinimumHeight

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getSuggestedMinimumHeight ()
```

Returns the suggested minimum height that the view should use. This
returns the maximum of the view's minimum height
and the background's minimum height
(`https://developer.android.com/reference/android/graphics/drawable/Drawable#getMinimumHeight()`).


When being used in `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`, the caller should still
ensure the returned height is within the requirements of the parent.

<br />

| Returns ||
|---|---|
| `int` | The suggested minimum height of the view. <br /> |

### getSuggestedMinimumWidth

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getSuggestedMinimumWidth ()
```

Returns the suggested minimum width that the view should use. This
returns the maximum of the view's minimum width
and the background's minimum width
(`https://developer.android.com/reference/android/graphics/drawable/Drawable#getMinimumWidth()`).


When being used in `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`, the caller should still
ensure the returned width is within the requirements of the parent.

<br />

| Returns ||
|---|---|
| `int` | The suggested minimum width of the view. <br /> |

### getTopFadingEdgeStrength

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected float getTopFadingEdgeStrength ()
```

Returns the strength, or intensity, of the top 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 top fade as a float between 0.0f and 1.0f <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 /> |

**See also:**

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

### getWindowAttachCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getWindowAttachCount ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | The number of times this view has been attached to a window <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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getLeftPaddingOffset()`
- `https://developer.android.com/reference/android/view/View#getRightPaddingOffset()`
- `https://developer.android.com/reference/android/view/View#getTopPaddingOffset()`
- `https://developer.android.com/reference/android/view/View#getBottomPaddingOffset()`

### mergeDrawableStates

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static int[] mergeDrawableStates (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)`.

<br />

| Parameters ||
|---|---|
| `baseState` | `int`: The base state values returned by `https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)`, which will be modified to also hold your own additional state values. <br /> |
| `additionalState` | `int`: The additional state values you would like added to <var translate="no">baseState</var>; this array is not modified. <br /> |

| Returns ||
|---|---|
| `int[]` | As a convenience, the <var translate="no">baseState</var> array you originally passed into the function is returned. <br /> |

**See also:**

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

### onAnimationEnd

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onAnimationEnd ()
```

Invoked by a parent ViewGroup to notify the end of the animation
currently associated with this view. If you override this method,
always call super.onAnimationEnd();.


If you override this method you *must* call through to the
superclass implementation.

<br />

**See also:**

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

### onAnimationStart

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onAnimationStart ()
```

Invoked by a parent ViewGroup to notify the start of the animation
currently associated with this view. If you override this method,
always call super.onAnimationStart();.


If you override this method you *must* call through to the
superclass implementation.

<br />

**See also:**

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

### 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 />

**See also:**

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

### 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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#mergeDrawableStates(int[],%20int[])`

### onDetachedFromWindow

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onDetachedFromWindow ()
```

This is called when the view is detached from a window. At this point it
no longer has a surface for drawing.


If you override this method you *must* call through to the
superclass implementation.

<br />

**See also:**

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

### onDisplayHint

Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onDisplayHint (int hint)
```

Gives this view a hint about whether is displayed or not. For instance, when
a View moves out of the screen, it might receives a display hint indicating
the view is not displayed. Applications should not *rely* on this hint
as there is no guarantee that they will receive one.

<br />

| Parameters ||
|---|---|
| `hint` | `int`: A hint about whether or not this view is displayed: `https://developer.android.com/reference/android/view/View#VISIBLE` or `https://developer.android.com/reference/android/view/View#INVISIBLE`. 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` |

### 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 /> |

### onDrawScrollBars

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected final void onDrawScrollBars (Canvas canvas)
```

<br />

Request the drawing of the horizontal and the vertical scrollbar. The
scrollbars are painted only if they have been awakened first.

<br />

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: the canvas on which to draw the scrollbars. This value cannot be `null`. <br /> |

**See also:**

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

### onFinishInflate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onFinishInflate ()
```

Finalize inflating a view from XML. This is called as the last phase
of inflation, after all child views have been added.

Even if the subclass overrides onFinishInflate, they should always be
sure to call the super method, so that we get called.


If you override this method you *must* call through to the
superclass implementation.

<br />

### onFocusChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onFocusChanged (boolean gainFocus, 
                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 ||
|---|---|
| `gainFocus` | `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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#getMeasuredWidth()`
- `https://developer.android.com/reference/android/view/View#getMeasuredHeight()`
- `https://developer.android.com/reference/android/view/View#setMeasuredDimension(int,%20int)`
- `https://developer.android.com/reference/android/view/View#getSuggestedMinimumHeight()`
- `https://developer.android.com/reference/android/view/View#getSuggestedMinimumWidth()`
- `https://developer.android.com/reference/android/view/View.MeasureSpec#getMode(int)`
- `https://developer.android.com/reference/android/view/View.MeasureSpec#getSize(int)`

### onOverScrolled

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onOverScrolled (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.

<br />

| Parameters ||
|---|---|
| `scrollX` | `int`: New X scroll value in pixels <br /> |
| `scrollY` | `int`: New Y scroll value in pixels <br /> |
| `clampedX` | `boolean`: True if scrollX was clamped to an over-scroll boundary <br /> |
| `clampedY` | `boolean`: True if scrollY was clamped to an over-scroll boundary <br /> |

### onRestoreInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected 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/view/View#onSaveInstanceState()`. <br /> |

**See also:**

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

### onSaveInstanceState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected 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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#onRestoreInstanceState(android.os.Parcelable)`
- `https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)`
- `https://developer.android.com/reference/android/view/View#dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable>)`
- `https://developer.android.com/reference/android/view/View#setSaveEnabled(boolean)`

### onScrollChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onScrollChanged (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). 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 ||
|---|---|
| `l` | `int`: Current horizontal scroll origin. <br /> |
| `t` | `int`: Current vertical scroll origin. <br /> |
| `oldl` | `int`: Previous horizontal scroll origin. <br /> |
| `oldt` | `int`: Previous vertical scroll origin. <br /> |

### onSetAlpha

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean onSetAlpha (int alpha)
```

Invoked if there is a Transform that involves alpha. Subclass that can
draw themselves with the specified alpha should return true, and then
respect that alpha when their onDraw() is called. If this returns false
then the view may be redirected to draw into an offscreen buffer to
fulfill the request, which will look fine, but may be slower than if the
subclass handles it internally. The default implementation returns false.

<br />

| Parameters ||
|---|---|
| `alpha` | `int`: The alpha (0..255) to apply to the view's drawing <br /> |

| Returns ||
|---|---|
| `boolean` | true if the view can draw with the specified alpha. <br /> |

### onSizeChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onSizeChanged (int w, 
                int h, 
                int oldw, 
                int oldh)
```

This is called during layout when the size of this view has changed. If
you were just added to the view hierarchy, you're called with the old
values of 0.

<br />

| Parameters ||
|---|---|
| `w` | `int`: Current width of this view. <br /> |
| `h` | `int`: Current height of this view. <br /> |
| `oldw` | `int`: Old width of this view. <br /> |
| `oldh` | `int`: Old height of this view. <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` |

### onWindowVisibilityChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onWindowVisibilityChanged (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`). Note
that this tells you whether or not your window is being made visible
to the window manager; this does *not* tell you whether or not
your window is obscured by other windows on the screen, even if it
is itself visible.

<br />

| Parameters ||
|---|---|
| `visibility` | `int`: The new visibility of the window. 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` |

### overScrollBy

Added in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean overScrollBy (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. Views that call this method should override
`https://developer.android.com/reference/android/view/View#onOverScrolled(int,%20int,%20boolean,%20boolean)` to respond to the
results of an over-scroll operation.

Views can use this method to handle any touch or fling-based scrolling.

<br />

| Parameters ||
|---|---|
| `deltaX` | `int`: Change in X in pixels <br /> |
| `deltaY` | `int`: Change in Y in pixels <br /> |
| `scrollX` | `int`: Current X scroll value in pixels before applying deltaX <br /> |
| `scrollY` | `int`: Current Y scroll value in pixels before applying deltaY <br /> |
| `scrollRangeX` | `int`: Maximum content scroll range along the X axis <br /> |
| `scrollRangeY` | `int`: Maximum content scroll range along the Y axis <br /> |
| `maxOverScrollX` | `int`: Number of pixels to overscroll by in either direction along the X axis. <br /> |
| `maxOverScrollY` | `int`: Number of pixels to overscroll by in either direction along the Y axis. <br /> |
| `isTouchEvent` | `boolean`: true if this scroll operation is the result of a touch event. <br /> |

| Returns ||
|---|---|
| `boolean` | true if scrolling was clamped to an over-scroll boundary along either axis, false otherwise. <br /> |

### setMeasuredDimension

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected final void setMeasuredDimension (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. Failing to do so will trigger an
exception at measurement time.

<br />

<br />

| Parameters ||
|---|---|
| `measuredWidth` | `int`: The measured width of this view. May be a complex bit mask as defined by `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` and `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`. <br /> |
| `measuredHeight` | `int`: The measured height of this view. May be a complex bit mask as defined by `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` and `https://developer.android.com/reference/android/view/View#MEASURED_STATE_TOO_SMALL`. <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`: The Drawable to verify. Return true if it is one you are displaying, else return the result of calling through to the super class. 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 /> |

**See also:**

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