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

# ViewGroup

*** ** * ** ***


`
public


abstract
class
ViewGroup
`


`


`

`

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


`

`


implements

https://developer.android.com/reference/android/view/ViewManager,

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


`

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

Known direct subclasses [AbsoluteLayout](https://developer.android.com/reference/android/widget/AbsoluteLayout), [AdapterView](https://developer.android.com/reference/android/widget/AdapterView)\<T extends [Adapter](https://developer.android.com/reference/android/widget/Adapter)\>, [FragmentBreadCrumbs](https://developer.android.com/reference/android/app/FragmentBreadCrumbs), [FrameLayout](https://developer.android.com/reference/android/widget/FrameLayout), [GridLayout](https://developer.android.com/reference/android/widget/GridLayout), [InlineContentView](https://developer.android.com/reference/android/widget/inline/InlineContentView), [LinearLayout](https://developer.android.com/reference/android/widget/LinearLayout), [RelativeLayout](https://developer.android.com/reference/android/widget/RelativeLayout), [SlidingDrawer](https://developer.android.com/reference/android/widget/SlidingDrawer), [Toolbar](https://developer.android.com/reference/android/widget/Toolbar), [TvAdView](https://developer.android.com/reference/android/media/tv/ad/TvAdView), [TvInteractiveAppView](https://developer.android.com/reference/android/media/tv/interactive/TvInteractiveAppView), [TvView](https://developer.android.com/reference/android/media/tv/TvView) [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.* [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`. [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. [GridLayout](https://developer.android.com/reference/android/widget/GridLayout) A layout that places its children in a rectangular *grid*. [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. [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. [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.* [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. Known indirect subclasses [AbsListView](https://developer.android.com/reference/android/widget/AbsListView), [AbsSpinner](https://developer.android.com/reference/android/widget/AbsSpinner), [ActionMenuView](https://developer.android.com/reference/android/widget/ActionMenuView), [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), [CalendarView](https://developer.android.com/reference/android/widget/CalendarView), [DatePicker](https://developer.android.com/reference/android/widget/DatePicker), [DialerFilter](https://developer.android.com/reference/android/widget/DialerFilter), [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView), [Gallery](https://developer.android.com/reference/android/widget/Gallery), [GestureOverlayView](https://developer.android.com/reference/android/gesture/GestureOverlayView), [GridView](https://developer.android.com/reference/android/widget/GridView), [HorizontalScrollView](https://developer.android.com/reference/android/widget/HorizontalScrollView), [ImageSwitcher](https://developer.android.com/reference/android/widget/ImageSwitcher), and 21 others. [AbsListView](https://developer.android.com/reference/android/widget/AbsListView) Base class that can be used to implement virtualized lists of items. [AbsSpinner](https://developer.android.com/reference/android/widget/AbsSpinner) An abstract base class for spinner widgets. [ActionMenuView](https://developer.android.com/reference/android/widget/ActionMenuView) ActionMenuView is a presentation of a series of menu options as a View. [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. [CalendarView](https://developer.android.com/reference/android/widget/CalendarView) This class is a calendar widget for displaying and selecting dates. [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* [ExpandableListView](https://developer.android.com/reference/android/widget/ExpandableListView) A view that shows items in a vertically scrolling two-level list. [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. [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. [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. [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. [NumberPicker](https://developer.android.com/reference/android/widget/NumberPicker) A widget that enables the user to select a number from a predefined range. [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.


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


[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. [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`.* [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. [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 />


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. This class also defines the
`https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` class which serves as the base
class for layouts parameters.


Also see `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` for layout attributes.

### Developer Guides

For more information about creating user interface layouts, read the
[XML Layouts](https://developer.android.com/guide/topics/ui/declaring-layout) developer
guide.

Here is a complete implementation of a custom ViewGroup that implements
a simple `https://developer.android.com/reference/android/widget/FrameLayout` along with the ability to stack
children in left and right gutters.

```
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RemoteViews;

/**
 * Example of writing a custom layout manager.  This is a fairly full-featured
 * layout manager that is relatively general, handling all layout cases.  You
 * can simplify it for more specific cases.
 */
@RemoteViews.RemoteView
public class CustomLayout extends ViewGroup {
    /** The amount of space used by children in the left gutter. */
    private int mLeftWidth;

    /** The amount of space used by children in the right gutter. */
    private int mRightWidth;

    /** These are used for computing child frames based on their gravity. */
    private final Rect mTmpContainerRect = new Rect();
    private final Rect mTmpChildRect = new Rect();

    public CustomLayout(Context context) {
        super(context);
    }

    public CustomLayout(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CustomLayout(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    /**
     * Any layout manager that doesn't scroll will want this.
     */
    @Override
    public boolean shouldDelayChildPressedState() {
        return false;
    }

    /**
     * Ask all children to measure themselves and compute the measurement of this
     * layout based on the children.
     */
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int count = getChildCount();

        // These keep track of the space we are using on the left and right for
        // views positioned there; we need member variables so we can also use
        // these for layout later.
        mLeftWidth = 0;
        mRightWidth = 0;

        // Measurement will ultimately be computing these values.
        int maxHeight = 0;
        int maxWidth = 0;
        int childState = 0;

        // Iterate through all children, measuring them and computing our dimensions
        // from their size.
        for (int i = 0; i < count; i++) {
            final View child = getChildAt(i);
            if (child.getVisibility() != GONE) {
                // Measure the child.
                measureChildWithMargins(child, widthMeasureSpec, 0, heightMeasureSpec, 0);

                // Update our size information based on the layout params.  Children
                // that asked to be positioned on the left or right go in those gutters.
                final LayoutParams lp = (LayoutParams) child.getLayoutParams();
                if (lp.position == LayoutParams.POSITION_LEFT) {
                    mLeftWidth += Math.max(maxWidth,
                            child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
                } else if (lp.position == LayoutParams.POSITION_RIGHT) {
                    mRightWidth += Math.max(maxWidth,
                            child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
                } else {
                    maxWidth = Math.max(maxWidth,
                            child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin);
                }
                maxHeight = Math.max(maxHeight,
                        child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin);
                childState = combineMeasuredStates(childState, child.getMeasuredState());
            }
        }

        // Total width is the maximum width of all inner children plus the gutters.
        maxWidth += mLeftWidth + mRightWidth;

        // Check against our minimum height and width
        maxHeight = Math.max(maxHeight, getSuggestedMinimumHeight());
        maxWidth = Math.max(maxWidth, getSuggestedMinimumWidth());

        // Report our final dimensions.
        setMeasuredDimension(resolveSizeAndState(maxWidth, widthMeasureSpec, childState),
                resolveSizeAndState(maxHeight, heightMeasureSpec,
                        childState << MEASURED_HEIGHT_STATE_SHIFT));
    }

    /**
     * Position all children within this layout.
     */
    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        final int count = getChildCount();

        // These are the far left and right edges in which we are performing layout.
        int leftPos = getPaddingLeft();
        int rightPos = right - left - getPaddingRight();

        // This is the middle region inside of the gutter.
        final int middleLeft = leftPos + mLeftWidth;
        final int middleRight = rightPos - mRightWidth;

        // These are the top and bottom edges in which we are performing layout.
        final int parentTop = getPaddingTop();
        final int parentBottom = bottom - top - getPaddingBottom();

        for (int i = 0; i < count; i++) {
            final View child = getChildAt(i);
            if (child.getVisibility() != GONE) {
                final LayoutParams lp = (LayoutParams) child.getLayoutParams();

                final int width = child.getMeasuredWidth();
                final int height = child.getMeasuredHeight();

                // Compute the frame in which we are placing this child.
                if (lp.position == LayoutParams.POSITION_LEFT) {
                    mTmpContainerRect.left = leftPos + lp.leftMargin;
                    mTmpContainerRect.right = leftPos + width + lp.rightMargin;
                    leftPos = mTmpContainerRect.right;
                } else if (lp.position == LayoutParams.POSITION_RIGHT) {
                    mTmpContainerRect.right = rightPos - lp.rightMargin;
                    mTmpContainerRect.left = rightPos - width - lp.leftMargin;
                    rightPos = mTmpContainerRect.left;
                } else {
                    mTmpContainerRect.left = middleLeft + lp.leftMargin;
                    mTmpContainerRect.right = middleRight - lp.rightMargin;
                }
                mTmpContainerRect.top = parentTop + lp.topMargin;
                mTmpContainerRect.bottom = parentBottom - lp.bottomMargin;

                // Use the child's gravity and size to determine its final
                // frame within its container.
                Gravity.apply(lp.gravity, width, height, mTmpContainerRect, mTmpChildRect);

                // Place the child.
                child.layout(mTmpChildRect.left, mTmpChildRect.top,
                        mTmpChildRect.right, mTmpChildRect.bottom);
            }
        }
    }

    // ---
    // The rest of the implementation is for custom per-child layout parameters.
    // If you do not need these (for example you are writing a layout manager
    // that does fixed positioning of its children), you can drop all of this.

    @Override
    public LayoutParams generateLayoutParams(AttributeSet attrs) {
        return new CustomLayout.LayoutParams(getContext(), attrs);
    }

    @Override
    protected LayoutParams generateDefaultLayoutParams() {
        return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
    }

    @Override
    protected ViewGroup.LayoutParams generateLayoutParams(ViewGroup.LayoutParams p) {
        return new LayoutParams(p);
    }

    @Override
    protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
        return p instanceof LayoutParams;
    }

    /**
     * Custom per-child layout information.
     */
    public static class LayoutParams extends MarginLayoutParams {
        /**
         * The gravity to apply with the View to which these layout parameters
         * are associated.
         */
        public int gravity = Gravity.TOP | Gravity.START;

        public static int POSITION_MIDDLE = 0;
        public static int POSITION_LEFT = 1;
        public static int POSITION_RIGHT = 2;

        public int position = POSITION_MIDDLE;

        public LayoutParams(Context c, AttributeSet attrs) {
            super(c, attrs);

            // Pull the layout param values from the layout XML during
            // inflation.  This is not needed if you don't care about
            // changing the layout behavior in XML.
            TypedArray a = c.obtainStyledAttributes(attrs, R.styleable.CustomLayoutLP);
            gravity = a.getInt(R.styleable.CustomLayoutLP_android_layout_gravity, gravity);
            position = a.getInt(R.styleable.CustomLayoutLP_layout_position, position);
            a.recycle();
        }

        public LayoutParams(int width, int height) {
            super(width, height);
        }

        public LayoutParams(ViewGroup.LayoutParams source) {
            super(source);
        }
    }
}
```

If you are implementing XML layout attributes as shown in the example, this is the
corresponding definition for them that would go in `res/values/attrs.xml`:

```
<declare-styleable name="CustomLayoutLP">
    <attr name="android:layout_gravity" />
    <attr name="layout_position">
        <enum name="middle" value="0" />
        <enum name="left" value="1" />
        <enum name="right" value="2" />
    </attr>
</declare-styleable>
```

Finally the layout manager can be used in an XML layout like so:

```
<com.example.android.apis.view.CustomLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res/com.example.android.apis"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <!-- put first view to left. -->
    <TextView
            android:background="@drawable/filled_box"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_position="left"
            android:layout_gravity="fill_vertical|center_horizontal"
            android:text="l1"/>

    <!-- stack second view to left. -->
    <TextView
            android:background="@drawable/filled_box"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_position="left"
            android:layout_gravity="fill_vertical|center_horizontal"
            android:text="l2"/>

    <!-- also put a view on the right. -->
    <TextView
            android:background="@drawable/filled_box"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_position="right"
            android:layout_gravity="fill_vertical|center_horizontal"
            android:text="r1"/>

    <!-- by default views go in the middle; use fill vertical gravity -->
    <TextView
            android:background="@drawable/green"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="fill_vertical|center_horizontal"
            android:text="fill-vert"/>

    <!-- by default views go in the middle; use fill horizontal gravity -->
    <TextView
            android:background="@drawable/green"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical|fill_horizontal"
            android:text="fill-horiz"/>

    <!-- by default views go in the middle; use top-left gravity -->
    <TextView
            android:background="@drawable/blue"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="top|left"
            android:text="top-left"/>

    <!-- by default views go in the middle; use center gravity -->
    <TextView
            android:background="@drawable/blue"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="center"/>

    <!-- by default views go in the middle; use bottom-right -->
    <TextView
            android:background="@drawable/blue"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|right"
            android:text="bottom-right"/>

</com.example.android.apis.view.CustomLayout>
```

<br />

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` LayoutParams are used by views to tell their parents how they want to be laid out. |
| ` class` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams` Per-child layout information for layouts that support margins. |
| ` interface` | `https://developer.android.com/reference/android/view/ViewGroup.OnHierarchyChangeListener` Interface definition for a callback to be invoked when the hierarchy within this view changed. |

| ### XML attributes ||
|---|---|
| [`android:addStatesFromChildren`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:addStatesFromChildren) | Sets whether this ViewGroup's drawable states also include its children's drawable states. |
| [`android:alwaysDrawnWithCache`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:alwaysDrawnWithCache) | Defines whether the ViewGroup should always draw its children using their drawing cache or not. |
| [`android:animateLayoutChanges`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:animateLayoutChanges) | Defines whether changes in layout (caused by adding and removing items) should cause a LayoutTransition to run. |
| [`android:animationCache`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:animationCache) | Defines whether layout animations should create a drawing cache for their children. |
| [`android:clipChildren`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:clipChildren) | Defines whether a child is limited to draw inside of its bounds or not. |
| [`android:clipToPadding`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:clipToPadding) | Defines whether the ViewGroup will clip its children and resize (but not clip) any EdgeEffect to its padding, if padding is not zero. |
| [`android:descendantFocusability`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:descendantFocusability) | Defines the relationship between the ViewGroup and its descendants when looking for a View to take focus. |
| [`android:layoutAnimation`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:layoutAnimation) | Defines the layout animation to use the first time the ViewGroup is laid out. |
| [`android:layoutMode`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:layoutMode) | Defines the layout mode of this ViewGroup. |
| [`android:persistentDrawingCache`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:persistentDrawingCache) | Defines the persistence of the drawing cache. |
| [`android:splitMotionEvents`](https://developer.android.com/reference/android/view/ViewGroup#attr_android:splitMotionEvents) | Sets whether this ViewGroup should split MotionEvents to separate child views during touch event dispatch. |

### Inherited XML attributes

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


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

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


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


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

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


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

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


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


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

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#CLIP_TO_PADDING_MASK` We clip to padding when FLAG_CLIP_TO_PADDING and FLAG_PADDING_NOT_NULL are set at the same time. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_AFTER_DESCENDANTS` This view will get focus only if none of its descendants want it. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BEFORE_DESCENDANTS` This view will get focus before any of its descendants. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS` This view will block any of its descendants from getting focus, even if they are focusable. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_CLIP_BOUNDS` This constant is a `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_OPTICAL_BOUNDS` This constant is a `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`. |
| `int` | `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_ALL_CACHES` *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/ViewGroup#PERSISTENT_ANIMATION_CACHE` *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/ViewGroup#PERSISTENT_NO_CACHE` *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/ViewGroup#PERSISTENT_SCROLLING_CACHE` *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.* |

### Inherited constants

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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Autofill type for views that cannot be autofilled.


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

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


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

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


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

Content sensitivity is determined by the framework.


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

The view doesn't display sensitive content.


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

The view displays sensitive content.


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

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


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

Flag indicating that a drag can cross window boundaries.


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

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


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

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


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

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


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

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


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

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


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

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


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

Flag indicating that the drag shadow will be opaque.


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

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


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

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


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

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


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

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


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

Find find views that contain the specified content description.


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

Find views that render the specified text.


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

This view wants keystrokes.


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

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


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

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


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

This view determines focusability automatically.


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Automatically determine whether a view is important for accessibility.


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

The view is not important for accessibility.


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

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


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

The view is important for accessibility.


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

Automatically determine whether a view is important for autofill.


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

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


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

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


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

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


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

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


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

Automatically determine whether a view is important for content capture.


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

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


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

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


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

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


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

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


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

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


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

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


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

<br />

Indicates that the view has a hardware layer.


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

Indicates that the view does not have a layer.


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

<br />

Indicates that the view has a software layer.


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

This view does not want keystrokes.


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

Used to mark a View that has no ID.


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

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


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

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


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

Never allow a user to over-scroll this view.


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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


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


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


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


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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Position the scroll bar along the left edge.


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

Position the scroll bar along the right edge.


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

Indicates scrolling along the horizontal axis.


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

Indicates no axis of view scrolling.


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

Indicates scrolling along the vertical axis.


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

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


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

Explicitly exclude this view as a potential scroll capture target.


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

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


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

Explicitly include this view as a potential scroll capture target.


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

Scroll indicator direction for the bottom edge of the view.


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

Scroll indicator direction for the ending edge of the view.


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

Scroll indicator direction for the left edge of the view.


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

Scroll indicator direction for the right edge of the view.


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

Scroll indicator direction for the starting edge of the view.


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

Scroll indicator direction for the top edge of the view.


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

Center the paragraph, e.g. ALIGN_CENTER.


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

Default for the root view.


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

Default text alignment.


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

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


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

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


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

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


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

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


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

Text direction is using "any-RTL" algorithm.


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

Text direction is using "first strong algorithm".


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

Text direction is using "first strong algorithm".


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

Text direction is using "first strong algorithm".


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

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


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

Text direction is coming from the system Locale.


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

Text direction is forced to LTR.


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

Text direction is forced to RTL.


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

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


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

This view is visible.


### Inherited fields

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

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


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

Indicates the view has no states set.


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

Indicates the view is enabled, focused and selected.


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

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


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

Indicates the view is enabled and has the focus.


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

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


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

Indicates the view is enabled and selected.


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

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


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

Indicates the view is enabled.


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

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


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

Indicates the view is focused and selected.


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

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


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

Indicates the view is focused.


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

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


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

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


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

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


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

Indicates the view is pressed, enabled and focused.


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

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


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

Indicates the view is pressed, enabled and selected.


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

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


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

Indicates the view is pressed and enabled.


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

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


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

Indicates the view is pressed, focused and selected.


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

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


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

Indicates the view is pressed and focused.


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

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


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

Indicates the view is pressed and selected.


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

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


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

Indicates the view is pressed.


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

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


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

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


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

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


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

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


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

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


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

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


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

Indicates the view is selected.


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

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


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

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


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

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


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

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


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

Indicates the view's window has focus.


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

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


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

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


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

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


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

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#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. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#addStatesFromChildren()() ` Returns whether this ViewGroup's drawable states also include its children's drawable states. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params) ` Adds a child view with the specified layout parameters. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, int index) ` Adds a child view. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View child, int index, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params) ` Adds a child view with the specified layout parameters. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)(https://developer.android.com/reference/android/view/View child) ` <br /> Adds a child view. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View,%20int,%20int)(https://developer.android.com/reference/android/view/View child, int width, int height) ` Adds a child view with this ViewGroup's default layout parameters and the specified width and height. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#bringChildToFront(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Change the z order of the child so it's on top of all other children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#childDrawableStateChanged(android.view.View)(https://developer.android.com/reference/android/view/View child) ` If `https://developer.android.com/reference/android/view/ViewGroup#addStatesFromChildren()` is true, refreshes this group's drawable state (to include the states from its children). |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#childHasTransientStateChanged(android.view.View,%20boolean)(https://developer.android.com/reference/android/view/View child, boolean childHasTransientState) ` Called when a child view has changed whether or not it is tracking transient state. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#clearChildFocus(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Called when a child of this parent is giving up focus |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#clearDisappearingChildren()() ` Removes any pending animations for views that have been removed. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#clearFocus()() ` Called when this view wants to give up focus. |
| ` https://developer.android.com/reference/android/view/WindowInsets` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#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. The implementation calls `https://developer.android.com/reference/android/view/ViewGroup#dispatchCreateViewTranslationRequest(java.util.Map<android.view.autofill.AutofillId,long[]>,%20int[],%20android.view.translation.TranslationCapability,%20java.util.List<android.view.translation.ViewTranslationRequest>)` for all the child views. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchDisplayHint(int)(int hint) ` Dispatch a hint about whether this view is displayed. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#dispatchDrawableHotspotChanged(float,%20float)(float x, float y) ` Dispatches drawable hotspot changes to child views that meet at least one of the following criteria: - Returns `false` from both `https://developer.android.com/reference/android/view/View#isClickable()` and `https://developer.android.com/reference/android/view/View#isLongClickable()` - Requests duplication of parent state via `https://developer.android.com/reference/android/view/View#setDuplicateParentStateEnabled(boolean)` <br /> |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#dispatchKeyShortcutEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event) ` Dispatches a key shortcut event. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchPointerCaptureChanged(boolean)(boolean hasCapture) ` |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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. This implementation adds in all child views of the view group, in addition to calling the default `https://developer.android.com/reference/android/view/View` implementation. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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) ` Handle the scroll capture search request by checking this view if applicable, then to each child view. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchSetActivated(boolean)(boolean activated) ` Dispatch setActivated to all of this View's children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchSetSelected(boolean)(boolean selected) ` Dispatch setSelected to all of this View's children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#dispatchSystemUiVisibilityChanged(int)(int visible) ` *This method is deprecated. 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/ViewGroup#dispatchTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent ev) ` 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/ViewGroup#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/ViewGroup#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/ViewGroup#dispatchWindowFocusChanged(boolean)(boolean hasFocus) ` Called when the window containing this view gains or loses window focus. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#dispatchWindowSystemUiVisiblityChanged(int)(int visible) ` *This method is deprecated. SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController` instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchWindowVisibilityChanged(int)(int visibility) ` Dispatch a window visibility change down the view hierarchy. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#endViewTransition(android.view.View)(https://developer.android.com/reference/android/view/View view) ` This method should always be called following an earlier call to `https://developer.android.com/reference/android/view/ViewGroup#startViewTransition(android.view.View)`. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/ViewGroup#findFocus()() ` Find the view in the hierarchy rooted at this view that currently has focus. |
| ` https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` | ` https://developer.android.com/reference/android/view/ViewGroup#findOnBackInvokedDispatcherForChild(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View requester) ` Walk up the View hierarchy to find the nearest `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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 text, int flags) ` Finds the Views that contain given text. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/ViewGroup#focusSearch(android.view.View,%20int)(https://developer.android.com/reference/android/view/View focused, int direction) ` Find the nearest view in the specified direction that wants to take focus. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#focusableViewAvailable(android.view.View)(https://developer.android.com/reference/android/view/View v) ` Tells the parent that a new focusable view has become available. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | ` https://developer.android.com/reference/android/view/ViewGroup#generateLayoutParams(android.util.AttributeSet)(https://developer.android.com/reference/android/util/AttributeSet attrs) ` Returns a new set of layout parameters based on the supplied attributes set. |
| ` https://developer.android.com/reference/java/lang/CharSequence` | ` https://developer.android.com/reference/android/view/ViewGroup#getAccessibilityClassName()() ` Return the class name of this object to be used for accessibility purposes. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)(int index) ` Returns the view at the specified position in the group. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildCount()() ` Returns the number of children in the group. |
| ` final int` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int)(int drawingPosition) ` Converts drawing order position to container position. |
| ` static int` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildMeasureSpec(int,%20int,%20int)(int spec, int padding, int childDimension) ` Does the hard part of measureChildren: figuring out the MeasureSpec to pass to a particular child. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildVisibleRect(android.view.View,%20android.graphics.Rect,%20android.graphics.Point)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect r, https://developer.android.com/reference/android/graphics/Point offset) ` Compute the visible part of a rectangular region defined in terms of a child view's coordinates. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#getClipChildren()() ` Returns whether this group's children are clipped to their bounds before drawing. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#getClipToPadding()() ` Returns whether this ViewGroup will clip its children to its padding, and resize (but not clip) any EdgeEffect to the padded region, if padding is present. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getDescendantFocusability()() ` Gets the descendant focusability of this view group. |
| ` https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/ViewGroup#getFocusedChild()() ` Returns the focused child of this view, if any. |
| ` https://developer.android.com/reference/android/view/animation/LayoutAnimationController` | ` https://developer.android.com/reference/android/view/ViewGroup#getLayoutAnimation()() ` Returns the layout animation controller used to animate the group's children. |
| ` https://developer.android.com/reference/android/view/animation/Animation.AnimationListener` | ` https://developer.android.com/reference/android/view/ViewGroup#getLayoutAnimationListener()() ` Returns the animation listener to which layout animation events are sent. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getLayoutMode()() ` Returns the basis of alignment during layout operations on this ViewGroup: either `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_CLIP_BOUNDS` or `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_OPTICAL_BOUNDS`. |
| ` https://developer.android.com/reference/android/animation/LayoutTransition` | ` https://developer.android.com/reference/android/view/ViewGroup#getLayoutTransition()() ` Gets the LayoutTransition object for this ViewGroup. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getNestedScrollAxes()() ` Return the current axes of nested scrolling for this ViewGroup. |
| ` https://developer.android.com/reference/android/view/ViewGroupOverlay` | ` https://developer.android.com/reference/android/view/ViewGroup#getOverlay()() ` Returns the ViewGroupOverlay for this view group, creating it if it does not yet exist. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getPersistentDrawingCache()() ` *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/ViewGroup#getTouchscreenBlocksFocus()() ` Check whether this ViewGroup should ignore focus requests for itself and its children. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#hasFocus()() ` Returns true if this view has or contains focus |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#indexOfChild(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Returns the position in the group of the specified child view. |
| ` final void` | ` https://developer.android.com/reference/android/view/ViewGroup#invalidateChild(android.view.View,%20android.graphics.Rect)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect dirty) ` *This method is deprecated. Use `https://developer.android.com/reference/android/view/ViewGroup#onDescendantInvalidated(android.view.View,%20android.view.View)` instead to observe updates to draw state in descendants.* |
| ` https://developer.android.com/reference/android/view/ViewParent` | ` https://developer.android.com/reference/android/view/ViewGroup#invalidateChildInParent(int[],%20android.graphics.Rect)(int[] location, https://developer.android.com/reference/android/graphics/Rect dirty) ` *This method is deprecated. Use `https://developer.android.com/reference/android/view/ViewGroup#onDescendantInvalidated(android.view.View,%20android.view.View)` instead to observe updates to draw state in descendants.* |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isAlwaysDrawnWithCacheEnabled()() ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Child views may no longer have their caching behavior disabled by parents.* |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isAnimationCacheEnabled()() ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Caching behavior of children may be controlled through `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`.* |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isLayoutSuppressed()() ` Returns whether layout calls on this container are currently being suppressed, due to an earlier call to `https://developer.android.com/reference/android/view/ViewGroup#suppressLayout(boolean)`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isMotionEventSplittingEnabled()() ` Returns true if MotionEvents dispatched to this ViewGroup can be split to multiple children. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()() ` Returns true if this ViewGroup should be considered as a single entity for removal when executing an Activity transition. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#jumpDrawablesToCurrentState()() ` Call `https://developer.android.com/reference/android/graphics/drawable/Drawable#jumpToCurrentState()` on all Drawable objects associated with this view. |
| ` final void` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#notifySubtreeAccessibilityStateChanged(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View source, int changeType) ` Notifies a view parent that the accessibility state of one of its descendants has changed and that the structure of the subtree is different. |
| ` final void` | ` https://developer.android.com/reference/android/view/ViewGroup#offsetDescendantRectToMyCoords(android.view.View,%20android.graphics.Rect)(https://developer.android.com/reference/android/view/View descendant, https://developer.android.com/reference/android/graphics/Rect rect) ` Offset a rectangle that is in a descendant's coordinate space into our coordinate space. |
| ` final void` | ` https://developer.android.com/reference/android/view/ViewGroup#offsetRectIntoDescendantCoords(android.view.View,%20android.graphics.Rect)(https://developer.android.com/reference/android/view/View descendant, https://developer.android.com/reference/android/graphics/Rect rect) ` Offset a rectangle that is in our coordinate space into an ancestor's coordinate space. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onDescendantInvalidated(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target) ` The target View has been invalidated, or has had a drawing property changed that requires the hierarchy to re-render. If you override this method you *must* call through to the superclass implementation. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onInterceptHoverEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Implement this method to intercept hover events before they are handled by child views. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onInterceptTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent ev) ` Implement this method to intercept all touch screen motion events. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedFling(android.view.View,%20float,%20float,%20boolean)(https://developer.android.com/reference/android/view/View target, float velocityX, float velocityY, boolean consumed) ` Request a fling from a nested scroll. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedPreFling(android.view.View,%20float,%20float)(https://developer.android.com/reference/android/view/View target, float velocityX, float velocityY) ` React to a nested fling before the target view consumes it. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedPrePerformAccessibilityAction(android.view.View,%20int,%20android.os.Bundle)(https://developer.android.com/reference/android/view/View target, int action, https://developer.android.com/reference/android/os/Bundle args) ` React to an accessibility action delegated by a target descendant view before the target processes it. Subclasses should always call `super.onNestedPrePerformAccessibilityAction` <br /> |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedPreScroll(android.view.View,%20int,%20int,%20int[])(https://developer.android.com/reference/android/view/View target, int dx, int dy, int[] consumed) ` React to a nested scroll in progress before the target view consumes a portion of the scroll. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedScroll(android.view.View,%20int,%20int,%20int,%20int)(https://developer.android.com/reference/android/view/View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed) ` React to a nested scroll in progress. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onNestedScrollAccepted(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target, int axes) ` React to the successful claiming of a nested scroll operation. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onRequestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event) ` Called when a child has requested sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and gives an opportunity to its parent to augment the event. |
| ` https://developer.android.com/reference/android/view/PointerIcon` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onStartNestedScroll(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target, int nestedScrollAxes) ` React to a descendant view initiating a nestable scroll operation, claiming the nested scroll operation if appropriate. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onStopNestedScroll(android.view.View)(https://developer.android.com/reference/android/view/View child) ` React to a nested scroll operation ending. The default implementation of onStopNestedScroll calls `https://developer.android.com/reference/android/view/View#stopNestedScroll()` to halt any recursive nested scrolling in progress. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onViewAdded(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Called when a new child is added to this ViewGroup. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onViewRemoved(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Called when a child view is removed from this ViewGroup. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#propagateRequestedFrameRate(float,%20boolean)(float frameRate, boolean forceOverride) ` You can set the preferred frame rate for a ViewGroup and its children 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. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#recomputeViewAttributes(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Tell view hierarchy that the global view attributes need to be re-evaluated. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeAllViews()() ` Call this method to remove all child views from the ViewGroup. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeAllViewsInLayout()() ` Called by a ViewGroup subclass to remove child views from itself, when it must first know its size on screen before it can calculate how many child views it will render. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeView(android.view.View)(https://developer.android.com/reference/android/view/View view) ` **Note:** do not invoke this method from `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeViewAt(int)(int index) ` Removes the view at the specified position in the group. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeViewInLayout(android.view.View)(https://developer.android.com/reference/android/view/View view) ` Removes a view during layout. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeViews(int,%20int)(int start, int count) ` Removes the specified range of views from the group. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeViewsInLayout(int,%20int)(int start, int count) ` Removes a range of views during layout. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#requestChildFocus(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View focused) ` Called when a child of this parent wants focus |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#requestChildRectangleOnScreen(android.view.View,%20android.graphics.Rect,%20boolean)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate) ` Called when a child of this group wants a particular rectangle to be positioned onto the screen. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#requestChildRectangleOnScreen(android.view.View,%20android.graphics.Rect,%20boolean,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate, int source) ` Called when a child of this group wants a particular rectangle to be positioned onto the screen. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#requestDisallowInterceptTouchEvent(boolean)(boolean disallowIntercept) ` Called when a child does not want this parent and its ancestors to intercept touch events with `https://developer.android.com/reference/android/view/ViewGroup#onInterceptTouchEvent(android.view.MotionEvent)`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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. Looks for a view to give focus to respecting the setting specified by `https://developer.android.com/reference/android/view/ViewGroup#getDescendantFocusability()`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event) ` Called by a child to request from its parent to send an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#requestTransparentRegion(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Called when a child wants the view hierarchy to gather and report transparent regions to the window compositor. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#scheduleLayoutAnimation()() ` Schedules the layout animation to be played after the next layout pass of this view group. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setAddStatesFromChildren(boolean)(boolean addsStates) ` Sets whether this ViewGroup's drawable states also include its children's drawable states. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setAlwaysDrawnWithCacheEnabled(boolean)(boolean always) ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Child views may no longer have their caching behavior disabled by parents.* |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setAnimationCacheEnabled(boolean)(boolean enabled) ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Caching behavior of children may be controlled through `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`.* |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setClipChildren(boolean)(boolean clipChildren) ` By default, children are clipped to their bounds before drawing. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setClipToPadding(boolean)(boolean clipToPadding) ` Sets whether this ViewGroup will clip its children to its padding and resize (but not clip) any EdgeEffect to the padded region, if padding is present. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setDescendantFocusability(int)(int focusability) ` Set the descendant focusability of this view group. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setLayoutAnimation(android.view.animation.LayoutAnimationController)(https://developer.android.com/reference/android/view/animation/LayoutAnimationController controller) ` Sets the layout animation controller used to animate the group's children after the first layout. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setLayoutAnimationListener(android.view.animation.Animation.AnimationListener)(https://developer.android.com/reference/android/view/animation/Animation.AnimationListener animationListener) ` Specifies the animation listener to which layout animation events must be sent. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)(int layoutMode) ` Sets the basis of alignment during the layout of this ViewGroup. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setLayoutTransition(android.animation.LayoutTransition)(https://developer.android.com/reference/android/animation/LayoutTransition transition) ` Sets the LayoutTransition object for this ViewGroup. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setMotionEventSplittingEnabled(boolean)(boolean split) ` Enable or disable the splitting of MotionEvents to multiple children during touch event dispatch. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setOnHierarchyChangeListener(android.view.ViewGroup.OnHierarchyChangeListener)(https://developer.android.com/reference/android/view/ViewGroup.OnHierarchyChangeListener listener) ` Register a callback to be invoked when a child is added to or removed from this view. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setPersistentDrawingCache(int)(int drawingCacheToKeep) ` *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/ViewGroup#setRequestedFrameRate(float)(float frameRate) ` You can set the preferred frame rate for a ViewGroup 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. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setTouchscreenBlocksFocus(boolean)(boolean touchscreenBlocksFocus) ` Set whether this ViewGroup should ignore focus requests for itself and its children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setTransitionGroup(boolean)(boolean isTransitionGroup) ` Changes whether or not this ViewGroup should be treated as a single entity during Activity Transitions. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#shouldDelayChildPressedState()() ` Return true if the pressed state should be delayed for children or descendants of this ViewGroup. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#showContextMenuForChild(android.view.View,%20float,%20float)(https://developer.android.com/reference/android/view/View originalView, float x, float y) ` Shows the context menu for the specified view or its ancestors anchored to the specified view-relative coordinate. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#showContextMenuForChild(android.view.View)(https://developer.android.com/reference/android/view/View originalView) ` Shows the context menu for the specified view or its ancestors. |
| ` https://developer.android.com/reference/android/view/ActionMode` | ` https://developer.android.com/reference/android/view/ViewGroup#startActionModeForChild(android.view.View,%20android.view.ActionMode.Callback,%20int)(https://developer.android.com/reference/android/view/View originalView, https://developer.android.com/reference/android/view/ActionMode.Callback callback, int type) ` Start an action mode of a specific type for the specified view. |
| ` https://developer.android.com/reference/android/view/ActionMode` | ` https://developer.android.com/reference/android/view/ViewGroup#startActionModeForChild(android.view.View,%20android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/View originalView, https://developer.android.com/reference/android/view/ActionMode.Callback callback) ` Start an action mode for the specified view with the default type `https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#startLayoutAnimation()() ` Runs the layout animation. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#startViewTransition(android.view.View)(https://developer.android.com/reference/android/view/View view) ` This method tells the ViewGroup that the given View object, which should have this ViewGroup as its parent, should be kept around (re-displayed when the ViewGroup draws its children) even if it is removed from its parent. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#suppressLayout(boolean)(boolean suppress) ` Tells this ViewGroup to suppress all layout() calls until layout suppression is disabled with a later call to suppressLayout(false). |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#updateViewLayout(android.view.View,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View view, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params) ` |

| ### Protected methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#addViewInLayout(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams,%20boolean)(https://developer.android.com/reference/android/view/View child, int index, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params, boolean preventRequestLayout) ` Adds a view during layout. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#addViewInLayout(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View child, int index, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params) ` Adds a view during layout. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#attachLayoutAnimationParameters(android.view.View,%20android.view.ViewGroup.LayoutParams,%20int,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params, int index, int count) ` Subclasses should override this method to set layout animation parameters on the supplied child. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View child, int index, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params) ` Attaches a view to this view group. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#canAnimate()() ` Indicates whether the view group has the ability to animate its children after the first layout. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#checkLayoutParams(android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams p) ` |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#cleanupLayoutState(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Prevents the specified child to be laid out during the next layout pass. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#debug(int)(int depth) ` |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()() ` Detaches all views from the parent. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)(int index) ` Detaches a view from its parent. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)(https://developer.android.com/reference/android/view/View child) ` Detaches a view from its parent. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#detachViewsFromParent(int,%20int)(int start, int count) ` Detaches a range of views from their parents. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas) ` Called by draw to draw the child views. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchFreezeSelfOnly(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container) ` Perform dispatching of a `https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)` freeze()} to only this view, not to its children. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#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/ViewGroup#dispatchSetPressed(boolean)(boolean pressed) ` Dispatch setPressed to all of this View's children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#dispatchThawSelfOnly(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container) ` Perform dispatching of a `https://developer.android.com/reference/android/view/View#restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>)` to only this view, not to its children. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#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. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#drawChild(android.graphics.Canvas,%20android.view.View,%20long)(https://developer.android.com/reference/android/graphics/Canvas canvas, https://developer.android.com/reference/android/view/View child, long drawingTime) ` Draw one child of this View Group. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#drawableStateChanged()() ` This function is called whenever the state of the view changes in such a way that it impacts the state of drawables being shown. |
| ` https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | ` https://developer.android.com/reference/android/view/ViewGroup#generateDefaultLayoutParams()() ` Returns a set of default layout parameters. |
| ` https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | ` https://developer.android.com/reference/android/view/ViewGroup#generateLayoutParams(android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams p) ` Returns a safe set of layout parameters based on the supplied layout params. |
| ` int` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)(int childCount, int drawingPosition) ` Converts drawing order position to container position. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#getChildStaticTransformation(android.view.View,%20android.view.animation.Transformation)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/animation/Transformation t) ` Sets `t` to be the static transformation of the child, if set, returning a boolean to indicate whether a static transform was set. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isChildrenDrawingOrderEnabled()() ` Indicates whether the ViewGroup is drawing its children in the order defined by `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#isChildrenDrawnWithCacheEnabled()() ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Child views may no longer be forced to cache their rendering state by their parents. Use `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` on individual Views instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#measureChild(android.view.View,%20int,%20int)(https://developer.android.com/reference/android/view/View child, int parentWidthMeasureSpec, int parentHeightMeasureSpec) ` Ask one of the children of this view to measure itself, taking into account both the MeasureSpec requirements for this view and its padding. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#measureChildWithMargins(android.view.View,%20int,%20int,%20int,%20int)(https://developer.android.com/reference/android/view/View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed) ` Ask one of the children of this view to measure itself, taking into account both the MeasureSpec requirements for this view and its padding and margins. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#measureChildren(int,%20int)(int widthMeasureSpec, int heightMeasureSpec) ` Ask all of the children of this view to measure themselves, taking into account both the MeasureSpec requirements for this view and its padding. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#onAttachedToWindow()() ` This is called when the view is attached to a window. |
| ` int[]` | ` https://developer.android.com/reference/android/view/ViewGroup#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/ViewGroup#onDetachedFromWindow()() ` This is called when the view is detached from a window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/ViewGroup#onLayout(boolean,%20int,%20int,%20int,%20int)(boolean changed, int l, int t, int r, int b) ` Called from layout when this view should assign a size and position to each of its children. |
| ` boolean` | ` https://developer.android.com/reference/android/view/ViewGroup#onRequestFocusInDescendants(int,%20android.graphics.Rect)(int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect) ` Look for a descendant to call `https://developer.android.com/reference/android/view/View#requestFocus()` on. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)(https://developer.android.com/reference/android/view/View child, boolean animate) ` Finishes the removal of a detached view. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingCacheEnabled(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/ViewGroup#setChildrenDrawingOrderEnabled(boolean)(boolean enabled) ` Tells the ViewGroup whether to draw its children in the order defined by the method `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`. |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawnWithCacheEnabled(boolean)(boolean enabled) ` *This method was deprecated in API level 23. As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored. Child views may no longer be forced to cache their rendering state by their parents. Use `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` on individual Views instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/ViewGroup#setStaticTransformationsEnabled(boolean)(boolean enabled) ` When this property is set to true, this ViewGroup supports static transformations on children; this causes `https://developer.android.com/reference/android/view/ViewGroup#getChildStaticTransformation(android.view.View,%20android.view.animation.Transformation)` to be invoked when a child is drawn. |

### Inherited methods

From class `

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

` `


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Add a listener for attach state changes.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

<br />


Trigger the scrollbars to draw.


`


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

<br />


Trigger the scrollbars to draw.


`


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

<br />

Trigger the scrollbars to draw.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Directly call any attached OnClickListener.


`


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

Check if layout direction resolution can be done.


`


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

Check if text alignment resolution can be done.


`


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

Check if text direction resolution can be done.


`


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

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


`


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

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


`


final

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

Cancels an ongoing drag and drop operation.


`


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

Cancels a pending long press.


`


final

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

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


`


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

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


`


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

Cancels any animations for this view.


`


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

Called when this view wants to give up focus.


`


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

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


`


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

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


`


static


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

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


`


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

<br />

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


`


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

<br />

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


`


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

<br />

Compute the horizontal range that the horizontal scrollbar
represents.


`


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

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


`


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

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


`


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

<br />

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


`


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

<br />

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


`


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

<br />

Compute the vertical range that the vertical scrollbar represents.


`


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

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


`


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

Show the context menu for this view.


`


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

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


`


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

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


`


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

Pass a captured pointer event down to the focused view.


`


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

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


`


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

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


`


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

Dispatch a hint about whether this view is displayed.


`


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

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


`


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

Called by draw to draw the child views.


`


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

Dispatches drawableHotspotChanged to all of this View's children.


`


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

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


`


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

Dispatch a generic motion event to the currently focused view.


`


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

Dispatch a generic motion event.


`


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

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


`


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

Dispatch a hover event.


`


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

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


`


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

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


`


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

Dispatches a key shortcut event.


`


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

Dispatch a fling to a nested scrolling parent.


`


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

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


`


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

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


`


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

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


`


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

Dispatch one step of a nested scroll in progress.


`


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


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Dispatch a scroll capture search request down the view hierarchy.


`


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

Dispatch setActivated to all of this View's children.


`


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

Dispatch setPressed to all of this View's children.


`


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

Dispatch setSelected to all of this View's children.


`


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

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


`


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

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


`


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

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


`


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

Pass a trackball motion event down to the focused view.


`


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

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


`


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

Dispatch a view visibility change down the view hierarchy.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Dispatch a window visibility change down the view hierarchy.


`


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

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


`


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

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


`


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

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


`


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

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


`


final

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

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


`


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

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


`


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

Look for a child view with the given tag.


`


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

Finds the Views that contain given text.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


static


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

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


`


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

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


`


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

Returns the delegate for implementing accessibility support via
composition.


`


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

Gets the live region mode for this View.


`


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

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


`


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

Get the title of the pane for purposes of accessibility.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

The opacity of the view.


`


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

Get the animation currently associated with this view.


`


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

Return the current transformation matrix of the view.


`


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

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


`


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

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


`


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

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


`


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

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


`


final

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

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


`


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

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


`


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

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


`


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

Gets the background drawable


`


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

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


`


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

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


`


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

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


`


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

<br />

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


`


final

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

Bottom position of this view relative to its parent.


`


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

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


`


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

Amount by which to extend the bottom fading region.


`


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

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


`


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

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


`


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

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


`


final

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

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


`


final

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

Gets the session used to notify content capture events.


`


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

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


`


final

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

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


`


final

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

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


`


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

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


`


final

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

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


`


static


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

Utility to return a default size.


`


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

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


`


final

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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Return the visible drawing bounds of your view.


`


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

<br />

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Returns the focusable setting for this view.


`


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

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


`


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

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


`


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

Returns the drawable used as the foreground of this View.


`


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

Describes how the foreground is positioned.


`


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

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


`


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

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


`


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

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


`


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

Get the current velocity of the View.


`


final

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

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


`


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

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


`


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


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


final

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

Returns the value for overlapping rendering that is used internally.


`


final

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

Return the height of your view.


`


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

Hit rectangle in parent's coordinates


`


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

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


`


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

Returns the height of the horizontal scrollbar.


`


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

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


`


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

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


`


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

Returns this view's identifier.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Returns the resolved layout direction for this view.


`


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

Get the LayoutParams associated with this view.


`


final

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

Left position of this view relative to its parent.


`


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

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


`


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

Amount by which to extend the left fading region.


`


final

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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


final

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

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


`


final

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

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


`


final

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

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


`


final

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

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


`


final

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

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


`


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

Returns the minimum height of the view.


`


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

Returns the minimum width of the view.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Returns the focus-change callback registered for this view.


`


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


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

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


`


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


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

Returns the over-scroll mode for this view.


`


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

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


`


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

Returns the bottom padding of this view.


`


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

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


`


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

Returns the left padding of this view.


`


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

Returns the right padding of this view.


`


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

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


`


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

Returns the top padding of this view.


`


final

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

Gets the parent of this view.


`


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

Gets the parent for accessibility purposes.


`


final

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

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


`


final

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

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


`


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

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


`


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

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


`


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

Gets the mouse pointer icon for the current view.


`


final

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


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

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


`


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

Get the current preferred frame rate of the View.


`


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

Returns the resources associated with this view.


`


final

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

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


`


final

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

Right position of this view relative to its parent.


`


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

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


`


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

Amount by which to extend the right fading region.


`


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

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


`


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

<br />

Finds the topmost view in the current view hierarchy.


`


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

Provide original WindowInsets that are dispatched to the view hierarchy.


`


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

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


`


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

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


`


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

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


`


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

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


`


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

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


`


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

Returns the delay before scrollbars fade.


`


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

Returns the scrollbar fade duration.


`


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

Returns the scrollbar size.


`


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

<br />

Returns the current scrollbar style.


`


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

Returns the current scroll capture hint for this view.


`


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

Returns a bitmask representing the enabled scroll indicators.


`


final

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

Return the scrolled left position of this view.


`


final

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

Return the scrolled top position of this view.


`


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

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


`


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

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


`


final

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

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


`


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

Returns the current StateListAnimator if exists.


`


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

Returns the suggested minimum height that the view should use.


`


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

Returns the suggested minimum width that the view should use.


`


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

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


`


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

Retrieve the list of areas within this view's post-layout coordinate space where the system
should not intercept touch or other pointing device gestures.


`


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

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


`


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

Returns this view's tag.


`


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/android/view/View#getTag(int)(int key)
`

Returns the tag associated with this view and the specified key.


`


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

Return the resolved text alignment.


`


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

Return the resolved text direction.


`


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

Returns the view's tooltip text.


`


final

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

Top position of this view relative to its parent.


`


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

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


`


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

Amount by which to extend the top fading region.


`


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

Gets the TouchDelegate for this View.


`


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

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


`


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

This property is intended only for use by the Fade transition, which animates
it to produce a visual translucency that does not side-effect (or get affected
by) the real alpha property.


`


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

Returns the name of the View to be used to identify Views in Transitions.


`


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

The horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.


`


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

The vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.


`


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

The depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.


`


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

Get the identifier used for this view by the drawing system.


`


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

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


`


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


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

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


`


https://developer.android.com/reference/android/graphics/drawable/Drawable` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarTrackDrawable()()
`

Returns the currently configured Drawable for the track of the vertical scroll bar if it
exists, null otherwise.


`


int` `
https://developer.android.com/reference/android/view/View#getVerticalScrollbarWidth()()
`

Returns the width of the vertical scrollbar.


`


https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` `
https://developer.android.com/reference/android/view/View#getViewTranslationResponse()()
`

Returns the `https://developer.android.com/reference/android/view/translation/ViewTranslationResponse` associated with this view.


`


https://developer.android.com/reference/android/view/ViewTreeObserver` `
https://developer.android.com/reference/android/view/View#getViewTreeObserver()()
`

Returns the ViewTreeObserver for this view's hierarchy.


`


int` `
https://developer.android.com/reference/android/view/View#getVisibility()()
`

Returns the visibility status for this view.


`


final

int` `
https://developer.android.com/reference/android/view/View#getWidth()()
`

Return the width of your view.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowAttachCount()()
` `


https://developer.android.com/reference/android/view/WindowId` `
https://developer.android.com/reference/android/view/View#getWindowId()()
`

Retrieve the `https://developer.android.com/reference/android/view/WindowId` for the window this view is
currently attached to.


`


https://developer.android.com/reference/android/view/WindowInsetsController` `
https://developer.android.com/reference/android/view/View#getWindowInsetsController()()
`

Retrieves the single `https://developer.android.com/reference/android/view/WindowInsetsController` of the window this view is attached to.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowSystemUiVisibility()()
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


https://developer.android.com/reference/android/os/IBinder` `
https://developer.android.com/reference/android/view/View#getWindowToken()()
`

Retrieve a unique token identifying the window this view is attached to.


`


int` `
https://developer.android.com/reference/android/view/View#getWindowVisibility()()
`

Returns the current visibility of the window this view is attached to
(either `https://developer.android.com/reference/android/view/View#GONE`, `https://developer.android.com/reference/android/view/View#INVISIBLE`, or `https://developer.android.com/reference/android/view/View#VISIBLE`).


`


void` `
https://developer.android.com/reference/android/view/View#getWindowVisibleDisplayFrame(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect outRect)
`

Retrieve the overall visible display size in which the window this view is
attached to has been positioned in.


`


float` `
https://developer.android.com/reference/android/view/View#getX()()
`

The visual x position of this view, in pixels.


`


float` `
https://developer.android.com/reference/android/view/View#getY()()
`

The visual y position of this view, in pixels.


`


float` `
https://developer.android.com/reference/android/view/View#getZ()()
`

The visual z position of this view, in pixels.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasExplicitFocusable()()
`

Returns true if this view is focusable or if it contains a reachable View
for which `https://developer.android.com/reference/android/view/View#hasExplicitFocusable()` returns `true`.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasFocus()()
`

Returns true if this view has focus itself, or is the ancestor of the
view that has focus.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasFocusable()()
`

Returns true if this view is focusable or if it contains a reachable View
for which `https://developer.android.com/reference/android/view/View#hasFocusable()` returns `true`.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasNestedScrollingParent()()
`

Returns true if this view has a nested scrolling parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOnClickListeners()()
`

Return whether this view has an attached OnClickListener.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOnLongClickListeners()()
`

Return whether this view has an attached OnLongClickListener.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasOverlappingRendering()()
`

Returns whether this View has content which overlaps.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasPointerCapture()()
`

Checks pointer capture status.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasTransientState()()
`

Indicates whether the view is currently tracking transient state that the
app should not need to concern itself with saving and restoring, but that
the framework should take special note to preserve when possible.


`


boolean` `
https://developer.android.com/reference/android/view/View#hasWindowFocus()()
`

Returns true if this view is in a window that currently has window focus.


`


static


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#inflate(android.content.Context,%20int,%20android.view.ViewGroup)(https://developer.android.com/reference/android/content/Context context, int resource, https://developer.android.com/reference/android/view/ViewGroup root)
`

Inflate a view from an XML resource.


`


void` `
https://developer.android.com/reference/android/view/View#invalidate()()
`

Invalidate the whole view.


`


void` `
https://developer.android.com/reference/android/view/View#invalidate(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect dirty)
`

*This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call `https://developer.android.com/reference/android/view/View#invalidate()`.*


`


void` `
https://developer.android.com/reference/android/view/View#invalidate(int,%20int,%20int,%20int)(int l, int t, int r, int b)
`

*This method was deprecated
in API level 28.
The switch to hardware accelerated rendering in API 14 reduced
the importance of the dirty rectangle. In API 21 the given rectangle is
ignored entirely in favor of an internally-calculated area instead.
Because of this, clients are encouraged to just call `https://developer.android.com/reference/android/view/View#invalidate()`.*


`


void` `
https://developer.android.com/reference/android/view/View#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Invalidates the specified Drawable.


`


void` `
https://developer.android.com/reference/android/view/View#invalidateOutline()()
`

Called to rebuild this View's Outline from its `https://developer.android.com/reference/android/view/ViewOutlineProvider`


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityDataSensitive()()
`

Whether this view should restrict accessibility service access only to services that have the
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property
set to true.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityFocused()()
`

Returns whether this View is accessibility focused.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAccessibilityHeading()()
`

Gets whether this view is a heading for accessibility purposes.


`


boolean` `
https://developer.android.com/reference/android/view/View#isActivated()()
`

Indicates the activation state of this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAttachedToWindow()()
`

Returns true if this view is currently attached to a window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isAutoHandwritingEnabled()()
`

Return whether the View allows automatic handwriting initiation.


`


boolean` `
https://developer.android.com/reference/android/view/View#isClickable()()
`

Indicates whether this view reacts to click events or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isContentCaptureSelfReportingEnabled()()
`

Returns whether this View automatically reports its lifecycle events and layout bounds
to the Content Capture Version 2.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isContentSensitive()()
`

Returns whether this view displays sensitive content, based
on the value explicitly set by `https://developer.android.com/reference/android/view/View#setContentSensitivity(int)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isContextClickable()()
`

Indicates whether this view reacts to context clicks or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isCredential()()
`

*This method was deprecated
in API level 37.
The `https://developer.android.com/reference/android/view/View#isCredential()` is no longer used by the system and is not
recommended for use by apps. The purpose and usage expectations of this property were
never clearly defined.*


`


boolean` `
https://developer.android.com/reference/android/view/View#isDirty()()
`

True if this view has changed since the last time being drawn.


`


boolean` `
https://developer.android.com/reference/android/view/View#isDrawingCacheEnabled()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


boolean` `
https://developer.android.com/reference/android/view/View#isDuplicateParentStateEnabled()()
`

<br />

Indicates whether this duplicates its drawable state from its parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#isEnabled()()
`

Returns the enabled status for this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusable()()
`

Returns whether this View is currently able to take focus.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusableInTouchMode()()
`

When a view is focusable, it may not want to take focus when in touch mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#isFocused()()
`

Returns true if this view has focus


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isFocusedByDefault()()
`

Returns whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isForceDarkAllowed()()
`

See `https://developer.android.com/reference/android/view/View#setForceDarkAllowed(boolean)`


`


boolean` `
https://developer.android.com/reference/android/view/View#isHandwritingDelegate()()
`

Returns whether this view has been set as a handwriting delegate by `https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHapticFeedbackEnabled()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isHardwareAccelerated()()
`

<br />

Indicates whether this view is attached to a hardware accelerated
window or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHorizontalFadingEdgeEnabled()()
`

<br />

Indicate whether the horizontal edges are faded when the view is
scrolled horizontally.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHorizontalScrollBarEnabled()()
`

<br />

Indicate whether the horizontal scrollbar should be drawn or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isHovered()()
`

Returns true if the view is currently hovered.


`


boolean` `
https://developer.android.com/reference/android/view/View#isImportantForAccessibility()()
`

Computes whether this view should be exposed for accessibility.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isImportantForAutofill()()
`

Hints the Android System whether the `https://developer.android.com/reference/android/app/assist/AssistStructure.ViewNode`
associated with this view is considered important for autofill purposes.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isImportantForContentCapture()()
`

Hints the Android System whether this view is considered important for content capture, based
on the value explicitly set by `https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)` and heuristics
when it's `https://developer.android.com/reference/android/view/View#IMPORTANT_FOR_CONTENT_CAPTURE_AUTO`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInEditMode()()
`

Indicates whether this View is currently in edit mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInLayout()()
`

Returns whether the view hierarchy is currently undergoing a layout pass.


`


boolean` `
https://developer.android.com/reference/android/view/View#isInTouchMode()()
`

Returns the touch mode state associated with this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isKeyboardNavigationCluster()()
`

Returns whether this View is a root of a keyboard navigation cluster.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLaidOut()()
`

Returns true if this view has been through at least one layout since it
was last attached to or detached from a window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLayoutDirectionResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isLayoutRequested()()
`

<br />

Indicates whether or not this view's layout will be requested during
the next hierarchy layout pass.


`


boolean` `
https://developer.android.com/reference/android/view/View#isLongClickable()()
`

Indicates whether this view reacts to long click events or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isNestedScrollingEnabled()()
`

Returns true if nested scrolling is enabled for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#isOpaque()()
`

Indicates whether this View is opaque.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPaddingOffsetRequired()()
`

If the View draws content inside its padding and enables fading edges,
it needs to support padding offsets.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPaddingRelative()()
`

Return if the padding has been set through relative values
`https://developer.android.com/reference/android/view/View#setPaddingRelative(int,%20int,%20int,%20int)` or through


`


boolean` `
https://developer.android.com/reference/android/view/View#isPivotSet()()
`

Returns whether or not a pivot has been set by a call to `https://developer.android.com/reference/android/view/View#setPivotX(float)` or
`https://developer.android.com/reference/android/view/View#setPivotY(float)`.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isPreferKeepClear()()
`

Retrieve the preference for this view to be kept clear.


`


boolean` `
https://developer.android.com/reference/android/view/View#isPressed()()
`

Indicates whether the view is currently in pressed state.


`


boolean` `
https://developer.android.com/reference/android/view/View#isSaveEnabled()()
`

Indicates whether this view will save its state (that is,
whether its `https://developer.android.com/reference/android/view/View#onSaveInstanceState()` method will be called).


`


boolean` `
https://developer.android.com/reference/android/view/View#isSaveFromParentEnabled()()
`

Indicates whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScreenReaderFocusable()()
`

Returns whether the view should be treated as a focusable unit by screen reader
accessibility tools.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScrollContainer()()
`

Indicates whether this view is one of the set of scrollable containers in
its window.


`


boolean` `
https://developer.android.com/reference/android/view/View#isScrollbarFadingEnabled()()
`

Returns true if scrollbars will fade when this view is not scrolling


`


boolean` `
https://developer.android.com/reference/android/view/View#isSelected()()
`

Indicates the selection state of this view.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#isShowingLayoutBounds()()
`

Returns `true` when the View is attached and the system developer setting to show
the layout bounds is enabled or `false` otherwise.


`


boolean` `
https://developer.android.com/reference/android/view/View#isShown()()
`

Returns the visibility of this view and all of its ancestors


`


boolean` `
https://developer.android.com/reference/android/view/View#isSoundEffectsEnabled()()
` `


final

boolean` `
https://developer.android.com/reference/android/view/View#isTemporarilyDetached()()
`

Tells whether the `https://developer.android.com/reference/android/view/View` is in the state between `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()`
and `https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()`.


`


boolean` `
https://developer.android.com/reference/android/view/View#isTextAlignmentResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isTextDirectionResolved()()
` `


boolean` `
https://developer.android.com/reference/android/view/View#isVerticalFadingEdgeEnabled()()
`

<br />

Indicate whether the vertical edges are faded when the view is
scrolled horizontally.


`


boolean` `
https://developer.android.com/reference/android/view/View#isVerticalScrollBarEnabled()()
`

<br />

Indicate whether the vertical scrollbar should be drawn or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#isVisibleToUserForAutofill(int)(int virtualId)
`

Computes whether this virtual autofill view is visible to the user.


`


void` `
https://developer.android.com/reference/android/view/View#jumpDrawablesToCurrentState()()
`

Call `https://developer.android.com/reference/android/graphics/drawable/Drawable#jumpToCurrentState()`
on all Drawable objects associated with this view.


`


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/View#keyboardNavigationClusterSearch(android.view.View,%20int)(https://developer.android.com/reference/android/view/View currentCluster, int direction)
`

Find the nearest keyboard navigation cluster in the specified direction.


`


void` `
https://developer.android.com/reference/android/view/View#layout(int,%20int,%20int,%20int)(int l, int t, int r, int b)
`

Assign a size and position to a view and all of its
descendants

This is the second phase of the layout mechanism.


`


final

void` `
https://developer.android.com/reference/android/view/View#measure(int,%20int)(int widthMeasureSpec, int heightMeasureSpec)
`

<br />


This is called to find out how big a view should be.


`


static


int[]` `
https://developer.android.com/reference/android/view/View#mergeDrawableStates(int[],%20int[])(int[] baseState, int[] additionalState)
`

Merge your own state values in <var translate="no">additionalState</var> into the base
state values <var translate="no">baseState</var> that were returned by
`https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)`.


`


void` `
https://developer.android.com/reference/android/view/View#offsetLeftAndRight(int)(int offset)
`

Offset this view's horizontal location by the specified amount of pixels.


`


void` `
https://developer.android.com/reference/android/view/View#offsetTopAndBottom(int)(int offset)
`

Offset this view's vertical location by the specified number of pixels.


`


void` `
https://developer.android.com/reference/android/view/View#onAnimationEnd()()
`

Invoked by a parent ViewGroup to notify the end of the animation
currently associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#onAnimationStart()()
`

Invoked by a parent ViewGroup to notify the start of the animation
currently associated with this view.


`


https://developer.android.com/reference/android/view/WindowInsets` `
https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)(https://developer.android.com/reference/android/view/WindowInsets insets)
`

Called when the view should apply `https://developer.android.com/reference/android/view/WindowInsets` according to its internal policy.


`


void` `
https://developer.android.com/reference/android/view/View#onAttachedToWindow()()
`

This is called when the view is attached to a window.


`


void` `
https://developer.android.com/reference/android/view/View#onCancelPendingInputEvents()()
`

Called as the result of a call to `https://developer.android.com/reference/android/view/View#cancelPendingInputEvents()` on this view or
a parent view.


`


boolean` `
https://developer.android.com/reference/android/view/View#onCapturedPointerEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle captured pointer events


`


boolean` `
https://developer.android.com/reference/android/view/View#onCheckIsTextEditor()()
`

Check whether the called view is a text editor, in which case it
would make sense to automatically display a soft input window for
it.


`


void` `
https://developer.android.com/reference/android/view/View#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig)
`

Called when the current configuration of the resources being used
by the application have changed.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateContextMenu(android.view.ContextMenu)(https://developer.android.com/reference/android/view/ContextMenu menu)
`

Views should implement this if the view itself is going to add items to
the context menu.


`


int[]` `
https://developer.android.com/reference/android/view/View#onCreateDrawableState(int)(int extraSpace)
`

Generate the new `https://developer.android.com/reference/android/graphics/drawable/Drawable` state for
this view.


`


https://developer.android.com/reference/android/view/inputmethod/InputConnection` `
https://developer.android.com/reference/android/view/View#onCreateInputConnection(android.view.inputmethod.EditorInfo)(https://developer.android.com/reference/android/view/inputmethod/EditorInfo outAttrs)
`

Create a new InputConnection for an InputMethod to interact
with the view.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)(int[] supportedFormats, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requestsCollector)
`

Collects a `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest` which represents the content to be translated in
the view.


`


void` `
https://developer.android.com/reference/android/view/View#onCreateVirtualViewTranslationRequests(long[],%20int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)(long[] virtualIds, int[] supportedFormats, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/translation/ViewTranslationRequest> requestsCollector)
`

Collects `https://developer.android.com/reference/android/view/translation/ViewTranslationRequest`s which represents the content to be translated
for the virtual views in the host view.


`


void` `
https://developer.android.com/reference/android/view/View#onDetachedFromWindow()()
`

This is called when the view is detached from a window.


`


void` `
https://developer.android.com/reference/android/view/View#onDisplayHint(int)(int hint)
`

Gives this view a hint about whether is displayed or not.


`


boolean` `
https://developer.android.com/reference/android/view/View#onDragEvent(android.view.DragEvent)(https://developer.android.com/reference/android/view/DragEvent event)
`

Handles drag events sent by the system following a call to
`https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)`.


`


void` `
https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Implement this to do your drawing.


`


void` `
https://developer.android.com/reference/android/view/View#onDrawForeground(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

Draw any foreground content for this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#onDrawScrollBars(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas canvas)
`

<br />

Request the drawing of the horizontal and the vertical scrollbar.


`


boolean` `
https://developer.android.com/reference/android/view/View#onFilterTouchEventForSecurity(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Filter the touch event to apply security policies.


`


void` `
https://developer.android.com/reference/android/view/View#onFinishInflate()()
`

Finalize inflating a view from XML.


`


void` `
https://developer.android.com/reference/android/view/View#onFinishTemporaryDetach()()
`

Called after `https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()` when the container is done
changing the view.


`


void` `
https://developer.android.com/reference/android/view/View#onFocusChanged(boolean,%20int,%20android.graphics.Rect)(boolean gainFocus, int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect)
`

Called by the view system when the focus state of this view changes.


`


boolean` `
https://developer.android.com/reference/android/view/View#onGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle generic motion events.


`


void` `
https://developer.android.com/reference/android/view/View#onHoverChanged(boolean)(boolean hovered)
`

Implement this method to handle hover state changes.


`


boolean` `
https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle hover events.


`


void` `
https://developer.android.com/reference/android/view/View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` with information about
this View which is the event source.


`


void` `
https://developer.android.com/reference/android/view/View#onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo)(https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo info)
`

Initializes an `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` with information about this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)`: perform press of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER` or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
is released, if the view is enabled and clickable.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)`: always returns false (doesn't handle
the event).


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int repeatCount, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)`: always returns false (doesn't handle
the event).


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyPreIme(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Handle a key event before it is processed by any input method
associated with the view hierarchy.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyShortcut(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called on the focused view when a key shortcut event is not handled.


`


boolean` `
https://developer.android.com/reference/android/view/View#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Default implementation of `https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)`: perform clicking of the view
when `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_DPAD_CENTER`, `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_ENTER`
or `https://developer.android.com/reference/android/view/KeyEvent#KEYCODE_SPACE` is released.


`


void` `
https://developer.android.com/reference/android/view/View#onLayout(boolean,%20int,%20int,%20int,%20int)(boolean changed, int left, int top, int right, int bottom)
`

Called from layout when this view should
assign a size and position to each of its children.


`


void` `
https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)(int widthMeasureSpec, int heightMeasureSpec)
`

<br />


Measure the view and its content to determine the measured width and the
measured height.


`


void` `
https://developer.android.com/reference/android/view/View#onOverScrolled(int,%20int,%20boolean,%20boolean)(int scrollX, int scrollY, boolean clampedX, boolean clampedY)
`

Called by `https://developer.android.com/reference/android/view/View#overScrollBy(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20boolean)` to
respond to the results of an over-scroll operation.


`


void` `
https://developer.android.com/reference/android/view/View#onPointerCaptureChange(boolean)(boolean hasCapture)
`

Called when the window has just acquired or lost pointer capture.


`


void` `
https://developer.android.com/reference/android/view/View#onPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Called from `https://developer.android.com/reference/android/view/View#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)`
giving a chance to this View to populate the accessibility event with its
text content.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideAutofillStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` to fullfil an autofill request.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideAutofillVirtualStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` containing virtual children to fullfil an autofill
request.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideContentCaptureNodeProperties(android.view.contentcapture.ContentCaptureNodeProperties)(https://developer.android.com/reference/android/view/contentcapture/ContentCaptureNodeProperties properties)
`

Populates the properties of this `https://developer.android.com/reference/android/view/View` for Content Capture version 2.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideContentCaptureStructure(android.view.ViewStructure,%20int)(https://developer.android.com/reference/android/view/ViewStructure structure, int flags)
`

Populates a `https://developer.android.com/reference/android/view/ViewStructure` for content capture.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideStructure(android.view.ViewStructure)(https://developer.android.com/reference/android/view/ViewStructure structure)
`

Called when assist structure is being retrieved from a view as part of
`https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)`.


`


void` `
https://developer.android.com/reference/android/view/View#onProvideVirtualStructure(android.view.ViewStructure)(https://developer.android.com/reference/android/view/ViewStructure structure)
`

Called when assist structure is being retrieved from a view as part of
`https://developer.android.com/reference/android/app/Activity#onProvideAssistData(android.os.Bundle)` to
generate additional virtual structure under this view.


`


https://developer.android.com/reference/android/view/ContentInfo` `
https://developer.android.com/reference/android/view/View#onReceiveContent(android.view.ContentInfo)(https://developer.android.com/reference/android/view/ContentInfo payload)
`

Implements the default behavior for receiving content for this type of view.


`


https://developer.android.com/reference/android/view/PointerIcon` `
https://developer.android.com/reference/android/view/View#onResolvePointerIcon(android.view.MotionEvent,%20int)(https://developer.android.com/reference/android/view/MotionEvent event, int pointerIndex)
`

Resolve the pointer icon that should be used for specified pointer in the motion event.


`


void` `
https://developer.android.com/reference/android/view/View#onRestoreInstanceState(android.os.Parcelable)(https://developer.android.com/reference/android/os/Parcelable state)
`

Hook allowing a view to re-apply a representation of its internal state that had previously
been generated by `https://developer.android.com/reference/android/view/View#onSaveInstanceState()`.


`


void` `
https://developer.android.com/reference/android/view/View#onRtlPropertiesChanged(int)(int layoutDirection)
`

Called when any RTL property (layout direction or text direction or text alignment) has
been changed.


`


https://developer.android.com/reference/android/os/Parcelable` `
https://developer.android.com/reference/android/view/View#onSaveInstanceState()()
`

Hook allowing a view to generate a representation of its internal state
that can later be used to create a new instance with that same state.


`


void` `
https://developer.android.com/reference/android/view/View#onScreenStateChanged(int)(int screenState)
`

This method is called whenever the state of the screen this view is
attached to changes.


`


void` `
https://developer.android.com/reference/android/view/View#onScrollCaptureSearch(android.graphics.Rect,%20android.graphics.Point,%20java.util.function.Consumer<android.view.ScrollCaptureTarget>)(https://developer.android.com/reference/android/graphics/Rect localVisibleRect, https://developer.android.com/reference/android/graphics/Point windowOffset, https://developer.android.com/reference/java/util/function/Consumer<https://developer.android.com/reference/android/view/ScrollCaptureTarget> targets)
`

Called when scroll capture is requested, to search for appropriate content to scroll.


`


void` `
https://developer.android.com/reference/android/view/View#onScrollChanged(int,%20int,%20int,%20int)(int l, int t, int oldl, int oldt)
`

This is called in response to an internal scroll in this view (i.e., the
view scrolled its own contents).


`


boolean` `
https://developer.android.com/reference/android/view/View#onSetAlpha(int)(int alpha)
`

Invoked if there is a Transform that involves alpha.


`


void` `
https://developer.android.com/reference/android/view/View#onSizeChanged(int,%20int,%20int,%20int)(int w, int h, int oldw, int oldh)
`

This is called during layout when the size of this view has changed.


`


void` `
https://developer.android.com/reference/android/view/View#onStartTemporaryDetach()()
`

This is called when a container is going to temporarily detach a child, with
`https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`.


`


boolean` `
https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle pointer events.


`


boolean` `
https://developer.android.com/reference/android/view/View#onTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Implement this method to handle trackball motion events.


`


void` `
https://developer.android.com/reference/android/view/View#onViewTranslationResponse(android.view.translation.ViewTranslationResponse)(https://developer.android.com/reference/android/view/translation/ViewTranslationResponse response)
`

Called when the content from `https://developer.android.com/reference/android/view/View#onCreateViewTranslationRequest(int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` had been translated
by the TranslationService.


`


void` `
https://developer.android.com/reference/android/view/View#onVirtualViewTranslationResponses(android.util.LongSparseArray<android.view.translation.ViewTranslationResponse>)(https://developer.android.com/reference/android/util/LongSparseArray<https://developer.android.com/reference/android/view/translation/ViewTranslationResponse> response)
`

Called when the content from `https://developer.android.com/reference/android/view/View#onCreateVirtualViewTranslationRequests(long[],%20int[],%20java.util.function.Consumer<android.view.translation.ViewTranslationRequest>)` had been
translated by the TranslationService.


`


void` `
https://developer.android.com/reference/android/view/View#onVisibilityAggregated(boolean)(boolean isVisible)
`

Called when the user-visibility of this View is potentially affected by a change
to this view itself, an ancestor view or the window this view is attached to.


`


void` `
https://developer.android.com/reference/android/view/View#onVisibilityChanged(android.view.View,%20int)(https://developer.android.com/reference/android/view/View changedView, int visibility)
`

Called when the visibility of the view or an ancestor of the view has
changed.


`


void` `
https://developer.android.com/reference/android/view/View#onWindowFocusChanged(boolean)(boolean hasWindowFocus)
`

Called when the window containing this view gains or loses focus.


`


void` `
https://developer.android.com/reference/android/view/View#onWindowSystemUiVisibilityChanged(int)(int visible)
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


void` `
https://developer.android.com/reference/android/view/View#onWindowVisibilityChanged(int)(int visibility)
`

Called when the window containing has change its visibility
(between `https://developer.android.com/reference/android/view/View#GONE`, `https://developer.android.com/reference/android/view/View#INVISIBLE`, and `https://developer.android.com/reference/android/view/View#VISIBLE`).


`


boolean` `
https://developer.android.com/reference/android/view/View#overScrollBy(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20boolean)(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent)
`

Scroll the view with standard behavior for scrolling beyond the normal
content boundaries.


`


boolean` `
https://developer.android.com/reference/android/view/View#performAccessibilityAction(int,%20android.os.Bundle)(int action, https://developer.android.com/reference/android/os/Bundle arguments)
`

Performs the specified accessibility action on the view.


`


boolean` `
https://developer.android.com/reference/android/view/View#performClick()()
`

Call this view's OnClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performContextClick(float,%20float)(float x, float y)
`

Call this view's OnContextClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performContextClick()()
`

Call this view's OnContextClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(int)(int feedbackConstant)
`

BZZZTT!!1!

Provide haptic feedback to the user for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(android.os.vibrator.HapticFeedbackRequest)(https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest request)
`

<br />

Like `https://developer.android.com/reference/android/view/View#performHapticFeedback(int,%20int)`, but takes a `https://developer.android.com/reference/android/os/vibrator/HapticFeedbackRequest`.


`


boolean` `
https://developer.android.com/reference/android/view/View#performHapticFeedback(int,%20int)(int feedbackConstant, int flags)
`

BZZZTT!!1!

Like `https://developer.android.com/reference/android/view/View#performHapticFeedback(int)`, with additional options.


`


boolean` `
https://developer.android.com/reference/android/view/View#performLongClick(float,%20float)(float x, float y)
`

Calls this view's OnLongClickListener, if it is defined.


`


boolean` `
https://developer.android.com/reference/android/view/View#performLongClick()()
`

Calls this view's OnLongClickListener, if it is defined.


`


https://developer.android.com/reference/android/view/ContentInfo` `
https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)(https://developer.android.com/reference/android/view/ContentInfo payload)
`

Receives the given content.


`


void` `
https://developer.android.com/reference/android/view/View#playSoundEffect(int)(int soundConstant)
`

Play a sound effect for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Causes the Runnable to be added to the message queue.


`


boolean` `
https://developer.android.com/reference/android/view/View#postDelayed(java.lang.Runnable,%20long)(https://developer.android.com/reference/java/lang/Runnable action, long delayMillis)
`

<br />

Causes the Runnable to be added to the message queue, to be run
after the specified amount of time elapses.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidate()()
`

<br />

Cause an invalidate to happen on a subsequent cycle through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidate(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on a subsequent cycle
through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long,%20int,%20int,%20int,%20int)(long delayMilliseconds, int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on a subsequent cycle
through the event loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateDelayed(long)(long delayMilliseconds)
`

<br />

Cause an invalidate to happen on a subsequent cycle through the event
loop.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateOnAnimation(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

<br />

Cause an invalidate of the specified area to happen on the next animation
time step, typically the next display frame.


`


void` `
https://developer.android.com/reference/android/view/View#postInvalidateOnAnimation()()
`

<br />

Cause an invalidate to happen on the next animation time step, typically the
next display frame.


`


void` `
https://developer.android.com/reference/android/view/View#postOnAnimation(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Causes the Runnable to execute on the next animation time step.


`


void` `
https://developer.android.com/reference/android/view/View#postOnAnimationDelayed(java.lang.Runnable,%20long)(https://developer.android.com/reference/java/lang/Runnable action, long delayMillis)
`

<br />

Causes the Runnable to execute on the next animation time step,
after the specified amount of time elapses.


`


void` `
https://developer.android.com/reference/android/view/View#refreshDrawableState()()
`

Call this to force a view to update its drawable state.


`


static


void` `
https://developer.android.com/reference/android/view/View#registerCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)(https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener listener)
`

Registers a listener that is notified when a View API is called from the wrong thread.


`


void` `
https://developer.android.com/reference/android/view/View#releasePointerCapture()()
`

Releases the pointer capture.


`


boolean` `
https://developer.android.com/reference/android/view/View#removeCallbacks(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable action)
`

<br />

Removes the specified Runnable from the message queue.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnAttachStateChangeListener(android.view.View.OnAttachStateChangeListener)(https://developer.android.com/reference/android/view/View.OnAttachStateChangeListener listener)
`

Remove a listener for attach state changes.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnLayoutChangeListener(android.view.View.OnLayoutChangeListener)(https://developer.android.com/reference/android/view/View.OnLayoutChangeListener listener)
`

Remove a listener for layout changes.


`


void` `
https://developer.android.com/reference/android/view/View#removeOnUnhandledKeyEventListener(android.view.View.OnUnhandledKeyEventListener)(https://developer.android.com/reference/android/view/View.OnUnhandledKeyEventListener listener)
`

Removes a listener which will receive unhandled `https://developer.android.com/reference/android/view/KeyEvent`s.


`


void` `
https://developer.android.com/reference/android/view/View#reportAppJankStats(android.app.jank.AppJankStats)(https://developer.android.com/reference/android/app/jank/AppJankStats appJankStats)
`

Called from apps when they want to report jank stats to the system.


`


void` `
https://developer.android.com/reference/android/view/View#requestApplyInsets()()
`

Ask that a new dispatch of `https://developer.android.com/reference/android/view/View#onApplyWindowInsets(android.view.WindowInsets)` be performed.


`


void` `
https://developer.android.com/reference/android/view/View#requestFitSystemWindows()()
`

*This method was deprecated
in API level 20.
Use `https://developer.android.com/reference/android/view/View#requestApplyInsets()` for newer platform versions.*


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocus(int)(int direction)
`

Call this to try to give focus to a specific view or to one of its
descendants and give it a hint about what direction focus is heading.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocus()()
`

Call this to try to give focus to a specific view or to one of its
descendants.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestFocus(int,%20android.graphics.Rect)(int direction, https://developer.android.com/reference/android/graphics/Rect previouslyFocusedRect)
`

Call this to try to give focus to a specific view or to one of its descendants
and give it hints about the direction and a specific rectangle that the focus
is coming from.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#requestFocusFromTouch()()
`

Call this to try to give focus to a specific view or to one of its descendants.


`


void` `
https://developer.android.com/reference/android/view/View#requestLayout()()
`

Call this when something has changed which has invalidated the
layout of this view.


`


void` `
https://developer.android.com/reference/android/view/View#requestPointerCapture()()
`

Requests pointer capture in
relative mode.


`


void` `
https://developer.android.com/reference/android/view/View#requestPointerCapture(int)(int mode)
`

Requests pointer capture in the specified mode.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean,%20int)(https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate, int source)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect rectangle)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


boolean` `
https://developer.android.com/reference/android/view/View#requestRectangleOnScreen(android.graphics.Rect,%20boolean)(https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate)
`

Request that a rectangle of this view be visible on the screen,
scrolling if necessary just enough.


`


final

void` `
https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(int)(int source)
`

Request unbuffered dispatch of the given event source class to this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#requestUnbufferedDispatch(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event)
`

Request unbuffered dispatch of the given stream of MotionEvents to this View.


`


final
<T extends https://developer.android.com/reference/android/view/View>
T` `
https://developer.android.com/reference/android/view/View#requireViewById(int)(int id)
`

Finds the first descendant view with the given ID, the view itself if the ID matches
`https://developer.android.com/reference/android/view/View#getId()`, or throws an IllegalArgumentException if the ID is invalid or there is no
matching view in the hierarchy.


`


void` `
https://developer.android.com/reference/android/view/View#resetPivot()()
`

Clears any pivot previously set by a call to `https://developer.android.com/reference/android/view/View#setPivotX(float)` or
`https://developer.android.com/reference/android/view/View#setPivotY(float)`.


`


static


int` `
https://developer.android.com/reference/android/view/View#resolveSize(int,%20int)(int size, int measureSpec)
`

Version of `https://developer.android.com/reference/android/view/View#resolveSizeAndState(int,%20int,%20int)`
returning only the `https://developer.android.com/reference/android/view/View#MEASURED_SIZE_MASK` bits of the result.


`


static


int` `
https://developer.android.com/reference/android/view/View#resolveSizeAndState(int,%20int,%20int)(int size, int measureSpec, int childMeasuredState)
`

Utility to reconcile a desired size and state, with constraints imposed
by a MeasureSpec.


`


boolean` `
https://developer.android.com/reference/android/view/View#restoreDefaultFocus()()
`

Gives focus to the default-focus view in the view hierarchy that has this view as a root.


`


void` `
https://developer.android.com/reference/android/view/View#restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Restore this view hierarchy's frozen state from the given container.


`


final

void` `
https://developer.android.com/reference/android/view/View#saveAttributeDataForStyleable(android.content.Context,%20int[],%20android.util.AttributeSet,%20android.content.res.TypedArray,%20int,%20int)(https://developer.android.com/reference/android/content/Context context, int[] styleable, https://developer.android.com/reference/android/util/AttributeSet attrs, https://developer.android.com/reference/android/content/res/TypedArray t, int defStyleAttr, int defStyleRes)
`

Stores debugging information about attributes.


`


void` `
https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)(https://developer.android.com/reference/android/util/SparseArray<https://developer.android.com/reference/android/os/Parcelable> container)
`

Store this view hierarchy's frozen state into the given container.


`


void` `
https://developer.android.com/reference/android/view/View#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what, long when)
`

Schedules an action on a drawable to occur at a specified time.


`


void` `
https://developer.android.com/reference/android/view/View#scrollBy(int,%20int)(int x, int y)
`

Move the scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#scrollTo(int,%20int)(int x, int y)
`

Set the scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)(int eventType)
`

Sends an accessibility event of the given type.


`


void` `
https://developer.android.com/reference/android/view/View#sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

This method behaves exactly as `https://developer.android.com/reference/android/view/View#sendAccessibilityEvent(int)` but
takes as an argument an empty `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and does not
perform a check whether accessibility is enabled.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityDataSensitive(int)(int accessibilityDataSensitive)
`

Specifies whether this view should only allow interactions from
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityService`s with the
`https://developer.android.com/reference/android/accessibilityservice/AccessibilityServiceInfo#isAccessibilityTool()` property
set to true.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityDelegate(android.view.View.AccessibilityDelegate)(https://developer.android.com/reference/android/view/View.AccessibilityDelegate delegate)
`

Sets a delegate for implementing accessibility support via composition
(as opposed to inheritance).


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityHeading(boolean)(boolean isHeading)
`

Set if view is a heading for a section of content for accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityLiveRegion(int)(int mode)
`

Sets the live region mode for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityPaneTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence accessibilityPaneTitle)
`

Visually distinct portion of a window with window-like semantics are considered panes for
accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityTraversalAfter(int)(int afterId)
`

Sets the id of a view that screen readers are requested to visit before this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAccessibilityTraversalBefore(int)(int beforeId)
`

Sets the id of a view that screen readers are requested to visit after this view.


`


void` `
https://developer.android.com/reference/android/view/View#setActivated(boolean)(boolean activated)
`

Changes the activated state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowClickWhenDisabled(boolean)(boolean clickableWhenDisabled)
`

Enables or disables click events for this view when disabled.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatePackage(java.lang.String)(https://developer.android.com/reference/java/lang/String allowedPackageName)
`

Specifies that this view may act as a handwriting initiation delegator for a delegate editor
view from the specified package.


`


void` `
https://developer.android.com/reference/android/view/View#setAllowedHandwritingDelegatorPackage(java.lang.String)(https://developer.android.com/reference/java/lang/String allowedPackageName)
`

Specifies that a view from the specified package may act as a handwriting delegator for this
delegate editor view.


`


void` `
https://developer.android.com/reference/android/view/View#setAlpha(float)(float alpha)
`

Sets the opacity of the view to a value from 0 to 1, where 0 means the view is
completely transparent and 1 means the view is completely opaque.


`


void` `
https://developer.android.com/reference/android/view/View#setAnimation(android.view.animation.Animation)(https://developer.android.com/reference/android/view/animation/Animation animation)
`

Sets the next animation to play for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setAnimationMatrix(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Changes the transformation matrix on the view.


`


void` `
https://developer.android.com/reference/android/view/View#setAutoHandwritingEnabled(boolean)(boolean enabled)
`

Set whether this view enables automatic handwriting initiation.


`


void` `
https://developer.android.com/reference/android/view/View#setAutofillHints(java.lang.String[])(https://developer.android.com/reference/java/lang/String autofillHints)
`

Sets the hints that help an `https://developer.android.com/reference/android/service/autofill/AutofillService` determine how
to autofill the view with the user's data.


`


void` `
https://developer.android.com/reference/android/view/View#setAutofillId(android.view.autofill.AutofillId)(https://developer.android.com/reference/android/view/autofill/AutofillId id)
`

Sets the unique, logical identifier of this view in the activity, for autofill purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setBackdropRenderEffect(android.graphics.RenderEffect)(https://developer.android.com/reference/android/graphics/RenderEffect renderEffect)
`

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to the backdrop contents of this
View.


`


void` `
https://developer.android.com/reference/android/view/View#setBackground(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable background)
`

Set the background to a given Drawable, or remove the background.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundColor(int)(int color)
`

Sets the background color for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable background)
`

*This method was deprecated
in API level 16.
use `https://developer.android.com/reference/android/view/View#setBackground(android.graphics.drawable.Drawable)` instead*


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundResource(int)(int resid)
`

Set the background to a given resource.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode blendMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList tint)
`

Applies a tint to the background drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setBackgroundTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode tintMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setBackgroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


final

void` `
https://developer.android.com/reference/android/view/View#setBottom(int)(int bottom)
`

Sets the bottom position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setCameraDistance(float)(float distance)
`

<br />

Sets the distance along the Z axis (orthogonal to the X/Y plane on which
views are drawn) from the camera to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setClickable(boolean)(boolean clickable)
`

Enables or disables click events for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setClipBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect clipBounds)
`

Sets a rectangular area on this view to which the view will be clipped
when it is drawn.


`


void` `
https://developer.android.com/reference/android/view/View#setClipToOutline(boolean)(boolean clipToOutline)
`

Sets whether the View's Outline should be used to clip the contents of the View.


`


void` `
https://developer.android.com/reference/android/view/View#setContentCaptureSession(android.view.contentcapture.ContentCaptureSession)(https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession contentCaptureSession)
`

Sets the (optional) `https://developer.android.com/reference/android/view/contentcapture/ContentCaptureSession` associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#setContentDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence contentDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s content description.


`


final

void` `
https://developer.android.com/reference/android/view/View#setContentSensitivity(int)(int mode)
`

Sets content sensitivity mode to determine whether this view displays sensitive content
(e.g. username, password etc.).


`


void` `
https://developer.android.com/reference/android/view/View#setContextClickable(boolean)(boolean contextClickable)
`

Enables or disables context clicking for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setDefaultFocusHighlightEnabled(boolean)(boolean defaultFocusHighlightEnabled)
`

Sets whether this View should use a default focus highlight when it gets focused but doesn't
have `https://developer.android.com/reference/android/R.attr#state_focused` defined in its background.


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheBackgroundColor(int)(int color)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)(boolean enabled)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDrawingCacheQuality(int)(int quality)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setDuplicateParentStateEnabled(boolean)(boolean enabled)
`

<br />

Enables or disables the duplication of the parent's state into this view.


`


void` `
https://developer.android.com/reference/android/view/View#setElevation(float)(float elevation)
`

Sets the base elevation of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setEnabled(boolean)(boolean enabled)
`

Set the enabled state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setFadingEdgeLength(int)(int length)
`

Set the size of the faded edge used to indicate that more content in this
view is available.


`


void` `
https://developer.android.com/reference/android/view/View#setFilterTouchesWhenObscured(boolean)(boolean enabled)
`

Sets whether the framework should discard touches when the view's
window is obscured by another visible window at the touched location.


`


void` `
https://developer.android.com/reference/android/view/View#setFitsSystemWindows(boolean)(boolean fitSystemWindows)
`

Sets whether or not this view should account for system screen decorations
such as the status bar and inset its content; that is, controlling whether
the default implementation of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` will be
executed.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusable(boolean)(boolean focusable)
`

Set whether this view can receive the focus.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusable(int)(int focusable)
`

Sets whether this view can receive focus.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusableInTouchMode(boolean)(boolean focusableInTouchMode)
`

Set whether this view can receive focus while in touch mode.


`


void` `
https://developer.android.com/reference/android/view/View#setFocusedByDefault(boolean)(boolean isFocusedByDefault)
`

Sets whether this View should receive focus when the focus is restored for the view
hierarchy containing this view.


`


void` `
https://developer.android.com/reference/android/view/View#setForceDarkAllowed(boolean)(boolean allow)
`

Sets whether or not to allow force dark to apply to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setForeground(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable foreground)
`

Supply a Drawable that is to be rendered on top of all of the content in the view.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundGravity(int)(int gravity)
`

Describes how the foreground is positioned.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode blendMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList tint)
`

Applies a tint to the foreground drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setForegroundTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode tintMode)
`

Specifies the blending mode used to apply the tint specified by
`https://developer.android.com/reference/android/view/View#setForegroundTintList(android.content.res.ColorStateList)`} to the background
drawable.


`


void` `
https://developer.android.com/reference/android/view/View#setFrameContentVelocity(float)(float pixelsPerSecond)
`

Set the current velocity of the View, we only track positive value.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingBoundsOffsets(float,%20float,%20float,%20float)(float offsetLeft, float offsetTop, float offsetRight, float offsetBottom)
`

Set the amount of offset applied to this view's stylus handwriting bounds.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingDelegateFlags(int)(int flags)
`

Sets flags configuring the handwriting delegation behavior for this delegate editor view.


`


void` `
https://developer.android.com/reference/android/view/View#setHandwritingDelegatorCallback(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable callback)
`

Sets a callback which should be called when a stylus `https://developer.android.com/reference/android/view/MotionEvent` occurs within this
view's bounds.


`


void` `
https://developer.android.com/reference/android/view/View#setHapticFeedbackEnabled(boolean)(boolean hapticFeedbackEnabled)
`

Set whether this view should have haptic feedback for events such as
long presses.


`


void` `
https://developer.android.com/reference/android/view/View#setHasTransientState(boolean)(boolean hasTransientState)
`

Set whether this view is currently tracking transient state that the
framework should attempt to preserve when possible.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalFadingEdgeEnabled(boolean)(boolean horizontalFadingEdgeEnabled)
`

<br />

Define whether the horizontal edges should be faded when this view
is scrolled horizontally.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)(boolean horizontalScrollBarEnabled)
`

<br />

Define whether the horizontal scrollbar should be drawn or not.


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollbarThumbDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the horizontal thumb drawable


`


void` `
https://developer.android.com/reference/android/view/View#setHorizontalScrollbarTrackDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the horizontal track drawable


`


void` `
https://developer.android.com/reference/android/view/View#setHovered(boolean)(boolean hovered)
`

Sets whether the view is currently hovered.


`


void` `
https://developer.android.com/reference/android/view/View#setId(int)(int id)
`

Sets the identifier for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForAccessibility(int)(int mode)
`

Sets how to determine whether this view is important for accessibility
which is if it fires accessibility events and if it is reported to
accessibility services that query the screen.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForAutofill(int)(int mode)
`

Sets the mode for determining whether this view is considered important for autofill.


`


void` `
https://developer.android.com/reference/android/view/View#setImportantForContentCapture(int)(int mode)
`

Sets the mode for determining whether this view is considered important for content capture.


`


void` `
https://developer.android.com/reference/android/view/View#setIsCredential(boolean)(boolean isCredential)
`

*This method was deprecated
in API level 37.
The `https://developer.android.com/reference/android/view/View#isCredential()` is no longer used by the system and is not
recommended for use by apps. The purpose and usage expectations of this property were
never clearly defined.*


`


void` `
https://developer.android.com/reference/android/view/View#setIsHandwritingDelegate(boolean)(boolean isHandwritingDelegate)
`

Sets this view to be a handwriting delegate.


`


void` `
https://developer.android.com/reference/android/view/View#setKeepScreenOn(boolean)(boolean keepScreenOn)
`

Controls whether the screen should remain on, modifying the
value of `https://developer.android.com/reference/android/view/View#KEEP_SCREEN_ON`.


`


void` `
https://developer.android.com/reference/android/view/View#setKeyboardNavigationCluster(boolean)(boolean isCluster)
`

Set whether this view is a root of a keyboard navigation cluster.


`


void` `
https://developer.android.com/reference/android/view/View#setLabelFor(int)(int id)
`

Sets the id of a view for which this view serves as a label for
accessibility purposes.


`


void` `
https://developer.android.com/reference/android/view/View#setLayerPaint(android.graphics.Paint)(https://developer.android.com/reference/android/graphics/Paint paint)
`

Updates the `https://developer.android.com/reference/android/graphics/Paint` object used with the current layer (used only if the current
layer type is not set to `https://developer.android.com/reference/android/view/View#LAYER_TYPE_NONE`).


`


void` `
https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)(int layerType, https://developer.android.com/reference/android/graphics/Paint paint)
`

<br />

Specifies the type of layer backing this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLayoutDirection(int)(int layoutDirection)
`

Set the layout direction for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLayoutParams(android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params)
`

Set the layout parameters associated with this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setLeft(int)(int left)
`

Sets the left position of this view relative to its parent.


`


final

void` `
https://developer.android.com/reference/android/view/View#setLeftTopRightBottom(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

Assign a size and position to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setLongClickable(boolean)(boolean longClickable)
`

Enables or disables long click events for this view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setMeasuredDimension(int,%20int)(int measuredWidth, int measuredHeight)
`

<br />

This method must be called by `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)` to store the
measured width and measured height.


`


void` `
https://developer.android.com/reference/android/view/View#setMinimumHeight(int)(int minHeight)
`

Sets the minimum height of the view.


`


void` `
https://developer.android.com/reference/android/view/View#setMinimumWidth(int)(int minWidth)
`

Sets the minimum width of the view.


`


void` `
https://developer.android.com/reference/android/view/View#setNestedScrollingEnabled(boolean)(boolean enabled)
`

Enable or disable nested scrolling for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setNextClusterForwardId(int)(int nextClusterForwardId)
`

Sets the id of the view to use as the root of the next keyboard navigation cluster.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusDownId(int)(int nextFocusDownId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_DOWN`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusForwardId(int)(int nextFocusForwardId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_FORWARD`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusLeftId(int)(int nextFocusLeftId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_LEFT`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusRightId(int)(int nextFocusRightId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_RIGHT`.


`


void` `
https://developer.android.com/reference/android/view/View#setNextFocusUpId(int)(int nextFocusUpId)
`

Sets the id of the view to use when the next focus is `https://developer.android.com/reference/android/view/View#FOCUS_UP`.


`


void` `
https://developer.android.com/reference/android/view/View#setOnApplyWindowInsetsListener(android.view.View.OnApplyWindowInsetsListener)(https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener listener)
`

Set an `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` to take over the policy for applying
window insets to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnCapturedPointerListener(android.view.View.OnCapturedPointerListener)(https://developer.android.com/reference/android/view/View.OnCapturedPointerListener l)
`

Set a listener to receive callbacks when the pointer capture state of a view changes.


`


void` `
https://developer.android.com/reference/android/view/View#setOnClickListener(android.view.View.OnClickListener)(https://developer.android.com/reference/android/view/View.OnClickListener l)
`

Register a callback to be invoked when this view is clicked.


`


void` `
https://developer.android.com/reference/android/view/View#setOnContextClickListener(android.view.View.OnContextClickListener)(https://developer.android.com/reference/android/view/View.OnContextClickListener l)
`

Register a callback to be invoked when this view is context clicked.


`


void` `
https://developer.android.com/reference/android/view/View#setOnCreateContextMenuListener(android.view.View.OnCreateContextMenuListener)(https://developer.android.com/reference/android/view/View.OnCreateContextMenuListener l)
`

Register a callback to be invoked when the context menu for this view is
being built.


`


void` `
https://developer.android.com/reference/android/view/View#setOnDragListener(android.view.View.OnDragListener)(https://developer.android.com/reference/android/view/View.OnDragListener l)
`

Register a drag event listener callback object for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setOnFocusChangeListener(android.view.View.OnFocusChangeListener)(https://developer.android.com/reference/android/view/View.OnFocusChangeListener l)
`

Register a callback to be invoked when focus of this view changed.


`


void` `
https://developer.android.com/reference/android/view/View#setOnGenericMotionListener(android.view.View.OnGenericMotionListener)(https://developer.android.com/reference/android/view/View.OnGenericMotionListener l)
`

Register a callback to be invoked when a generic motion event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnHoverListener(android.view.View.OnHoverListener)(https://developer.android.com/reference/android/view/View.OnHoverListener l)
`

Register a callback to be invoked when a hover event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnKeyListener(android.view.View.OnKeyListener)(https://developer.android.com/reference/android/view/View.OnKeyListener l)
`

Register a callback to be invoked when a hardware key is pressed in this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnLongClickListener(android.view.View.OnLongClickListener)(https://developer.android.com/reference/android/view/View.OnLongClickListener l)
`

Register a callback to be invoked when this view is clicked and held.


`


void` `
https://developer.android.com/reference/android/view/View#setOnReceiveContentListener(java.lang.String[],%20android.view.OnReceiveContentListener)(https://developer.android.com/reference/java/lang/String mimeTypes, https://developer.android.com/reference/android/view/OnReceiveContentListener listener)
`

Sets the listener to be `https://developer.android.com/reference/android/view/View#performReceiveContent(android.view.ContentInfo)` to handle insertion of
content into this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOnScrollChangeListener(android.view.View.OnScrollChangeListener)(https://developer.android.com/reference/android/view/View.OnScrollChangeListener l)
`

Register a callback to be invoked when the scroll X or Y positions of
this view change.


`


void` `
https://developer.android.com/reference/android/view/View#setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener)(https://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener l)
`

*This method was deprecated
in API level 30.
Use `https://developer.android.com/reference/android/view/WindowInsets#isVisible(int)` to find out about system bar visibilities
by setting a `https://developer.android.com/reference/android/view/View.OnApplyWindowInsetsListener` on this view.*


`


void` `
https://developer.android.com/reference/android/view/View#setOnTouchListener(android.view.View.OnTouchListener)(https://developer.android.com/reference/android/view/View.OnTouchListener l)
`

Register a callback to be invoked when a touch event is sent to this view.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineAmbientShadowColor(int)(int color)
`

Sets the color of the ambient shadow that is drawn when the view has a positive Z or
elevation value.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineProvider(android.view.ViewOutlineProvider)(https://developer.android.com/reference/android/view/ViewOutlineProvider provider)
`

Sets the `https://developer.android.com/reference/android/view/ViewOutlineProvider` of the view, which generates the Outline that defines
the shape of the shadow it casts, and enables outline clipping.


`


void` `
https://developer.android.com/reference/android/view/View#setOutlineSpotShadowColor(int)(int color)
`

Sets the color of the spot shadow that is drawn when the view has a positive Z or
elevation value.


`


void` `
https://developer.android.com/reference/android/view/View#setOverScrollMode(int)(int overScrollMode)
`

Set the over-scroll mode for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setPadding(int,%20int,%20int,%20int)(int left, int top, int right, int bottom)
`

Sets the padding.


`


void` `
https://developer.android.com/reference/android/view/View#setPaddingRelative(int,%20int,%20int,%20int)(int start, int top, int end, int bottom)
`

Sets the relative padding.


`


void` `
https://developer.android.com/reference/android/view/View#setPendingCredentialRequest(android.credentials.GetCredentialRequest,%20android.os.OutcomeReceiver<android.credentials.GetCredentialResponse,android.credentials.GetCredentialException>)(https://developer.android.com/reference/android/credentials/GetCredentialRequest request, https://developer.android.com/reference/android/os/OutcomeReceiver<https://developer.android.com/reference/android/credentials/GetCredentialResponse, https://developer.android.com/reference/android/credentials/GetCredentialException> callback)
`

Sets a `https://developer.android.com/reference/android/credentials/CredentialManager` request to retrieve credentials, when the user focuses
on this given view.


`


void` `
https://developer.android.com/reference/android/view/View#setPivotX(float)(float pivotX)
`

Sets the x location of the point around which the view is
`https://developer.android.com/reference/android/view/View#setRotation(float)` and `https://developer.android.com/reference/android/view/View#setScaleX(float)`.


`


void` `
https://developer.android.com/reference/android/view/View#setPivotY(float)(float pivotY)
`

Sets the y location of the point around which the view is `https://developer.android.com/reference/android/view/View#setRotation(float)`
and `https://developer.android.com/reference/android/view/View#setScaleY(float)`.


`


void` `
https://developer.android.com/reference/android/view/View#setPointerIcon(android.view.PointerIcon)(https://developer.android.com/reference/android/view/PointerIcon pointerIcon)
`

Set the pointer icon to be used for a mouse pointer in the current view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setPreferKeepClear(boolean)(boolean preferKeepClear)
`

Set a preference to keep the bounds of this view clear from floating windows above this
view's window.


`


final

void` `
https://developer.android.com/reference/android/view/View#setPreferKeepClearRects(java.util.List<android.graphics.Rect>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects)
`

Set a preference to keep the provided rects clear from floating windows above this
view's window.


`


void` `
https://developer.android.com/reference/android/view/View#setPressed(boolean)(boolean pressed)
`

Sets the pressed state for this view.


`


void` `
https://developer.android.com/reference/android/view/View#setRenderEffect(android.graphics.RenderEffect)(https://developer.android.com/reference/android/graphics/RenderEffect renderEffect)
`

Configure the `https://developer.android.com/reference/android/graphics/RenderEffect` to apply to this View.


`


void` `
https://developer.android.com/reference/android/view/View#setRequestedFrameRate(float)(float frameRate)
`

You can set the preferred frame rate for a View using a positive number
or by specifying the preferred frame rate category using constants, including
REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE, REQUESTED_FRAME_RATE_CATEGORY_LOW,
REQUESTED_FRAME_RATE_CATEGORY_NORMAL, REQUESTED_FRAME_RATE_CATEGORY_HIGH.


`


final

void` `
https://developer.android.com/reference/android/view/View#setRevealOnFocusHint(boolean)(boolean revealOnFocus)
`

Sets this view's preference for reveal behavior when it gains focus.


`


final

void` `
https://developer.android.com/reference/android/view/View#setRight(int)(int right)
`

Sets the right position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setRotation(float)(float rotation)
`

Sets the degrees that the view is rotated around the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setRotationX(float)(float rotationX)
`

Sets the degrees that the view is rotated around the horizontal axis through the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setRotationY(float)(float rotationY)
`

Sets the degrees that the view is rotated around the vertical axis through the pivot point.


`


void` `
https://developer.android.com/reference/android/view/View#setSaveEnabled(boolean)(boolean enabled)
`

Controls whether the saving of this view's state is
enabled (that is, whether its `https://developer.android.com/reference/android/view/View#onSaveInstanceState()` method
will be called).


`


void` `
https://developer.android.com/reference/android/view/View#setSaveFromParentEnabled(boolean)(boolean enabled)
`

Controls whether the entire hierarchy under this view will save its
state when a state saving traversal occurs from its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setScaleX(float)(float scaleX)
`

Sets the amount that the view is scaled in x around the pivot point, as a proportion of
the view's unscaled width.


`


void` `
https://developer.android.com/reference/android/view/View#setScaleY(float)(float scaleY)
`

Sets the amount that the view is scaled in Y around the pivot point, as a proportion of
the view's unscaled width.


`


void` `
https://developer.android.com/reference/android/view/View#setScreenReaderFocusable(boolean)(boolean screenReaderFocusable)
`

Sets whether this View should be a focusable element for screen readers
and include non-focusable Views from its subtree when providing feedback.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarDefaultDelayBeforeFade(int)(int scrollBarDefaultDelayBeforeFade)
`

Define the delay before scrollbars fade.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarFadeDuration(int)(int scrollBarFadeDuration)
`

Define the scrollbar fade duration.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarSize(int)(int scrollBarSize)
`

Define the scrollbar size.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollBarStyle(int)(int style)
`

<br />

Specify the style of the scrollbars.


`


final

void` `
https://developer.android.com/reference/android/view/View#setScrollCaptureCallback(android.view.ScrollCaptureCallback)(https://developer.android.com/reference/android/view/ScrollCaptureCallback callback)
`

Sets the callback to receive scroll capture requests.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollCaptureHint(int)(int hint)
`

Sets the scroll capture hint for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollContainer(boolean)(boolean isScrollContainer)
`

Change whether this view is one of the set of scrollable containers in
its window.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollIndicators(int,%20int)(int indicators, int mask)
`

Sets the state of the scroll indicators specified by the mask.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollIndicators(int)(int indicators)
`

Sets the state of all scroll indicators.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollX(int)(int value)
`

Set the horizontal scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollY(int)(int value)
`

Set the vertical scrolled position of your view.


`


void` `
https://developer.android.com/reference/android/view/View#setScrollbarFadingEnabled(boolean)(boolean fadeScrollbars)
`

Define whether scrollbars will fade when the view is not scrolling.


`


void` `
https://developer.android.com/reference/android/view/View#setSelected(boolean)(boolean selected)
`

Changes the selection state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setSoundEffectsEnabled(boolean)(boolean soundEffectsEnabled)
`

Set whether this view should have sound effects enabled for events such as
clicking and touching.


`


void` `
https://developer.android.com/reference/android/view/View#setStateDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence stateDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s state description.


`


void` `
https://developer.android.com/reference/android/view/View#setStateListAnimator(android.animation.StateListAnimator)(https://developer.android.com/reference/android/animation/StateListAnimator stateListAnimator)
`

Attaches the provided StateListAnimator to this View.


`


void` `
https://developer.android.com/reference/android/view/View#setSupplementalDescription(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence supplementalDescription)
`

Sets the `https://developer.android.com/reference/android/view/View`'s supplemental description.


`


void` `
https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)(https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect> rects)
`

Sets a list of areas within this view's post-layout coordinate space where the system
should not intercept touch or other pointing device gestures.


`


void` `
https://developer.android.com/reference/android/view/View#setSystemUiVisibility(int)(int visibility)
`

*This method was deprecated
in API level 30.
SystemUiVisibility flags are deprecated. Use `https://developer.android.com/reference/android/view/WindowInsetsController`
instead.*


`


void` `
https://developer.android.com/reference/android/view/View#setTag(int,%20java.lang.Object)(int key, https://developer.android.com/reference/java/lang/Object tag)
`

Sets a tag associated with this view and a key.


`


void` `
https://developer.android.com/reference/android/view/View#setTag(java.lang.Object)(https://developer.android.com/reference/java/lang/Object tag)
`

Sets the tag associated with this view.


`


void` `
https://developer.android.com/reference/android/view/View#setTextAlignment(int)(int textAlignment)
`

Set the text alignment.


`


void` `
https://developer.android.com/reference/android/view/View#setTextDirection(int)(int textDirection)
`

Set the text direction.


`


void` `
https://developer.android.com/reference/android/view/View#setTooltipText(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence tooltipText)
`

Sets the tooltip text which will be displayed in a small popup next to the view.


`


final

void` `
https://developer.android.com/reference/android/view/View#setTop(int)(int top)
`

Sets the top position of this view relative to its parent.


`


void` `
https://developer.android.com/reference/android/view/View#setTouchDelegate(android.view.TouchDelegate)(https://developer.android.com/reference/android/view/TouchDelegate delegate)
`

Sets the TouchDelegate for this View.


`


void` `
https://developer.android.com/reference/android/view/View#setTransitionAlpha(float)(float alpha)
`

This property is intended only for use by the Fade transition, which animates it
to produce a visual translucency that does not side-effect (or get affected by)
the real alpha property.


`


final

void` `
https://developer.android.com/reference/android/view/View#setTransitionName(java.lang.String)(https://developer.android.com/reference/java/lang/String transitionName)
`

Sets the name of the View to be used to identify Views in Transitions.


`


void` `
https://developer.android.com/reference/android/view/View#setTransitionVisibility(int)(int visibility)
`

Changes the visibility of this View without triggering any other changes.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationX(float)(float translationX)
`

Sets the horizontal location of this view relative to its `https://developer.android.com/reference/android/view/View#getLeft()` position.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationY(float)(float translationY)
`

Sets the vertical location of this view relative to its `https://developer.android.com/reference/android/view/View#getTop()` position.


`


void` `
https://developer.android.com/reference/android/view/View#setTranslationZ(float)(float translationZ)
`

Sets the depth location of this view relative to its `https://developer.android.com/reference/android/view/View#getElevation()`.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalFadingEdgeEnabled(boolean)(boolean verticalFadingEdgeEnabled)
`

<br />

Define whether the vertical edges should be faded when this view
is scrolled vertically.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)(boolean verticalScrollBarEnabled)
`

<br />

Define whether the vertical scrollbar should be drawn or not.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarPosition(int)(int position)
`

Set the position of the vertical scroll bar.


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarThumbDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the vertical scrollbar thumb drawable


`


void` `
https://developer.android.com/reference/android/view/View#setVerticalScrollbarTrackDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable)
`

Defines the vertical scrollbar track drawable


`


void` `
https://developer.android.com/reference/android/view/View#setViewTranslationCallback(android.view.translation.ViewTranslationCallback)(https://developer.android.com/reference/android/view/translation/ViewTranslationCallback callback)
`

Sets a `https://developer.android.com/reference/android/view/translation/ViewTranslationCallback` that is used to display/hide the translated
information.


`


void` `
https://developer.android.com/reference/android/view/View#setVisibility(int)(int visibility)
`

Set the visibility state of this view.


`


void` `
https://developer.android.com/reference/android/view/View#setWillNotCacheDrawing(boolean)(boolean willNotCacheDrawing)
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


void` `
https://developer.android.com/reference/android/view/View#setWillNotDraw(boolean)(boolean willNotDraw)
`

If this view doesn't do any drawing on its own, set this flag to
allow further optimizations.


`


void` `
https://developer.android.com/reference/android/view/View#setWindowInsetsAnimationCallback(android.view.WindowInsetsAnimation.Callback)(https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback callback)
`

Sets a `https://developer.android.com/reference/android/view/WindowInsetsAnimation.Callback` to be notified about animations of windows that
cause insets.


`


void` `
https://developer.android.com/reference/android/view/View#setX(float)(float x)
`

Sets the visual x position of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setY(float)(float y)
`

Sets the visual y position of this view, in pixels.


`


void` `
https://developer.android.com/reference/android/view/View#setZ(float)(float z)
`

Sets the visual z position of this view, in pixels.


`


boolean` `
https://developer.android.com/reference/android/view/View#showContextMenu()()
`

Shows the context menu for this view.


`


boolean` `
https://developer.android.com/reference/android/view/View#showContextMenu(float,%20float)(float x, float y)
`

Shows the context menu for this view anchored to the specified
view-relative coordinate.


`


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/View#startActionMode(android.view.ActionMode.Callback,%20int)(https://developer.android.com/reference/android/view/ActionMode.Callback callback, int type)
`

Start an action mode with the given type.


`


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/View#startActionMode(android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/ActionMode.Callback callback)
`

Start an action mode with the default type `https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`.


`


void` `
https://developer.android.com/reference/android/view/View#startAnimation(android.view.animation.Animation)(https://developer.android.com/reference/android/view/animation/Animation animation)
`

Start the specified animation now.


`


final

boolean` `
https://developer.android.com/reference/android/view/View#startDrag(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)(https://developer.android.com/reference/android/content/ClipData data, https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder, https://developer.android.com/reference/java/lang/Object myLocalState, int flags)
`

*This method was deprecated
in API level 24.
Use `https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)` for newer platform versions.*


`


final

boolean` `
https://developer.android.com/reference/android/view/View#startDragAndDrop(android.content.ClipData,%20android.view.View.DragShadowBuilder,%20java.lang.Object,%20int)(https://developer.android.com/reference/android/content/ClipData data, https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder, https://developer.android.com/reference/java/lang/Object myLocalState, int flags)
`

Starts a drag and drop operation.


`


boolean` `
https://developer.android.com/reference/android/view/View#startNestedScroll(int)(int axes)
`

Begin a nestable scroll operation along the given axes.


`


void` `
https://developer.android.com/reference/android/view/View#stopNestedScroll()()
`

Stop a nested scroll in progress.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/android/view/View#toString()()
`

Returns a string representation of the object.


`


void` `
https://developer.android.com/reference/android/view/View#transformMatrixToGlobal(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Modifies the input matrix such that it maps view-local coordinates to
on-screen coordinates.


`


void` `
https://developer.android.com/reference/android/view/View#transformMatrixToLocal(android.graphics.Matrix)(https://developer.android.com/reference/android/graphics/Matrix matrix)
`

Modifies the input matrix such that it maps on-screen coordinates to
view-local coordinates.


`


static


void` `
https://developer.android.com/reference/android/view/View#unregisterCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)(https://developer.android.com/reference/android/view/View.CalledFromWrongThreadListener listener)
`

Unregisters a listener that was previously registered with
`https://developer.android.com/reference/android/view/View#registerCalledFromWrongThreadListener(android.view.View.CalledFromWrongThreadListener)`.


`


void` `
https://developer.android.com/reference/android/view/View#unscheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what)
`

Cancels a scheduled action on a drawable.


`


void` `
https://developer.android.com/reference/android/view/View#unscheduleDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

Unschedule any events associated with the given Drawable.


`


final

void` `
https://developer.android.com/reference/android/view/View#updateDragShadow(android.view.View.DragShadowBuilder)(https://developer.android.com/reference/android/view/View.DragShadowBuilder shadowBuilder)
`

Updates the drag shadow for the ongoing drag and drop operation.


`


boolean` `
https://developer.android.com/reference/android/view/View#verifyDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

If your view subclass is displaying its own Drawable objects, it should
override this function and return true for any Drawable it is
displaying.


`


boolean` `
https://developer.android.com/reference/android/view/View#willNotCacheDrawing()()
`

*This method was deprecated
in API level 28.
The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11. With hardware-acceleration, intermediate cache
layers are largely unnecessary and can easily result in a net loss in performance due to the
cost of creating and updating the layer. In the rare cases where caching layers are useful,
such as for alpha animations, `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` handles this with hardware
rendering. For software-rendered snapshots of a small part of the View hierarchy or
individual Views it is recommended to create a `https://developer.android.com/reference/android/graphics/Canvas` from either a `https://developer.android.com/reference/android/graphics/Bitmap` or
`https://developer.android.com/reference/android/graphics/Picture` and call `https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)` on the View. However these
software-rendered usages are discouraged and have compatibility issues with hardware-only
rendering features such as `https://developer.android.com/reference/android/graphics/Bitmap.Config#HARDWARE`
bitmaps, real-time shadows, and outline clipping. For screenshots of the UI for feedback
reports or unit testing the `https://developer.android.com/reference/android/view/PixelCopy` API is recommended.*


`


boolean` `
https://developer.android.com/reference/android/view/View#willNotDraw()()
`

Returns whether or not this View draws on its own.


From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource

` `
abstract


void` `
https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource#sendAccessibilityEvent(int)(int eventType)
`

Handles the request for sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` given
the event type.


`
abstract


void` `
https://developer.android.com/reference/android/view/accessibility/AccessibilityEventSource#sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Handles the request for sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`.


From interface `

https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback

` `
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who)
`

Called when the drawable needs to be redrawn.


`
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what, long when)
`

A Drawable can call this to schedule the next frame of its
animation.


`
abstract


void` `
https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#unscheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable)(https://developer.android.com/reference/android/graphics/drawable/Drawable who, https://developer.android.com/reference/java/lang/Runnable what)
`

A Drawable can call this to unschedule an action previously
scheduled with `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback#scheduleDrawable(android.graphics.drawable.Drawable,%20java.lang.Runnable,%20long)`.


From interface `

https://developer.android.com/reference/android/view/KeyEvent.Callback

` `
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyDown(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a key down event has occurred.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyLongPress(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a long press has occurred.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyMultiple(int,%20int,%20android.view.KeyEvent)(int keyCode, int count, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a user's interaction with an analog control, such as
flinging a trackball, generates simulated down/up events for the same
key multiple times in quick succession.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/KeyEvent.Callback#onKeyUp(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event)
`

Called when a key up event has occurred.


From interface `

https://developer.android.com/reference/android/view/ViewManager

` `
abstract


void` `
https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View view, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params)
`

Assign the passed LayoutParams to the passed View and add the view to the window.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewManager#removeView(android.view.View)(https://developer.android.com/reference/android/view/View view)
` `
abstract


void` `
https://developer.android.com/reference/android/view/ViewManager#updateViewLayout(android.view.View,%20android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/View view, https://developer.android.com/reference/android/view/ViewGroup.LayoutParams params)
` From interface `

https://developer.android.com/reference/android/view/ViewParent

` `
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#bringChildToFront(android.view.View)(https://developer.android.com/reference/android/view/View child)
`

Change the z order of the child so it's on top of all other children.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#canResolveLayoutDirection()()
`

Tells if this view parent can resolve the layout direction.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#canResolveTextAlignment()()
`

Tells if this view parent can resolve the text alignment.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#canResolveTextDirection()()
`

Tells if this view parent can resolve the text direction.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#childDrawableStateChanged(android.view.View)(https://developer.android.com/reference/android/view/View child)
`

This method is called on the parent when a child's drawable state
has changed.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#childHasTransientStateChanged(android.view.View,%20boolean)(https://developer.android.com/reference/android/view/View child, boolean hasTransientState)
`

Called when a child view now has or no longer is tracking transient state.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#clearChildFocus(android.view.View)(https://developer.android.com/reference/android/view/View child)
`

Called when a child of this parent is giving up focus


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#createContextMenu(android.view.ContextMenu)(https://developer.android.com/reference/android/view/ContextMenu menu)
`

Have the parent populate the specified context menu if it has anything to
add (and then recurse on its parent).


`

default


https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` `
https://developer.android.com/reference/android/view/ViewParent#findOnBackInvokedDispatcherForChild(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View requester)
`

Walk up the View hierarchy to find the nearest `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`.


`
abstract


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/ViewParent#focusSearch(android.view.View,%20int)(https://developer.android.com/reference/android/view/View v, int direction)
`

Find the nearest view in the specified direction that wants to take focus


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#focusableViewAvailable(android.view.View)(https://developer.android.com/reference/android/view/View v)
`

Tells the parent that a new focusable view has become available.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#getChildVisibleRect(android.view.View,%20android.graphics.Rect,%20android.graphics.Point)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect r, https://developer.android.com/reference/android/graphics/Point offset)
`

Compute the visible part of a rectangular region defined in terms of a child view's
coordinates.


`
abstract


int` `
https://developer.android.com/reference/android/view/ViewParent#getLayoutDirection()()
`

Return this view parent layout direction.


`
abstract


https://developer.android.com/reference/android/view/ViewParent` `
https://developer.android.com/reference/android/view/ViewParent#getParent()()
`

Returns the parent if it exists, or null.


`
abstract


https://developer.android.com/reference/android/view/ViewParent` `
https://developer.android.com/reference/android/view/ViewParent#getParentForAccessibility()()
`

Gets the parent of a given View for accessibility.


`
abstract


int` `
https://developer.android.com/reference/android/view/ViewParent#getTextAlignment()()
`

Return this view parent text alignment.


`
abstract


int` `
https://developer.android.com/reference/android/view/ViewParent#getTextDirection()()
`

Return this view parent text direction.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#invalidateChild(android.view.View,%20android.graphics.Rect)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect r)
`

*This method was deprecated
in API level 26.
Use `https://developer.android.com/reference/android/view/ViewParent#onDescendantInvalidated(android.view.View,%20android.view.View)` instead.*


`
abstract


https://developer.android.com/reference/android/view/ViewParent` `
https://developer.android.com/reference/android/view/ViewParent#invalidateChildInParent(int[],%20android.graphics.Rect)(int[] location, https://developer.android.com/reference/android/graphics/Rect r)
`

*This method was deprecated
in API level 26.
Use `https://developer.android.com/reference/android/view/ViewParent#onDescendantInvalidated(android.view.View,%20android.view.View)` instead.*


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#isLayoutDirectionResolved()()
`

Tells if this view parent layout direction is resolved.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#isLayoutRequested()()
`

Indicates whether layout was requested on this view parent.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#isTextAlignmentResolved()()
`

Tells if this view parent text alignment is resolved.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#isTextDirectionResolved()()
`

Tells if this view parent text direction is resolved.


`
abstract


https://developer.android.com/reference/android/view/View` `
https://developer.android.com/reference/android/view/ViewParent#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.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#notifySubtreeAccessibilityStateChanged(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View source, int changeType)
`

Notifies a view parent that the accessibility state of one of its
descendants has changed and that the structure of the subtree is
different.


`

default


void` `
https://developer.android.com/reference/android/view/ViewParent#onDescendantInvalidated(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target)
`

The target View has been invalidated, or has had a drawing property changed that
requires the hierarchy to re-render.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#onNestedFling(android.view.View,%20float,%20float,%20boolean)(https://developer.android.com/reference/android/view/View target, float velocityX, float velocityY, boolean consumed)
`

Request a fling from a nested scroll.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#onNestedPreFling(android.view.View,%20float,%20float)(https://developer.android.com/reference/android/view/View target, float velocityX, float velocityY)
`

React to a nested fling before the target view consumes it.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#onNestedPrePerformAccessibilityAction(android.view.View,%20int,%20android.os.Bundle)(https://developer.android.com/reference/android/view/View target, int action, https://developer.android.com/reference/android/os/Bundle arguments)
`

React to an accessibility action delegated by a target descendant view before the target
processes it.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#onNestedPreScroll(android.view.View,%20int,%20int,%20int[])(https://developer.android.com/reference/android/view/View target, int dx, int dy, int[] consumed)
`

React to a nested scroll in progress before the target view consumes a portion of the scroll.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#onNestedScroll(android.view.View,%20int,%20int,%20int,%20int)(https://developer.android.com/reference/android/view/View target, int dxConsumed, int dyConsumed, int dxUnconsumed, int dyUnconsumed)
`

React to a nested scroll in progress.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#onNestedScrollAccepted(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target, int nestedScrollAxes)
`

React to the successful claiming of a nested scroll operation.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#onStartNestedScroll(android.view.View,%20android.view.View,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View target, int nestedScrollAxes)
`

React to a descendant view initiating a nestable scroll operation, claiming the
nested scroll operation if appropriate.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#onStopNestedScroll(android.view.View)(https://developer.android.com/reference/android/view/View target)
`

React to a nested scroll operation ending.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#recomputeViewAttributes(android.view.View)(https://developer.android.com/reference/android/view/View child)
`

Tell view hierarchy that the global view attributes need to be
re-evaluated.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#requestChildFocus(android.view.View,%20android.view.View)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/View focused)
`

Called when a child of this parent wants focus


`

default


boolean` `
https://developer.android.com/reference/android/view/ViewParent#requestChildRectangleOnScreen(android.view.View,%20android.graphics.Rect,%20boolean,%20int)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate, int source)
`

Called when a child of this group wants a particular rectangle to be
positioned onto the screen.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#requestChildRectangleOnScreen(android.view.View,%20android.graphics.Rect,%20boolean)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/graphics/Rect rectangle, boolean immediate)
`

Called when a child of this group wants a particular rectangle to be
positioned onto the screen.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#requestDisallowInterceptTouchEvent(boolean)(boolean disallowIntercept)
`

Called when a child does not want this parent and its ancestors to
intercept touch events with
`https://developer.android.com/reference/android/view/ViewGroup#onInterceptTouchEvent(android.view.MotionEvent)`.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#requestFitSystemWindows()()
`

Ask that a new dispatch of `https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)` be performed.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#requestLayout()()
`

Called when something has changed which has invalidated the layout of a
child of this view parent.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)(https://developer.android.com/reference/android/view/View child, https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent event)
`

Called by a child to request from its parent to send an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`.


`
abstract


void` `
https://developer.android.com/reference/android/view/ViewParent#requestTransparentRegion(android.view.View)(https://developer.android.com/reference/android/view/View child)
`

Called when a child wants the view hierarchy to gather and report
transparent regions to the window compositor.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#showContextMenuForChild(android.view.View)(https://developer.android.com/reference/android/view/View originalView)
`

Shows the context menu for the specified view or its ancestors.


`
abstract


boolean` `
https://developer.android.com/reference/android/view/ViewParent#showContextMenuForChild(android.view.View,%20float,%20float)(https://developer.android.com/reference/android/view/View originalView, float x, float y)
`

Shows the context menu for the specified view or its ancestors anchored
to the specified view-relative coordinate.


`
abstract


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/ViewParent#startActionModeForChild(android.view.View,%20android.view.ActionMode.Callback,%20int)(https://developer.android.com/reference/android/view/View originalView, https://developer.android.com/reference/android/view/ActionMode.Callback callback, int type)
`

Start an action mode of a specific type for the specified view.


`
abstract


https://developer.android.com/reference/android/view/ActionMode` `
https://developer.android.com/reference/android/view/ViewParent#startActionModeForChild(android.view.View,%20android.view.ActionMode.Callback)(https://developer.android.com/reference/android/view/View originalView, https://developer.android.com/reference/android/view/ActionMode.Callback callback)
`

Start an action mode for the specified view with the default type
`https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`.


## XML attributes

### android:addStatesFromChildren

Sets whether this ViewGroup's drawable states also include
its children's drawable states. This is used, for example, to
make a group appear to be focused when its child EditText or button
is focused.

May be a boolean value, such as "`true`" or
"`false`".

<br />

### android:alwaysDrawnWithCache

Defines whether the ViewGroup should always draw its children using their
drawing cache or not. The default value is true.
Deprecated: The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11.

May be a boolean value, such as "`true`" or
"`false`".

<br />

### android:animateLayoutChanges

Defines whether changes in layout (caused by adding and removing items) should
cause a LayoutTransition to run. When this flag is set to true, a default
LayoutTransition object will be set on the ViewGroup container and default
animations will run when these layout changes occur.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/ViewGroup#setLayoutTransition(android.animation.LayoutTransition)`

### android:animationCache

Defines whether layout animations should create a drawing cache for their
children. Enabling the animation cache consumes more memory and requires
a longer initialization but provides better performance. The animation
cache is enabled by default.

May be a boolean value, such as "`true`" or
"`false`".

<br />

### android:clipChildren

Defines whether a child is limited to draw inside of its bounds or not.
This is useful with animations that scale the size of the children to more
than 100% for instance. In such a case, this property should be set to false
to allow the children to draw outside of their bounds. The default value of
this property is true.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/ViewGroup#setClipChildren(boolean)`

### android:clipToPadding

Defines whether the ViewGroup will clip its children and resize (but not clip) any
EdgeEffect to its padding, if padding is not zero. This property is set to true by
default.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/ViewGroup#setClipToPadding(boolean)`

### android:descendantFocusability

Defines the relationship between the ViewGroup and its descendants
when looking for a View to take focus.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| afterDescendants | 1 | The ViewGroup will get focus only if none of its descendants want it. |
| beforeDescendants | 0 | The ViewGroup will get focus before any of its descendants. |
| blocksDescendants | 2 | The ViewGroup will block its descendants from receiving focus. |

<br />

<br />

### android:layoutAnimation

Defines the layout animation to use the first time the ViewGroup is laid out.
Layout animations can also be started manually after the first layout.

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:layoutMode

Defines the layout mode of this ViewGroup.

Must be one of the following constant values.

| Constant | Value | Description |
|---|---|---|
| clipBounds | 0 | Use the children's clip bounds when laying out this container. |
| opticalBounds | 1 | Use the children's optical bounds when laying out this container. |

<br />

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`

### android:persistentDrawingCache

Defines the persistence of the drawing cache. The drawing cache might be
enabled by a ViewGroup for all its children in specific situations (for
instance during a scrolling.) This property lets you persist the cache
in memory after its initial usage. Persisting the cache consumes more
memory but may prevent frequent garbage collection if the cache is created
over and over again. By default the persistence is set to scrolling.
Deprecated: The view drawing cache was largely made obsolete with the introduction of
hardware-accelerated rendering in API 11.

Must be one or more (separated by '\|') of the following constant values.

| Constant | Value | Description |
|---|---|---|
| all | 3 | The drawing cache is always persisted. |
| animation | 1 | The drawing cache is persisted after a layout animation. |
| none | 0 | The drawing cache is not persisted after use. |
| scrolling | 2 | The drawing cache is persisted after a scroll. |

<br />

<br />

### android:splitMotionEvents

Sets whether this ViewGroup should split MotionEvents
to separate child views during touch event dispatch.
If false (default prior to HONEYCOMB), touch events will be dispatched to
the child view where the first pointer went down until
the last pointer goes up.
If true (default for HONEYCOMB and later), touch events may be dispatched to
multiple children. MotionEvents for each pointer will be dispatched to the child
view where the initial ACTION_DOWN event happened.
See `https://developer.android.com/reference/android/view/ViewGroup#setMotionEventSplittingEnabled(boolean)`
for more information.

May be a boolean value, such as "`true`" or
"`false`".

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/ViewGroup#setMotionEventSplittingEnabled(boolean)`

## Constants

### CLIP_TO_PADDING_MASK

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected static final int CLIP_TO_PADDING_MASK
```

We clip to padding when FLAG_CLIP_TO_PADDING and FLAG_PADDING_NOT_NULL
are set at the same time.

<br />

Constant Value:

34
(0x00000022)


### FOCUS_AFTER_DESCENDANTS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_AFTER_DESCENDANTS
```

This view will get focus only if none of its descendants want it.

<br />

Constant Value:

262144
(0x00040000)


### FOCUS_BEFORE_DESCENDANTS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_BEFORE_DESCENDANTS
```

This view will get focus before any of its descendants.

<br />

Constant Value:

131072
(0x00020000)


### FOCUS_BLOCK_DESCENDANTS

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FOCUS_BLOCK_DESCENDANTS
```

This view will block any of its descendants from getting focus, even
if they are focusable.

<br />

Constant Value:

393216
(0x00060000)


### LAYOUT_MODE_CLIP_BOUNDS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_MODE_CLIP_BOUNDS
```

This constant is a `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`.
Clip bounds are the raw values of `https://developer.android.com/reference/android/view/View#getLeft()`, `https://developer.android.com/reference/android/view/View#getTop()`,
`https://developer.android.com/reference/android/view/View#getRight()` and `https://developer.android.com/reference/android/view/View#getBottom()`.

<br />

Constant Value:

0
(0x00000000)


### LAYOUT_MODE_OPTICAL_BOUNDS

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int LAYOUT_MODE_OPTICAL_BOUNDS
```

This constant is a `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`.
Optical bounds describe where a widget appears to be. They sit inside the clip
bounds which need to cover a larger area to allow other effects,
such as shadows and glows, to be drawn.

<br />

Constant Value:

1
(0x00000001)


### PERSISTENT_ALL_CACHES

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 PERSISTENT_ALL_CACHES
```


**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.

Used to indicate that all drawing caches should be kept in memory.

<br />

Constant Value:

3
(0x00000003)


### PERSISTENT_ANIMATION_CACHE

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 PERSISTENT_ANIMATION_CACHE
```


**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.

Used to indicate that the animation drawing cache should be kept in memory.

<br />

Constant Value:

1
(0x00000001)


### PERSISTENT_NO_CACHE

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 PERSISTENT_NO_CACHE
```


**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.

Used to indicate that no drawing cache should be kept in memory.

<br />

Constant Value:

0
(0x00000000)


### PERSISTENT_SCROLLING_CACHE

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 PERSISTENT_SCROLLING_CACHE
```


**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.

Used to indicate that the scrolling drawing cache should be kept in memory.

<br />

Constant Value:

2
(0x00000002)


## Public constructors

### ViewGroup

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup (Context context)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |

### ViewGroup

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup (Context context, 
                AttributeSet attrs)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet` <br /> |

### ViewGroup

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet` <br /> |
| `defStyleAttr` | `int` <br /> |

### ViewGroup

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup (Context context, 
                AttributeSet attrs, 
                int defStyleAttr, 
                int defStyleRes)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |
| `attrs` | `AttributeSet` <br /> |
| `defStyleAttr` | `int` <br /> |
| `defStyleRes` | `int` <br /> |

## 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 /> |

### 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` |

### 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 /> |

### addStatesFromChildren

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean addStatesFromChildren ()
```

Returns whether this ViewGroup's drawable states also include
its children's drawable states. This is used, for example, to
make a group appear to be focused when its child EditText or button
is focused.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### 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 /> |

### addView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (View child, 
                ViewGroup.LayoutParams params)
```

Adds a child view with the specified layout parameters.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child view to add <br /> |
| `params` | `ViewGroup.LayoutParams`: the layout parameters to set on the child <br /> |

### addView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (View child, 
                int index)
```

Adds a child view. If no layout parameters are already set on the child, the
default parameters for this ViewGroup are set on the child.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child view to add <br /> |
| `index` | `int`: the position at which to add the child <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#generateDefaultLayoutParams()`

### addView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (View child, 
                int index, 
                ViewGroup.LayoutParams params)
```

Adds a child view with the specified layout parameters.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child view to add <br /> |
| `index` | `int`: the position at which to add the child or -1 to add last <br /> |
| `params` | `ViewGroup.LayoutParams`: the layout parameters to set on the child <br /> |

### addView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (View child)
```

<br />

Adds a child view. If no layout parameters are already set on the child, the
default parameters for this ViewGroup are set on the child.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child view to add <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#generateDefaultLayoutParams()`

### addView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addView (View child, 
                int width, 
                int height)
```

Adds a child view with this ViewGroup's default layout parameters and the
specified width and height.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child view to add <br /> |
| `width` | `int` <br /> |
| `height` | `int` <br /> |

### bringChildToFront

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void bringChildToFront (View child)
```

Change the z order of the child so it's on top of all other children.
This ordering change may affect layout, if this 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/ViewParent#requestLayout()` and
`https://developer.android.com/reference/android/view/View#invalidate()` on this parent to force the parent to redraw
with the new child ordering.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child to bring to the top of the z order <br /> |

### childDrawableStateChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void childDrawableStateChanged (View child)
```

If `https://developer.android.com/reference/android/view/ViewGroup#addStatesFromChildren()` is true, refreshes this group's
drawable state (to include the states from its children).

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child whose drawable state has changed. This value cannot be `null`. <br /> |

### childHasTransientStateChanged

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void childHasTransientStateChanged (View child, 
                boolean childHasTransientState)
```

Called when a child view has changed whether or not it is tracking transient state.

<br />

| Parameters ||
|---|---|
| `child` | `View`: Child view whose state has changed. This value cannot be `null`. <br /> |
| `childHasTransientState` | `boolean`: true if this child has transient state <br /> |

### clearChildFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearChildFocus (View child)
```

Called when a child of this parent is giving up focus

<br />

| Parameters ||
|---|---|
| `child` | `View`: The view that is giving up focus <br /> |

### clearDisappearingChildren

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void clearDisappearingChildren ()
```

Removes any pending animations for views that have been removed. Call
this if you don't want animations for exiting views to stack up.

<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 />

### 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 /> |

### 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.
The implementation calls `https://developer.android.com/reference/android/view/ViewGroup#dispatchCreateViewTranslationRequest(java.util.Map<android.view.autofill.AutofillId,long[]>,%20int[],%20android.view.translation.TranslationCapability,%20java.util.List<android.view.translation.ViewTranslationRequest>)` for all the child views.

<br />

<br />

| Parameters ||
|---|---|
| `viewIds` | `Map`: This value cannot be `null`. <br /> |
| `supportedFormats` | `int`: 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`: This value may be `null`. <br /> |
| `requests` | `List`: 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 drawable hotspot changes to child views that meet at least
one of the following criteria:

- Returns `false` from both `https://developer.android.com/reference/android/view/View#isClickable()` and `https://developer.android.com/reference/android/view/View#isLongClickable()`
- Requests duplication of parent state via `https://developer.android.com/reference/android/view/View#setDuplicateParentStateEnabled(boolean)`

<br />

<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 />

### 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 /> |

### 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 /> |

### 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.

This implementation adds in all child views of the view group, in addition to calling the
default `https://developer.android.com/reference/android/view/View` implementation.

<br />

| Parameters ||
|---|---|
| `structure` | `ViewStructure`: fill in with structured view data for autofill purposes. This value cannot be `null`. <br /> |
| `flags` | `int`: Value is either `0` or - `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. This implementation
adds in all child views of the view group, in addition to calling the default View
implementation.

<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)
```

Handle the scroll capture search request by checking this view if applicable, then to each
child view.

<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 /> |

### dispatchSetActivated

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchSetActivated (boolean activated)
```

Dispatch setActivated to all of this View's children.

<br />

| Parameters ||
|---|---|
| `activated` | `boolean`: The new activated state <br /> |

### dispatchSetSelected

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void dispatchSetSelected (boolean selected)
```

Dispatch setSelected to all of this View's children.

<br />

| Parameters ||
|---|---|
| `selected` | `boolean`: The new selected state <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)

```
public void dispatchSystemUiVisibilityChanged (int visible)
```


**This method is deprecated.**   

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 ||
|---|---|
| `visible` | `int` <br /> |

### dispatchTouchEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean dispatchTouchEvent (MotionEvent ev)
```

Pass the touch screen motion event down to the target view, or this
view if it is the target.

<br />

| Parameters ||
|---|---|
| `ev` | `MotionEvent`: The motion event to be dispatched. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was handled by the view, false otherwise. <br /> |

### 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 /> |

### 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`: 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`: This value cannot be `null`. <br /> |

### 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`: This value cannot be `null`. <br /> |
| `runningAnimations` | `List`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `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`: This value cannot be `null`. <br /> |
| `bounds` | `WindowInsetsAnimation.Bounds`: This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `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)

```
public void dispatchWindowSystemUiVisiblityChanged (int visible)
```


**This method is deprecated.**   

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` |

### endViewTransition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void endViewTransition (View view)
```

This method should always be called following an earlier call to
`https://developer.android.com/reference/android/view/ViewGroup#startViewTransition(android.view.View)`. The given View is finally removed from its parent
and will no longer be displayed. Note that this method does not perform the functionality
of removing a view from its parent; it just discontinues the display of a View that
has previously been removed.

<br />

| Parameters ||
|---|---|
| `view` | `View` <br /> |

| Returns ||
|---|---|
| `void` | view The View object that has been removed but is being kept around in the visible hierarchy by an earlier call to `https://developer.android.com/reference/android/view/ViewGroup#startViewTransition(android.view.View)`. <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 /> |

### findOnBackInvokedDispatcherForChild

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public OnBackInvokedDispatcher findOnBackInvokedDispatcherForChild (View child, 
                View requester)
```

Walk up the View hierarchy to find the nearest `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The direct child of this view for which to find a dispatcher. This value cannot be `null`. <br /> |
| `requester` | `View`: The requester that will use the dispatcher. Can be the same as child. This value cannot be `null`. <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 the view is both not attached and have no ancestor providing an `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher`. <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 text, 
                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 /> |
| `text` | `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` |

### focusSearch

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View focusSearch (View focused, 
                int direction)
```

Find the nearest view in the specified direction that wants to take
focus.

<br />

| Parameters ||
|---|---|
| `focused` | `View`: The view that currently has focus <br /> |
| `direction` | `int`: One of FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, and FOCUS_RIGHT, or 0 for not applicable. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | <br /> |

### focusableViewAvailable

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void focusableViewAvailable (View v)
```

Tells the parent that a new focusable view has become available. This is
to handle transitions from the case where there are no focusable views to
the case where the first focusable view appears.

<br />

| Parameters ||
|---|---|
| `v` | `View`: The view that has become newly focusable <br /> |

### gatherTransparentRegion

Added in [API level 1](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 /> |

### generateLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroup.LayoutParams generateLayoutParams (AttributeSet attrs)
```

Returns a new set of layout parameters based on the supplied attributes set.

<br />

| Parameters ||
|---|---|
| `attrs` | `AttributeSet`: the attributes to build the layout parameters from <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | an instance of `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` or one of its descendants <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 /> |

### getChildAt

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View getChildAt (int index)
```

Returns the view at the specified position in the group.

<br />

| Parameters ||
|---|---|
| `index` | `int`: the position at which to get the view from <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | the view at the specified position or null if the position does not exist within the group <br /> |

### getChildCount

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChildCount ()
```

Returns the number of children in the group.

<br />

| Returns ||
|---|---|
| `int` | a positive integer representing the number of children in the group <br /> |

### getChildDrawingOrder

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final int getChildDrawingOrder (int drawingPosition)
```

Converts drawing order position to container position.


Children are not necessarily drawn in the order in which they appear in the container.
ViewGroups can enable a custom ordering via `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingOrderEnabled(boolean)`.
This method returns the container position of a child that appears in the given position
in the current drawing order.

<br />

| Parameters ||
|---|---|
| `drawingPosition` | `int`: the drawing order position. <br /> |

| Returns ||
|---|---|
| `int` | the container position of a child for this drawing order position. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`

### getChildMeasureSpec

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static int getChildMeasureSpec (int spec, 
                int padding, 
                int childDimension)
```

Does the hard part of measureChildren: figuring out the MeasureSpec to
pass to a particular child. This method figures out the right MeasureSpec
for one dimension (height or width) of one child view.

The goal is to combine information from our MeasureSpec with the
LayoutParams of the child to get the best possible results. For example,
if the this view knows its size (because its MeasureSpec has a mode of
EXACTLY), and the child has indicated in its LayoutParams that it wants
to be the same size as the parent, the parent should ask the child to
layout given an exact size.

<br />

| Parameters ||
|---|---|
| `spec` | `int`: The requirements for this view <br /> |
| `padding` | `int`: The padding of this view for the current dimension and margins, if applicable <br /> |
| `childDimension` | `int`: How big the child wants to be in the current dimension <br /> |

| Returns ||
|---|---|
| `int` | a MeasureSpec integer for the child <br /> |

### getChildVisibleRect

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getChildVisibleRect (View child, 
                Rect r, 
                Point offset)
```

Compute the visible part of a rectangular region defined in terms of a child view's
coordinates.

Returns the clipped visible part of the rectangle `r`, defined in the
`child`'s local coordinate system. `r` is modified by this method to
contain the result, expressed in the global (root) coordinate system.

The resulting rectangle is always axis aligned. If a rotation is applied to a node in the
View hierarchy, the result is the axis-aligned bounding box of the visible rectangle.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: A child View, whose rectangular visible region we want to compute <br /> |
| `r` | `Rect`: The input rectangle, defined in the child coordinate system. Will be overwritten to contain the resulting visible rectangle, expressed in global (root) coordinates <br /> |
| `offset` | `Point`: The input coordinates of a point, defined in the child coordinate system. As with the `r` parameter, this will be overwritten to contain the global (root) coordinates of that point. A `null` value is valid (in case you are not interested in this result) <br /> |

| Returns ||
|---|---|
| `boolean` | true if the resulting rectangle is not empty, false otherwise <br /> |

### getClipChildren

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getClipChildren ()
```

Returns whether this group's children are clipped to their bounds before drawing.
The default value is true.

<br />

| Returns ||
|---|---|
| `boolean` | True if the group's children will be clipped to their bounds, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setClipChildren(boolean)`

### getClipToPadding

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getClipToPadding ()
```

Returns whether this ViewGroup will clip its children to its padding, and resize (but
not clip) any EdgeEffect to the padded region, if padding is present.


By default, children are clipped to the padding of their parent
Viewgroup. This clipping behavior is only enabled if padding is non-zero.

<br />

**Related XML Attributes:**

- [android:clipToPadding](https://developer.android.com/reference/android/view/ViewGroup#attr_android:clipToPadding)

| Returns ||
|---|---|
| `boolean` | true if this ViewGroup clips children to its padding and resizes (but doesn't clip) any EdgeEffect to the padded region, false otherwise. <br /> |

### getDescendantFocusability

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getDescendantFocusability ()
```

Gets the descendant focusability of this view group. The descendant
focusability defines the relationship between this view group and its
descendants when looking for a view to take focus in
`https://developer.android.com/reference/android/view/ViewGroup#requestFocus(int,%20android.graphics.Rect)`.

<br />

| Returns ||
|---|---|
| `int` | one of `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BEFORE_DESCENDANTS`, `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_AFTER_DESCENDANTS`, `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS`. <br /> |

### getFocusedChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public View getFocusedChild ()
```

Returns the focused child of this view, if any. The child may have focus
or contain focus.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | the focused child or null. <br /> |

### getLayoutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LayoutAnimationController getLayoutAnimation ()
```

Returns the layout animation controller used to animate the group's
children.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/LayoutAnimationController` | the current animation controller <br /> |

### getLayoutAnimationListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Animation.AnimationListener getLayoutAnimationListener ()
```

Returns the animation listener to which layout animation events are
sent.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/animation/Animation.AnimationListener` | an `https://developer.android.com/reference/android/view/animation/Animation.AnimationListener` <br /> |

### getLayoutMode

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getLayoutMode ()
```

Returns the basis of alignment during layout operations on this ViewGroup:
either `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_CLIP_BOUNDS` or `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_OPTICAL_BOUNDS`.


If no layoutMode was explicitly set, either programmatically or in an XML resource,
the method returns the layoutMode of the view's parent ViewGroup if such a parent exists,
otherwise the method returns a default value of `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_CLIP_BOUNDS`.

<br />

| Returns ||
|---|---|
| `int` | the layout mode to use during layout operations <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setLayoutMode(int)`

### getLayoutTransition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public LayoutTransition getLayoutTransition ()
```

Gets the LayoutTransition object for this ViewGroup. If the LayoutTransition object is
not null, changes in layout which occur because of children being added to or removed from
the ViewGroup will be animated according to the animations defined in that LayoutTransition
object. By default, the transition object is null (so layout changes are not animated).

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/animation/LayoutTransition` | LayoutTranstion The LayoutTransition object that will animated changes in layout. A value of `null` means no transition will run on layout changes. <br /> |

### getNestedScrollAxes

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getNestedScrollAxes ()
```

Return the current axes of nested scrolling for this ViewGroup.

A ViewGroup returning something other than `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_NONE` is currently
acting as a nested scrolling parent for one or more descendant views in the hierarchy.

<br />

<br />

| Returns ||
|---|---|
| `int` | Flags indicating the current axes of nested scrolling <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_HORIZONTAL`
- `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_VERTICAL`
- `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_NONE`

### getOverlay

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewGroupOverlay getOverlay ()
```

Returns the ViewGroupOverlay for this view group, creating it if it does
not yet exist. In addition to `https://developer.android.com/reference/android/view/ViewOverlay`'s support for drawables,
`https://developer.android.com/reference/android/view/ViewGroupOverlay` allows views to be added to the overlay. These
views, like overlay drawables, are visual-only; they do not receive input
events and should not be used as anything other than a temporary
representation of a view in a parent container, such as might be used
by an animation effect.

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/ViewGroupOverlay` | The ViewGroupOverlay object for this view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroupOverlay`

### getPersistentDrawingCache

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 getPersistentDrawingCache ()
```


**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 an integer indicating what types of drawing caches are kept in memory.

<br />

| Returns ||
|---|---|
| `int` | one or a combination of `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_NO_CACHE`, `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_ANIMATION_CACHE`, `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_SCROLLING_CACHE` and `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_ALL_CACHES` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setPersistentDrawingCache(int)`
- `https://developer.android.com/reference/android/view/ViewGroup#setAnimationCacheEnabled(boolean)`

### getTouchscreenBlocksFocus

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean getTouchscreenBlocksFocus ()
```

Check whether this ViewGroup should ignore focus requests for itself and its children.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### 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 or contains focus

<br />

| Returns ||
|---|---|
| `boolean` | true if this view has or contains focus <br /> |

### 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 /> |

### indexOfChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int indexOfChild (View child)
```

Returns the position in the group of the specified child view.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the view for which to get the position <br /> |

| Returns ||
|---|---|
| `int` | a positive integer representing the position of the view in the group, or -1 if the view does not exist in the group <br /> |

### invalidateChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void invalidateChild (View child, 
                Rect dirty)
```


**This method is deprecated.**   

Use `https://developer.android.com/reference/android/view/ViewGroup#onDescendantInvalidated(android.view.View,%20android.view.View)` instead to observe updates to
draw state in descendants.

Don't call or override this method. It is used for the implementation of
the view hierarchy.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child which is dirty <br /> |
| `dirty` | `Rect`: The area within the child that is invalid <br /> |

### invalidateChildInParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ViewParent invalidateChildInParent (int[] location, 
                Rect dirty)
```


**This method is deprecated.**   

Use `https://developer.android.com/reference/android/view/ViewGroup#onDescendantInvalidated(android.view.View,%20android.view.View)` instead to observe updates to
draw state in descendants.

Don't call or override this method. It is used for the implementation of
the view hierarchy.

This implementation returns null if this ViewGroup does not have a parent,
if this ViewGroup is already fully invalidated or if the dirty rectangle
does not intersect with this ViewGroup's bounds.

<br />

| Parameters ||
|---|---|
| `location` | `int`: An array of 2 ints containing the left and top coordinates of the child to invalidate <br /> |
| `dirty` | `Rect`: The area within the child that is invalid <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewParent` | the parent of this ViewParent or null <br /> |

### isAlwaysDrawnWithCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAlwaysDrawnWithCacheEnabled ()
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Child views may no longer have their caching behavior disabled by parents.

Indicates whether this ViewGroup will always try to draw its children using their
drawing cache. By default this property is enabled.

<br />

| Returns ||
|---|---|
| `boolean` | true if the animation cache is enabled, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setAlwaysDrawnWithCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawnWithCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`

### isAnimationCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isAnimationCacheEnabled ()
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Caching behavior of children may be controlled through `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`.

Indicates whether the children's drawing cache is used during a layout
animation. By default, the drawing cache is enabled but this will prevent
nested layout animations from working. To nest animations, you must disable
the cache.

<br />

| Returns ||
|---|---|
| `boolean` | true if the animation cache is enabled, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setAnimationCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`

### isLayoutSuppressed

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isLayoutSuppressed ()
```

Returns whether layout calls on this container are currently being
suppressed, due to an earlier call to `https://developer.android.com/reference/android/view/ViewGroup#suppressLayout(boolean)`.

<br />

| Returns ||
|---|---|
| `boolean` | true if layout calls are currently suppressed, false otherwise. <br /> |

### isMotionEventSplittingEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isMotionEventSplittingEnabled ()
```

Returns true if MotionEvents dispatched to this ViewGroup can be split to multiple children.

<br />

| Returns ||
|---|---|
| `boolean` | true if MotionEvents dispatched to this ViewGroup can be split to multiple children. <br /> |

### isTransitionGroup

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isTransitionGroup ()
```

Returns true if this ViewGroup should be considered as a single entity for removal
when executing an Activity transition. If this is false, child elements will move
individually during the transition.

<br />

| Returns ||
|---|---|
| `boolean` | True if the ViewGroup should be acted on together during an Activity transition. The default value is true when there is a non-null background or if `https://developer.android.com/reference/android/view/View#getTransitionName()` is not null or if a non-null `https://developer.android.com/reference/android/view/ViewOutlineProvider` other than `https://developer.android.com/reference/android/view/ViewOutlineProvider#BACKGROUND` was given to `https://developer.android.com/reference/android/view/View#setOutlineProvider(android.view.ViewOutlineProvider)` and false otherwise. <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 />

### layout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final 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 /> |

### notifySubtreeAccessibilityStateChanged

Added in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void notifySubtreeAccessibilityStateChanged (View child, 
                View source, 
                int changeType)
```

Notifies a view parent that the accessibility state of one of its
descendants has changed and that the structure of the subtree is
different.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The direct child whose subtree has changed. This value cannot be `null`. <br /> |
| `source` | `View`: The descendant view that changed. May not be `null`. <br /> |
| `changeType` | `int`: A bit mask of the types of changes that occurred. One or more of: - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_STATE_DESCRIPTION` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_SUBTREE` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_TEXT` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_UNDEFINED` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_DRAG_STARTED` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_DRAG_CANCELLED` - `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent#CONTENT_CHANGE_TYPE_DRAG_DROPPED` <br /> |

### offsetDescendantRectToMyCoords

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void offsetDescendantRectToMyCoords (View descendant, 
                Rect rect)
```

Offset a rectangle that is in a descendant's coordinate
space into our coordinate space.

<br />

| Parameters ||
|---|---|
| `descendant` | `View`: A descendant of this view <br /> |
| `rect` | `Rect`: A rectangle defined in descendant's coordinate space. <br /> |

### offsetRectIntoDescendantCoords

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final void offsetRectIntoDescendantCoords (View descendant, 
                Rect rect)
```

Offset a rectangle that is in our coordinate space into an ancestor's
coordinate space.

<br />

| Parameters ||
|---|---|
| `descendant` | `View`: A descendant of this view <br /> |
| `rect` | `Rect`: A rectangle defined in descendant's coordinate space. <br /> |

### onDescendantInvalidated

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onDescendantInvalidated (View child, 
                View target)
```

The target View has been invalidated, or has had a drawing property changed that
requires the hierarchy to re-render.

This method is called by the View hierarchy to signal ancestors that a View either needs to
re-record its drawing commands, or drawing properties have changed. This is how Views
schedule a drawing traversal.

This signal is generally only dispatched for attached Views, since only they need to draw.

If you override this method you *must* call through to the
superclass implementation.

<br />

| Parameters ||
|---|---|
| `child` | `View`: This value cannot be `null`. <br /> |
| `target` | `View`: This value cannot be `null`. <br /> |

### onInterceptHoverEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onInterceptHoverEvent (MotionEvent event)
```

Implement this method to intercept hover events before they are handled
by child views.


This method is called before dispatching a hover event to a child of
the view group or to the view group's own `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)` to allow
the view group a chance to intercept the hover event.
This method can also be used to watch all pointer motions that occur within
the bounds of the view group even when the pointer is hovering over
a child of the view group rather than over the view group itself.


The view group can prevent its children from receiving hover events by
implementing this method and returning `true` to indicate
that it would like to intercept hover events. The view group must
continuously return `true` from `https://developer.android.com/reference/android/view/ViewGroup#onInterceptHoverEvent(android.view.MotionEvent)`
for as long as it wishes to continue intercepting hover events from
its children.


Interception preserves the invariant that at most one view can be
hovered at a time by transferring hover focus from the currently hovered
child to the view group or vice-versa as needed.


If this method returns `true` and a child is already hovered, then the
child view will first receive a hover exit event and then the view group
itself will receive a hover enter event in `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)`.
Likewise, if this method had previously returned `true` to intercept hover
events and instead returns `false` while the pointer is hovering
within the bounds of one of a child, then the view group will first receive a
hover exit event in `https://developer.android.com/reference/android/view/View#onHoverEvent(android.view.MotionEvent)` and then the hovered child will
receive a hover enter event.


The default implementation handles mouse hover on the scroll bars.

<br />

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent`: The motion event that describes the hover. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the view group would like to intercept the hover event and prevent its children from receiving it. <br /> |

### onInterceptTouchEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onInterceptTouchEvent (MotionEvent ev)
```

Implement this method to intercept all touch screen motion events. This
allows you to watch events as they are dispatched to your children, and
take ownership of the current gesture at any point.

Using this function takes some care, as it has a fairly complicated
interaction with `https://developer.android.com/reference/android/view/View#onTouchEvent(android.view.MotionEvent)`, and using it requires implementing
that method as well as this one in the correct way. Events will be
received in the following order:

1. You will receive the down event here.
2. The down event will be handled either by a child of this view group, or given to your own onTouchEvent() method to handle; this means you should implement onTouchEvent() to return true, so you will continue to see the rest of the gesture (instead of looking for a parent view to handle it). Also, by returning true from onTouchEvent(), you will not receive any following events in onInterceptTouchEvent() and all touch processing must happen in onTouchEvent() like normal.
3. For as long as you return false from this function, each following event (up to and including the final up) will be delivered first here and then to the target's onTouchEvent().
4. If you return true from here, you will not receive any following events: the target view will receive the same event but with the action `https://developer.android.com/reference/android/view/MotionEvent#ACTION_CANCEL`, and all further events will be delivered to your onTouchEvent() method and no longer appear here.

<br />

<br />

| Parameters ||
|---|---|
| `ev` | `MotionEvent`: The motion event being dispatched down the hierarchy. <br /> |

| Returns ||
|---|---|
| `boolean` | Return true to steal motion events from the children and have them dispatched to this ViewGroup through onTouchEvent(). The current target will receive an ACTION_CANCEL event, and no further messages will be delivered here. <br /> |

### onNestedFling

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onNestedFling (View target, 
                float velocityX, 
                float velocityY, 
                boolean consumed)
```

Request a fling from a nested scroll.

This method signifies 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 ||
|---|---|
| `target` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |
| `velocityX` | `float`: Horizontal velocity in pixels per second <br /> |
| `velocityY` | `float`: Vertical velocity in pixels per second <br /> |
| `consumed` | `boolean`: true if the child consumed the fling, false otherwise <br /> |

| Returns ||
|---|---|
| `boolean` | true if this parent consumed or otherwise reacted to the fling <br /> |

### onNestedPreFling

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onNestedPreFling (View target, 
                float velocityX, 
                float velocityY)
```

React to a nested fling before the target view consumes it.

This method siginfies that a nested scrolling child has detected a fling with the given
velocity along each axis. 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 parent is consuming motion as part of a
`https://developer.android.com/reference/android/view/ViewParent#onNestedPreScroll(android.view.View,%20int,%20int,%20int[])`, it may be appropriate for
it to also consume the pre-fling to complete that same motion. By returning
`true` from this method, the parent indicates that the child should not
fling its own internal content as well.

<br />

<br />

| Parameters ||
|---|---|
| `target` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |
| `velocityX` | `float`: Horizontal velocity in pixels per second <br /> |
| `velocityY` | `float`: Vertical velocity in pixels per second <br /> |

| Returns ||
|---|---|
| `boolean` | true if this parent consumed the fling ahead of the target view <br /> |

### onNestedPrePerformAccessibilityAction

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onNestedPrePerformAccessibilityAction (View target, 
                int action, 
                Bundle args)
```

React to an accessibility action delegated by a target descendant view before the target
processes it.

This method may be called by a target descendant view if the target wishes to give
a view in its parent chain a chance to react to the event before normal processing occurs.
Most commonly this will be a scroll event such as
`https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#ACTION_SCROLL_FORWARD`.
A ViewParent that supports acting as a nested scrolling parent should override this
method and act accordingly to implement scrolling via accesibility systems.

Subclasses should always call `super.onNestedPrePerformAccessibilityAction`

<br />

<br />

| Parameters ||
|---|---|
| `target` | `View`: The target view dispatching this action <br /> |
| `action` | `int`: Action being performed; see `https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo` <br /> |
| `args` | `Bundle`: Optional action arguments <br /> |

| Returns ||
|---|---|
| `boolean` | false by default. Subclasses should return true if they handle the event. <br /> |

### onNestedPreScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onNestedPreScroll (View target, 
                int dx, 
                int dy, 
                int[] consumed)
```

React to a nested scroll in progress before the target view consumes a portion of the scroll.

When working with nested scrolling often the parent view may want an opportunity
to consume the scroll before the nested scrolling child does. An example of this is a
drawer that contains a scrollable list. The user will want to be able to scroll the list
fully into view before the list itself begins scrolling.

`onNestedPreScroll` is called when a nested scrolling child invokes
`https://developer.android.com/reference/android/view/View#dispatchNestedPreScroll(int,%20int,%20int[],%20int[])`. The implementation should
report how any pixels of the scroll reported by dx, dy were consumed in the
`consumed` array. Index 0 corresponds to dx and index 1 corresponds to dy.
This parameter will never be null. Initial values for consumed\[0\] and consumed\[1\]
will always be 0.

<br />

<br />

| Parameters ||
|---|---|
| `target` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |
| `dx` | `int`: Horizontal scroll distance in pixels <br /> |
| `dy` | `int`: Vertical scroll distance in pixels <br /> |
| `consumed` | `int`: Output. The horizontal and vertical scroll distance consumed by this parent. This value cannot be `null`. <br /> |

### onNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onNestedScroll (View target, 
                int dxConsumed, 
                int dyConsumed, 
                int dxUnconsumed, 
                int dyUnconsumed)
```

React to a nested scroll in progress.

This method will be called when the ViewParent's current nested scrolling child view
dispatches a nested scroll event. To receive calls to this method the ViewParent must have
previously returned `true` for a call to
`https://developer.android.com/reference/android/view/ViewParent#onStartNestedScroll(android.view.View,%20android.view.View,%20int)`.

Both the consumed and unconsumed portions of the scroll distance are reported to the
ViewParent. An implementation may choose to use the consumed portion to match or chase scroll
position of multiple child elements, for example. The unconsumed portion may be used to
allow continuous dragging of multiple scrolling or draggable elements, such as scrolling
a list within a vertical drawer where the drawer begins dragging once the edge of inner
scrolling content is reached.

<br />

<br />

| Parameters ||
|---|---|
| `target` | `View`: The descendent view controlling the nested scroll. This value cannot be `null`. <br /> |
| `dxConsumed` | `int`: Horizontal scroll distance in pixels already consumed by target <br /> |
| `dyConsumed` | `int`: Vertical scroll distance in pixels already consumed by target <br /> |
| `dxUnconsumed` | `int`: Horizontal scroll distance in pixels not consumed by target <br /> |
| `dyUnconsumed` | `int`: Vertical scroll distance in pixels not consumed by target <br /> |

### onNestedScrollAccepted

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onNestedScrollAccepted (View child, 
                View target, 
                int axes)
```

React to the successful claiming of a nested scroll operation.

This method will be called after
`https://developer.android.com/reference/android/view/ViewParent#onStartNestedScroll(android.view.View,%20android.view.View,%20int)` returns true. It offers
an opportunity for the view and its superclasses to perform initial configuration
for the nested scroll. Implementations of this method should always call their superclass's
implementation of this method if one is present.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: Direct child of this ViewParent containing target. This value cannot be `null`. <br /> |
| `target` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |
| `axes` | `int`: Flags consisting of `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_HORIZONTAL`, `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_VERTICAL` or both <br /> |

### onRequestSendAccessibilityEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onRequestSendAccessibilityEvent (View child, 
                AccessibilityEvent event)
```

Called when a child has requested sending an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent` and
gives an opportunity to its parent to augment the event.


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#onRequestSendAccessibilityEvent(android.view.ViewGroup,%20android.view.View,%20android.view.accessibility.AccessibilityEvent)`
is responsible for handling this call.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child which requests sending the event. <br /> |
| `event` | `AccessibilityEvent`: The event to be sent. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event should be sent. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#requestSendAccessibilityEvent(android.view.View,%20android.view.accessibility.AccessibilityEvent)`

### 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 /> |

### onStartNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean onStartNestedScroll (View child, 
                View target, 
                int nestedScrollAxes)
```

React to a descendant view initiating a nestable scroll operation, claiming the
nested scroll operation if appropriate.

This method will be called in response to a descendant view invoking
`https://developer.android.com/reference/android/view/View#startNestedScroll(int)`. Each parent up the view hierarchy will be
given an opportunity to respond and claim the nested scrolling operation by returning
`true`.

This method may be overridden by ViewParent implementations to indicate when the view
is willing to support a nested scrolling operation that is about to begin. If it returns
true, this ViewParent will become the target view's nested scrolling parent for the duration
of the scroll operation in progress. When the nested scroll is finished this ViewParent
will receive a call to `https://developer.android.com/reference/android/view/ViewParent#onStopNestedScroll(android.view.View)`.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: Direct child of this ViewParent containing target. This value cannot be `null`. <br /> |
| `target` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |
| `nestedScrollAxes` | `int`: Flags consisting of `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_HORIZONTAL`, `https://developer.android.com/reference/android/view/View#SCROLL_AXIS_VERTICAL` or both <br /> |

| Returns ||
|---|---|
| `boolean` | true if this ViewParent accepts the nested scroll operation <br /> |

### onStopNestedScroll

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onStopNestedScroll (View child)
```

React to a nested scroll operation ending.

Perform cleanup after a nested scrolling operation.
This method will be called when a nested scroll stops, for example when a nested touch
scroll ends with a `https://developer.android.com/reference/android/view/MotionEvent#ACTION_UP` or `https://developer.android.com/reference/android/view/MotionEvent#ACTION_CANCEL` event.
Implementations of this method should always call their superclass's implementation of this
method if one is present.

The default implementation of onStopNestedScroll calls
`https://developer.android.com/reference/android/view/View#stopNestedScroll()` to halt any recursive nested scrolling in progress.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: View that initiated the nested scroll. This value cannot be `null`. <br /> |

### onViewAdded

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onViewAdded (View child)
```

Called when a new child is added to this ViewGroup. Overrides should always
call super.onViewAdded.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the added child view <br /> |

### onViewRemoved

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void onViewRemoved (View child)
```

Called when a child view is removed from this ViewGroup. Overrides should always
call super.onViewRemoved.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the removed child view <br /> |

### propagateRequestedFrameRate

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void propagateRequestedFrameRate (float frameRate, 
                boolean forceOverride)
```

You can set the preferred frame rate for a ViewGroup and its children 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 ViewGroup or any of its children is invalidated.
To undo the frame rate propagation, call the API with REQUESTED_FRAME_RATE_CATEGORY_DEFAULT.

<br />

| Parameters ||
|---|---|
| `frameRate` | `float`: the preferred frame rate of the ViewGroup. <br /> |
| `forceOverride` | `boolean`: indicate whether it should override the frame rate of all the children with the given frame rate. <br /> |

### recomputeViewAttributes

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void recomputeViewAttributes (View child)
```

Tell view hierarchy that the global view attributes need to be
re-evaluated.

<br />

| Parameters ||
|---|---|
| `child` | `View`: View whose attributes have changed. <br /> |

### removeAllViews

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeAllViews ()
```

Call this method to remove all child views from the
ViewGroup.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

### removeAllViewsInLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeAllViewsInLayout ()
```

Called by a ViewGroup subclass to remove child views from itself,
when it must first know its size on screen before it can calculate how many
child views it will render. An example is a Gallery or a ListView, which
may "have" 50 children, but actually only render the number of children
that can currently fit inside the object on screen. Do not call
this method unless you are extending ViewGroup and understand the
view measuring and layout pipeline.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

### removeView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeView (View view)
```


**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `view` | `View` <br /> |

### removeViewAt

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeViewAt (int index)
```

Removes the view at the specified position in the group.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `index` | `int`: the position in the group of the view to remove <br /> |

### removeViewInLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeViewInLayout (View view)
```

Removes a view during layout. This is useful if in your onLayout() method,
you need to remove more views.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `view` | `View`: the view to remove from the group <br /> |

### removeViews

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeViews (int start, 
                int count)
```

Removes the specified range of views from the group.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `start` | `int`: the first position in the group of the range of views to remove <br /> |
| `count` | `int`: the number of views to remove <br /> |

### removeViewsInLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeViewsInLayout (int start, 
                int count)
```

Removes a range of views during layout. This is useful if in your onLayout() method,
you need to remove more views.

**Note:** do not invoke this method from
`https://developer.android.com/reference/android/view/View#draw(android.graphics.Canvas)`, `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
`https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)` or any related method.

<br />

<br />

| Parameters ||
|---|---|
| `start` | `int`: the index of the first view to remove from the group <br /> |
| `count` | `int`: the number of views to remove from the group <br /> |

### requestChildFocus

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestChildFocus (View child, 
                View focused)
```

Called when a child of this parent wants focus

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child of this ViewParent that wants focus. This view will contain the focused view. It is not necessarily the view that actually has focus. <br /> |
| `focused` | `View`: The view that is a descendant of child that actually has focus <br /> |

### requestChildRectangleOnScreen

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestChildRectangleOnScreen (View child, 
                Rect rectangle, 
                boolean immediate)
```

Called when a child of this group wants a particular rectangle to be
positioned onto the screen. `https://developer.android.com/reference/android/view/ViewGroup`s overriding this can trust
that:

- `child` will be a direct child of this group
- `rectangle` will be in the child's content coordinates

`https://developer.android.com/reference/android/view/ViewGroup`s overriding this should uphold the contract:

- nothing will change if the rectangle is already visible
- the view port will be scrolled only just enough to make the rectangle visible

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: The direct child making the request. This value cannot be `null`. <br /> |
| `rectangle` | `Rect`: The rectangle in the child's coordinates the child wishes to be on the screen. <br /> |
| `immediate` | `boolean`: True to forbid animated or delayed scrolling, false otherwise <br /> |

| Returns ||
|---|---|
| `boolean` | Whether the group scrolled to handle the operation <br /> |

### requestChildRectangleOnScreen

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public boolean requestChildRectangleOnScreen (View child, 
                Rect rectangle, 
                boolean immediate, 
                int source)
```

Called when a child of this group wants a particular rectangle to be
positioned onto the screen. `https://developer.android.com/reference/android/view/ViewGroup`s overriding this can trust
that:

- `child` will be a direct child of this group
- `rectangle` will be in the child's content coordinates

`https://developer.android.com/reference/android/view/ViewGroup`s overriding this should uphold the contract:

- nothing will change if the rectangle is already visible
- the view port will be scrolled only just enough to make the rectangle visible

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: This value cannot be `null`. <br /> |
| `rectangle` | `Rect`: This value cannot be `null`. <br /> |
| `immediate` | `boolean`: True to forbid animated or delayed scrolling, false otherwise <br /> |
| `source` | `int`: 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 the group scrolled to handle the operation <br /> |

### requestDisallowInterceptTouchEvent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestDisallowInterceptTouchEvent (boolean disallowIntercept)
```

Called when a child does not want this parent and its ancestors to
intercept touch events with
`https://developer.android.com/reference/android/view/ViewGroup#onInterceptTouchEvent(android.view.MotionEvent)`.

This parent should pass this call onto its parents. This parent must obey
this request for the duration of the touch (that is, only clear the flag
after this parent has received an up or a cancel.

<br />

<br />

| Parameters ||
|---|---|
| `disallowIntercept` | `boolean`: True if the child does not want the parent to intercept touch events. <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.

Looks for a view to give focus to respecting the setting specified by
`https://developer.android.com/reference/android/view/ViewGroup#getDescendantFocusability()`.

Uses `https://developer.android.com/reference/android/view/ViewGroup#onRequestFocusInDescendants(int,%20android.graphics.Rect)` to
find focus within the children of this group when appropriate.

<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 /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BEFORE_DESCENDANTS`
- `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_AFTER_DESCENDANTS`
- `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS`
- `https://developer.android.com/reference/android/view/ViewGroup#onRequestFocusInDescendants(int,%20android.graphics.Rect)`

### requestSendAccessibilityEvent

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean requestSendAccessibilityEvent (View child, 
                AccessibilityEvent event)
```

Called by a child to request from its parent to send an `https://developer.android.com/reference/android/view/accessibility/AccessibilityEvent`.
The child has already populated a record for itself in the event and is delegating
to its parent to send the event. The parent can optionally add a record for itself.


Note: An accessibility event is fired by an individual view which populates the
event with a record for its state and requests from its parent to perform
the sending. The parent can optionally add a record for itself before
dispatching the request to its parent. A parent can also choose not to
respect the request for sending the event. The accessibility event is sent
by the topmost view in the view tree.

<br />

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child which requests sending the event. This value cannot be `null`. <br /> |
| `event` | `AccessibilityEvent`: The event to be sent. <br /> |

| Returns ||
|---|---|
| `boolean` | True if the event was sent. <br /> |

### requestTransparentRegion

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestTransparentRegion (View child)
```

Called when a child wants the view hierarchy to gather and report
transparent regions to the window compositor. Views that "punch" holes in
the view hierarchy, such as SurfaceView can use this API to improve
performance of the system. When no such a view is present in the
hierarchy, this optimization in unnecessary and might slightly reduce the
view hierarchy performance.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the view requesting the transparent region computation <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 /> |

### scheduleLayoutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void scheduleLayoutAnimation ()
```

Schedules the layout animation to be played after the next layout pass
of this view group. This can be used to restart the layout animation
when the content of the view group changes or when the activity is
paused and resumed.

<br />

### setAddStatesFromChildren

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAddStatesFromChildren (boolean addsStates)
```

Sets whether this ViewGroup's drawable states also include
its children's drawable states. This is used, for example, to
make a group appear to be focused when its child EditText or button
is focused.

<br />

| Parameters ||
|---|---|
| `addsStates` | `boolean` <br /> |

### setAlwaysDrawnWithCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAlwaysDrawnWithCacheEnabled (boolean always)
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Child views may no longer have their caching behavior disabled by parents.

Indicates whether this ViewGroup will always try to draw its children using their
drawing cache. This property can be set to true when the cache rendering is
slightly different from the children's normal rendering. Renderings can be different,
for instance, when the cache's quality is set to low.

When this property is disabled, the ViewGroup will use the drawing cache of its
children only when asked to. It's usually the task of subclasses to tell ViewGroup
when to start using the drawing cache and when to stop using it.

<br />

| Parameters ||
|---|---|
| `always` | `boolean`: true to always draw with the drawing cache, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#isAlwaysDrawnWithCacheEnabled()`
- `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawnWithCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheQuality(int)`

### setAnimationCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setAnimationCacheEnabled (boolean enabled)
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Caching behavior of children may be controlled through `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)`.

Enables or disables the children's drawing cache during a layout animation.
By default, the drawing cache is enabled but this will prevent nested
layout animations from working. To nest animations, you must disable the
cache.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable the animation cache, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#isAnimationCacheEnabled()`
- `https://developer.android.com/reference/android/view/View#setDrawingCacheEnabled(boolean)`

### setClipChildren

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClipChildren (boolean clipChildren)
```

By default, children are clipped to their bounds before drawing. This
allows view groups to override this behavior for animations, etc.

<br />

**Related XML Attributes:**

- [android:clipChildren](https://developer.android.com/reference/android/view/ViewGroup#attr_android:clipChildren)

| Parameters ||
|---|---|
| `clipChildren` | `boolean`: true to clip children to their bounds, false otherwise <br /> |

### setClipToPadding

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setClipToPadding (boolean clipToPadding)
```

Sets whether this ViewGroup will clip its children to its padding and resize (but not
clip) any EdgeEffect to the padded region, if padding is present.


By default, children are clipped to the padding of their parent
ViewGroup. This clipping behavior is only enabled if padding is non-zero.

<br />

**Related XML Attributes:**

- [android:clipToPadding](https://developer.android.com/reference/android/view/ViewGroup#attr_android:clipToPadding)

| Parameters ||
|---|---|
| `clipToPadding` | `boolean`: true to clip children to the padding of the group, and resize (but not clip) any EdgeEffect to the padded region. False otherwise. <br /> |

### setDescendantFocusability

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setDescendantFocusability (int focusability)
```

Set the descendant focusability of this view group. This defines the relationship
between this view group and its descendants when looking for a view to
take focus in `https://developer.android.com/reference/android/view/ViewGroup#requestFocus(int,%20android.graphics.Rect)`.

<br />

| Parameters ||
|---|---|
| `focusability` | `int`: one of `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BEFORE_DESCENDANTS`, `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_AFTER_DESCENDANTS`, `https://developer.android.com/reference/android/view/ViewGroup#FOCUS_BLOCK_DESCENDANTS`. <br /> |

### setLayoutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutAnimation (LayoutAnimationController controller)
```

Sets the layout animation controller used to animate the group's
children after the first layout.

<br />

| Parameters ||
|---|---|
| `controller` | `LayoutAnimationController`: the animation controller <br /> |

### setLayoutAnimationListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutAnimationListener (Animation.AnimationListener animationListener)
```

Specifies the animation listener to which layout animation events must
be sent. Only
`https://developer.android.com/reference/android/view/animation/Animation.AnimationListener#onAnimationStart(android.view.animation.Animation)`
and
`https://developer.android.com/reference/android/view/animation/Animation.AnimationListener#onAnimationEnd(android.view.animation.Animation)`
are invoked.

<br />

| Parameters ||
|---|---|
| `animationListener` | `Animation.AnimationListener`: the layout animation listener <br /> |

### setLayoutMode

Added in [API level 18](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutMode (int layoutMode)
```

Sets the basis of alignment during the layout of this ViewGroup.
Valid values are either `https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_CLIP_BOUNDS` or
`https://developer.android.com/reference/android/view/ViewGroup#LAYOUT_MODE_OPTICAL_BOUNDS`.

<br />

**Related XML Attributes:**

- [android:layoutMode](https://developer.android.com/reference/android/view/ViewGroup#attr_android:layoutMode)

| Parameters ||
|---|---|
| `layoutMode` | `int`: the layout mode to use during layout operations <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#getLayoutMode()`

### setLayoutTransition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setLayoutTransition (LayoutTransition transition)
```

Sets the LayoutTransition object for this ViewGroup. If the LayoutTransition object is
not null, changes in layout which occur because of children being added to or removed from
the ViewGroup will be animated according to the animations defined in that LayoutTransition
object. By default, the transition object is null (so layout changes are not animated).

Replacing a non-null transition will cause that previous transition to be
canceled, if it is currently running, to restore this container to
its correct post-transition state.

<br />

<br />

**Related XML Attributes:**

- [android:animateLayoutChanges](https://developer.android.com/reference/android/view/ViewGroup#attr_android:animateLayoutChanges)

| Parameters ||
|---|---|
| `transition` | `LayoutTransition`: The LayoutTransition object that will animated changes in layout. A value of `null` means no transition will run on layout changes. <br /> |

### setMotionEventSplittingEnabled

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setMotionEventSplittingEnabled (boolean split)
```

Enable or disable the splitting of MotionEvents to multiple children during touch event
dispatch. This behavior is enabled by default for applications that target an
SDK version of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#HONEYCOMB` or newer.

When this option is enabled MotionEvents may be split and dispatched to different child
views depending on where each pointer initially went down. This allows for user interactions
such as scrolling two panes of content independently, chording of buttons, and performing
independent gestures on different pieces of content.

<br />

**Related XML Attributes:**

- [android:splitMotionEvents](https://developer.android.com/reference/android/view/ViewGroup#attr_android:splitMotionEvents)

| Parameters ||
|---|---|
| `split` | `boolean`: `true` to allow MotionEvents to be split and dispatched to multiple child views. `false` to only allow one child view to be the target of any MotionEvent received by this ViewGroup. <br /> |

### setOnHierarchyChangeListener

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setOnHierarchyChangeListener (ViewGroup.OnHierarchyChangeListener listener)
```

Register a callback to be invoked when a child is added to or removed
from this view.

<br />

| Parameters ||
|---|---|
| `listener` | `ViewGroup.OnHierarchyChangeListener`: the callback to invoke on hierarchy change <br /> |

### setPersistentDrawingCache

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 setPersistentDrawingCache (int drawingCacheToKeep)
```


**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.

Indicates what types of drawing caches should be kept in memory after
they have been created.

<br />

| Parameters ||
|---|---|
| `drawingCacheToKeep` | `int`: one or a combination of `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_NO_CACHE`, `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_ANIMATION_CACHE`, `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_SCROLLING_CACHE` and `https://developer.android.com/reference/android/view/ViewGroup#PERSISTENT_ALL_CACHES` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#getPersistentDrawingCache()`
- `https://developer.android.com/reference/android/view/ViewGroup#setAnimationCacheEnabled(boolean)`

### 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 ViewGroup 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 ViewGroup is invalidated. Please also be aware that the requested frame rate
will not propagate to child views.

<br />

| Parameters ||
|---|---|
| `frameRate` | `float`: the preferred frame rate of the ViewGroup. <br /> |

### setTouchscreenBlocksFocus

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTouchscreenBlocksFocus (boolean touchscreenBlocksFocus)
```

Set whether this ViewGroup should ignore focus requests for itself and its children.
If this option is enabled and the ViewGroup or a descendant currently has focus, focus
will proceed forward.

<br />

| Parameters ||
|---|---|
| `touchscreenBlocksFocus` | `boolean`: true to enable blocking focus in the presence of a touchscreen <br /> |

### setTransitionGroup

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void setTransitionGroup (boolean isTransitionGroup)
```

Changes whether or not this ViewGroup should be treated as a single entity during
Activity Transitions.

<br />

| Parameters ||
|---|---|
| `isTransitionGroup` | `boolean`: Whether or not the ViewGroup should be treated as a unit in Activity transitions. If false, the ViewGroup won't transition, only its children. If true, the entire ViewGroup will transition together. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,%20android.util.Pair<android.view.View,java.lang.String>[])`

### 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`: This value may be `null`. <br /> |

### shouldDelayChildPressedState

Added in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean shouldDelayChildPressedState ()
```

Return true if the pressed state should be delayed for children or descendants of this
ViewGroup. Generally, this should be done for containers that can scroll, such as a List.
This prevents the pressed state from appearing when the user is actually trying to scroll
the content.

The default implementation returns true for compatibility reasons. Subclasses that do
not scroll should generally override this method and return false.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### showContextMenuForChild

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean showContextMenuForChild (View originalView, 
                float x, 
                float y)
```

Shows the context menu for the specified view or its ancestors anchored
to the specified view-relative coordinate.


In most cases, a subclass does not need to override this. However, if
the subclass is added directly to the window manager (for example,
`https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)`)
then it should override this and show the context menu.


If a subclass overrides this method it should also override
`https://developer.android.com/reference/android/view/ViewParent#showContextMenuForChild(android.view.View)`.

<br />

| Parameters ||
|---|---|
| `originalView` | `View`: the source view where the context menu was first invoked <br /> |
| `x` | `float`: the X coordinate in pixels relative to the original 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 original 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 /> |

### showContextMenuForChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean showContextMenuForChild (View originalView)
```

Shows the context menu for the specified view or its ancestors.


In most cases, a subclass does not need to override this. However, if
the subclass is added directly to the window manager (for example,
`https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)`)
then it should override this and show the context menu.

<br />

| Parameters ||
|---|---|
| `originalView` | `View`: the source view where the context menu was first invoked <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if the context menu was shown, `false` otherwise <br /> |

### startActionModeForChild

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode startActionModeForChild (View originalView, 
                ActionMode.Callback callback, 
                int type)
```

Start an action mode of a specific type for the specified view.

In most cases, a subclass does not need to override this. However, if the
subclass is added directly to the window manager (for example,
`https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)`)
then it should override this and start the action mode.

<br />

<br />

| Parameters ||
|---|---|
| `originalView` | `View`: The source view where the action mode was first invoked <br /> |
| `callback` | `ActionMode.Callback`: The callback that will handle lifecycle events for 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 was started, null otherwise <br /> |

### startActionModeForChild

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ActionMode startActionModeForChild (View originalView, 
                ActionMode.Callback callback)
```

Start an action mode for the specified view with the default type
`https://developer.android.com/reference/android/view/ActionMode#TYPE_PRIMARY`.

In most cases, a subclass does not need to override this. However, if the
subclass is added directly to the window manager (for example,
`https://developer.android.com/reference/android/view/ViewManager#addView(android.view.View,%20android.view.ViewGroup.LayoutParams)`)
then it should override this and start the action mode.

<br />

<br />

| Parameters ||
|---|---|
| `originalView` | `View`: The source view where the action mode was first invoked <br /> |
| `callback` | `ActionMode.Callback`: The callback that will handle lifecycle events for the action mode <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ActionMode` | The new action mode if it was started, null otherwise <br /> |

### startLayoutAnimation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startLayoutAnimation ()
```

Runs the layout animation. Calling this method triggers a relayout of
this view group.

<br />

### startViewTransition

Added in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void startViewTransition (View view)
```

This method tells the ViewGroup that the given View object, which should have this
ViewGroup as its parent,
should be kept around (re-displayed when the ViewGroup draws its children) even if it
is removed from its parent. This allows animations, such as those used by
`https://developer.android.com/reference/android/app/Fragment` and `https://developer.android.com/reference/android/animation/LayoutTransition` to animate
the removal of views. A call to this method should always be accompanied by a later call
to `https://developer.android.com/reference/android/view/ViewGroup#endViewTransition(android.view.View)`, such as after an animation on the View has finished,
so that the View finally gets removed.

<br />

| Parameters ||
|---|---|
| `view` | `View`: The View object to be kept visible even if it gets removed from its parent. <br /> |

### suppressLayout

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void suppressLayout (boolean suppress)
```

Tells this ViewGroup to suppress all layout() calls until layout
suppression is disabled with a later call to suppressLayout(false).
When layout suppression is disabled, a requestLayout() call is sent
if layout() was attempted while layout was being suppressed.

<br />

| Parameters ||
|---|---|
| `suppress` | `boolean` <br /> |

### updateViewLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void updateViewLayout (View view, 
                ViewGroup.LayoutParams params)
```

<br />

<br />

| Parameters ||
|---|---|
| `view` | `View` <br /> |
| `params` | `ViewGroup.LayoutParams` <br /> |

## Protected methods

### addViewInLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean addViewInLayout (View child, 
                int index, 
                ViewGroup.LayoutParams params, 
                boolean preventRequestLayout)
```

Adds a view during layout. This is useful if in your onLayout() method,
you need to add more views (as does the list view for example).

If index is negative, it means put it at the end of the list.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the view to add to the group <br /> |
| `index` | `int`: the index at which the child must be added or -1 to add last <br /> |
| `params` | `ViewGroup.LayoutParams`: the layout parameters to associate with the child <br /> |
| `preventRequestLayout` | `boolean`: if true, calling this method will not trigger a layout request on child <br /> |

| Returns ||
|---|---|
| `boolean` | true if the child was added, false otherwise <br /> |

### addViewInLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean addViewInLayout (View child, 
                int index, 
                ViewGroup.LayoutParams params)
```

Adds a view during layout. This is useful if in your onLayout() method,
you need to add more views (as does the list view for example).

If index is negative, it means put it at the end of the list.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the view to add to the group <br /> |
| `index` | `int`: the index at which the child must be added or -1 to add last <br /> |
| `params` | `ViewGroup.LayoutParams`: the layout parameters to associate with the child <br /> |

| Returns ||
|---|---|
| `boolean` | true if the child was added, false otherwise <br /> |

### attachLayoutAnimationParameters

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void attachLayoutAnimationParameters (View child, 
                ViewGroup.LayoutParams params, 
                int index, 
                int count)
```

Subclasses should override this method to set layout animation
parameters on the supplied child.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child to associate with animation parameters <br /> |
| `params` | `ViewGroup.LayoutParams`: the child's layout parameters which hold the animation parameters <br /> |
| `index` | `int`: the index of the child in the view group <br /> |
| `count` | `int`: the number of children in the view group <br /> |

### attachViewToParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void attachViewToParent (View child, 
                int index, 
                ViewGroup.LayoutParams params)
```

Attaches a view to this view group. Attaching a view assigns this group as the parent,
sets the layout parameters and puts the view in the list of children so that
it can be retrieved by calling `https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)`.


This method is intended to be lightweight and makes no assumptions about whether the
parent or child should be redrawn. Proper use of this method will include also making
any appropriate `https://developer.android.com/reference/android/view/View#requestLayout()` or `https://developer.android.com/reference/android/view/View#invalidate()` calls.
For example, callers can `https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)` a `https://developer.android.com/reference/java/lang/Runnable`
which performs a `https://developer.android.com/reference/android/view/View#requestLayout()` on the next frame, after all detach/attach
calls are finished, causing layout to be run prior to redrawing the view hierarchy.


This method should be called only for views which were detached from their parent.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child to attach <br /> |
| `index` | `int`: the index at which the child should be attached <br /> |
| `params` | `ViewGroup.LayoutParams`: the layout parameters of the child <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)`

### canAnimate

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean canAnimate ()
```

Indicates whether the view group has the ability to animate its children
after the first layout.

<br />

| Returns ||
|---|---|
| `boolean` | true if the children can be animated, false otherwise <br /> |

### checkLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean checkLayoutParams (ViewGroup.LayoutParams p)
```

<br />

<br />

| Parameters ||
|---|---|
| `p` | `ViewGroup.LayoutParams` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### cleanupLayoutState

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void cleanupLayoutState (View child)
```

Prevents the specified child to be laid out during the next layout pass.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child on which to perform the cleanup <br /> |

### debug

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void debug (int depth)
```

<br />

<br />

| Parameters ||
|---|---|
| `depth` | `int` <br /> |

### detachAllViewsFromParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void detachAllViewsFromParent ()
```

Detaches all views from the parent. Detaching a view should be followed
either by a call to
`https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
or a call to `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`. Detachment should only be
temporary; reattachment or removal should happen within the same drawing cycle as
detachment. When a view is detached, its parent is null and cannot be retrieved by a
call to `https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)`.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewsFromParent(int,%20int)`
- `https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
- `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`

### detachViewFromParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void detachViewFromParent (int index)
```

Detaches a view from its parent. Detaching a view should be followed
either by a call to
`https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
or a call to `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`. Detachment should only be
temporary; reattachment or removal should happen within the same drawing cycle as
detachment. When a view is detached, its parent is null and cannot be retrieved by a
call to `https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)`.

<br />

| Parameters ||
|---|---|
| `index` | `int`: the index of the child to detach <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewsFromParent(int,%20int)`
- `https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
- `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`

### detachViewFromParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void detachViewFromParent (View child)
```

Detaches a view from its parent. Detaching a view should be followed
either by a call to
`https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
or a call to `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`. Detachment should only be
temporary; reattachment or removal should happen within the same drawing cycle as
detachment. When a view is detached, its parent is null and cannot be retrieved by a
call to `https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)`.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child to detach <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewsFromParent(int,%20int)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()`
- `https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
- `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`

### detachViewsFromParent

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void detachViewsFromParent (int start, 
                int count)
```

Detaches a range of views from their parents. Detaching a view should be followed
either by a call to
`https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
or a call to `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`. Detachment should only be
temporary; reattachment or removal should happen within the same drawing cycle as
detachment. When a view is detached, its parent is null and cannot be retrieved by a
call to `https://developer.android.com/reference/android/view/ViewGroup#getChildAt(int)`.

<br />

| Parameters ||
|---|---|
| `start` | `int`: the first index of the childrend range to detach <br /> |
| `count` | `int`: the number of children to detach <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()`
- `https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
- `https://developer.android.com/reference/android/view/ViewGroup#removeDetachedView(android.view.View,%20boolean)`

### 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`: This value cannot be `null`. <br /> |

### dispatchFreezeSelfOnly

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchFreezeSelfOnly (SparseArray<Parcelable> container)
```

Perform dispatching of a `https://developer.android.com/reference/android/view/View#saveHierarchyState(android.util.SparseArray<android.os.Parcelable>)` freeze()}
to only this view, not to its children. For use when overriding
`https://developer.android.com/reference/android/view/ViewGroup#dispatchSaveInstanceState(android.util.SparseArray<android.os.Parcelable>)` dispatchFreeze()} to allow
subclasses to freeze their own state but not the state of their children.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: the container <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 /> |

### 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 /> |

### 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 /> |

### dispatchThawSelfOnly

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void dispatchThawSelfOnly (SparseArray<Parcelable> container)
```

Perform dispatching of a `https://developer.android.com/reference/android/view/View#restoreHierarchyState(android.util.SparseArray<android.os.Parcelable>)`
to only this view, not to its children. For use when overriding
`https://developer.android.com/reference/android/view/ViewGroup#dispatchRestoreInstanceState(android.util.SparseArray<android.os.Parcelable>)` to allow
subclasses to thaw their own state but not the state of their children.

<br />

| Parameters ||
|---|---|
| `container` | `SparseArray`: the container <br /> |

### 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` |

### drawChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean drawChild (Canvas canvas, 
                View child, 
                long drawingTime)
```

Draw one child of this View Group. This method is responsible for getting
the canvas in the right state. This includes clipping, translating so
that the child's scrolled origin is at 0, 0, and applying any animation
transformations.

<br />

| Parameters ||
|---|---|
| `canvas` | `Canvas`: The canvas on which to draw the child. This value cannot be `null`. <br /> |
| `child` | `View`: Who to draw <br /> |
| `drawingTime` | `long`: The time at which draw is occurring <br /> |

| Returns ||
|---|---|
| `boolean` | True if an invalidate() was issued <br /> |

### drawableStateChanged

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void drawableStateChanged ()
```

This function is called whenever the state of the view changes in such
a way that it impacts the state of drawables being shown.


If the View has a StateListAnimator, it will also be called to run necessary state
change animations.


Be sure to call through to the superclass when overriding this function.


If you override this method you *must* call through to the
superclass implementation.

<br />

### generateDefaultLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected ViewGroup.LayoutParams generateDefaultLayoutParams ()
```

Returns a set of default layout parameters. These parameters are requested
when the View passed to `https://developer.android.com/reference/android/view/ViewGroup#addView(android.view.View)` has no layout parameters
already set. If null is returned, an exception is thrown from addView.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | a set of default layout parameters or null <br /> |

### generateLayoutParams

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected ViewGroup.LayoutParams generateLayoutParams (ViewGroup.LayoutParams p)
```

Returns a safe set of layout parameters based on the supplied layout params.
When a ViewGroup is passed a View whose layout params do not pass the test of
`https://developer.android.com/reference/android/view/ViewGroup#checkLayoutParams(android.view.ViewGroup.LayoutParams)`, this method
is invoked. This method should return a new set of layout params suitable for
this ViewGroup, possibly by copying the appropriate attributes from the
specified set of layout params.

<br />

| Parameters ||
|---|---|
| `p` | `ViewGroup.LayoutParams`: The layout parameters to convert into a suitable set of layout parameters for this ViewGroup. <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` | an instance of `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams` or one of its descendants <br /> |

### getChildDrawingOrder

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected int getChildDrawingOrder (int childCount, 
                int drawingPosition)
```

Converts drawing order position to container position. Override this
if you want to change the drawing order of children. By default, it
returns drawingPosition.


NOTE: In order for this method to be called, you must enable child ordering
first by calling `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingOrderEnabled(boolean)`.

<br />

| Parameters ||
|---|---|
| `childCount` | `int` <br /> |
| `drawingPosition` | `int`: the drawing order position. <br /> |

| Returns ||
|---|---|
| `int` | the container position of a child for this drawing order position. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingOrderEnabled(boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#isChildrenDrawingOrderEnabled()`

### getChildStaticTransformation

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean getChildStaticTransformation (View child, 
                Transformation t)
```

Sets `t` to be the static transformation of the child, if set, returning a
boolean to indicate whether a static transform was set. The default implementation
simply returns `false`; subclasses may override this method for different
behavior. `https://developer.android.com/reference/android/view/ViewGroup#setStaticTransformationsEnabled(boolean)` must be set to true
for this method to be called.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child view whose static transform is being requested <br /> |
| `t` | `Transformation`: The Transformation which will hold the result <br /> |

| Returns ||
|---|---|
| `boolean` | true if the transformation was set, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setStaticTransformationsEnabled(boolean)`

### isChildrenDrawingOrderEnabled

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean isChildrenDrawingOrderEnabled ()
```

Indicates whether the ViewGroup is drawing its children in the order defined by
`https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`.

<br />

| Returns ||
|---|---|
| `boolean` | true if children drawing order is defined by `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawingOrderEnabled(boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`

### isChildrenDrawnWithCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean isChildrenDrawnWithCacheEnabled ()
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Child views may no longer be forced to cache their rendering state by their parents.
Use `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` on individual Views instead.

Indicates whether the ViewGroup is currently drawing its children using
their drawing cache.

<br />

| Returns ||
|---|---|
| `boolean` | true if children should be drawn with their cache, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setAlwaysDrawnWithCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#setChildrenDrawnWithCacheEnabled(boolean)`

### measureChild

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void measureChild (View child, 
                int parentWidthMeasureSpec, 
                int parentHeightMeasureSpec)
```

Ask one of the children of this view to measure itself, taking into
account both the MeasureSpec requirements for this view and its padding.
The heavy lifting is done in getChildMeasureSpec.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child to measure <br /> |
| `parentWidthMeasureSpec` | `int`: The width requirements for this view <br /> |
| `parentHeightMeasureSpec` | `int`: The height requirements for this view <br /> |

### measureChildWithMargins

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void measureChildWithMargins (View child, 
                int parentWidthMeasureSpec, 
                int widthUsed, 
                int parentHeightMeasureSpec, 
                int heightUsed)
```

Ask one of the children of this view to measure itself, taking into
account both the MeasureSpec requirements for this view and its padding
and margins. The child must have MarginLayoutParams The heavy lifting is
done in getChildMeasureSpec.

<br />

| Parameters ||
|---|---|
| `child` | `View`: The child to measure <br /> |
| `parentWidthMeasureSpec` | `int`: The width requirements for this view <br /> |
| `widthUsed` | `int`: Extra space that has been used up by the parent horizontally (possibly by other children of the parent) <br /> |
| `parentHeightMeasureSpec` | `int`: The height requirements for this view <br /> |
| `heightUsed` | `int`: Extra space that has been used up by the parent vertically (possibly by other children of the parent) <br /> |

### measureChildren

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void measureChildren (int widthMeasureSpec, 
                int heightMeasureSpec)
```

Ask all of the children of this view to measure themselves, taking into
account both the MeasureSpec requirements for this view and its padding.
We skip children that are in the GONE state The heavy lifting is done in
getChildMeasureSpec.

<br />

| Parameters ||
|---|---|
| `widthMeasureSpec` | `int`: The width requirements for this view <br /> |
| `heightMeasureSpec` | `int`: The height requirements for this view <br /> |

### onAttachedToWindow

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void onAttachedToWindow ()
```

This is called when the view is attached to a window. At this point it
has a Surface and will start drawing. Note that this function is
guaranteed to be called before `https://developer.android.com/reference/android/view/View#onDraw(android.graphics.Canvas)`,
however it may be called any time before the first onDraw -- including
before or after `https://developer.android.com/reference/android/view/View#onMeasure(int,%20int)`.


If you override this method you *must* call through to the
superclass implementation.

<br />

### 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 /> |

### 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 />

### onLayout

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected abstract void onLayout (boolean changed, 
                int l, 
                int t, 
                int r, 
                int b)
```

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 /> |
| `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 /> |

### onRequestFocusInDescendants

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected boolean onRequestFocusInDescendants (int direction, 
                Rect previouslyFocusedRect)
```

Look for a descendant to call `https://developer.android.com/reference/android/view/View#requestFocus()` on.
Called by `https://developer.android.com/reference/android/view/ViewGroup#requestFocus(int,%20android.graphics.Rect)`
when it wants to request focus within its children. Override this to
customize how your `https://developer.android.com/reference/android/view/ViewGroup` requests focus within its children.

<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 focus was taken. <br /> |

### removeDetachedView

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void removeDetachedView (View child, 
                boolean animate)
```

Finishes the removal of a detached view. This method will dispatch the detached from
window event and notify the hierarchy change listener.


This method is intended to be lightweight and makes no assumptions about whether the
parent or child should be redrawn. Proper use of this method will include also making
any appropriate `https://developer.android.com/reference/android/view/View#requestLayout()` or `https://developer.android.com/reference/android/view/View#invalidate()` calls.
For example, callers can `https://developer.android.com/reference/android/view/View#post(java.lang.Runnable)` a `https://developer.android.com/reference/java/lang/Runnable`
which performs a `https://developer.android.com/reference/android/view/View#requestLayout()` on the next frame, after all detach/remove
calls are finished, causing layout to be run prior to redrawing the view hierarchy.

<br />

| Parameters ||
|---|---|
| `child` | `View`: the child to be definitely removed from the view hierarchy <br /> |
| `animate` | `boolean`: if true and the view has an animation, the view is placed in the disappearing views list, otherwise, it is detached from the window <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#attachViewToParent(android.view.View,%20int,%20android.view.ViewGroup.LayoutParams)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachAllViewsFromParent()`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(android.view.View)`
- `https://developer.android.com/reference/android/view/ViewGroup#detachViewFromParent(int)`

### setChildrenDrawingCacheEnabled

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)

```
protected void setChildrenDrawingCacheEnabled (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.

Enables or disables the drawing cache for each child of this view group.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true to enable the cache, false to dispose of it <br /> |

### setChildrenDrawingOrderEnabled

Added in [API level 7](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void setChildrenDrawingOrderEnabled (boolean enabled)
```

Tells the ViewGroup whether to draw its children in the order defined by the method
`https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`.


Note that `https://developer.android.com/reference/android/view/View#getZ()` reordering, done by `https://developer.android.com/reference/android/view/ViewGroup#dispatchDraw(android.graphics.Canvas)`,
will override custom child ordering done via this method.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true if the order of the children when drawing is determined by `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#isChildrenDrawingOrderEnabled()`
- `https://developer.android.com/reference/android/view/ViewGroup#getChildDrawingOrder(int,%20int)`

### setChildrenDrawnWithCacheEnabled

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void setChildrenDrawnWithCacheEnabled (boolean enabled)
```


**This method was deprecated
in API level 23.**   

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, this property is ignored.
Child views may no longer be forced to cache their rendering state by their parents.
Use `https://developer.android.com/reference/android/view/View#setLayerType(int,%20android.graphics.Paint)` on individual Views instead.

Tells the ViewGroup to draw its children using their drawing cache. This property
is ignored when `https://developer.android.com/reference/android/view/ViewGroup#isAlwaysDrawnWithCacheEnabled()` is true. A child's drawing cache
will be used only if it has been enabled.

Subclasses should call this method to start and stop using the drawing cache when
they perform performance sensitive operations, like scrolling or animating.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: true if children should be drawn with their cache, false otherwise <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#setAlwaysDrawnWithCacheEnabled(boolean)`
- `https://developer.android.com/reference/android/view/ViewGroup#isChildrenDrawnWithCacheEnabled()`

### setStaticTransformationsEnabled

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void setStaticTransformationsEnabled (boolean enabled)
```

When this property is set to true, this ViewGroup supports static transformations on
children; this causes
`https://developer.android.com/reference/android/view/ViewGroup#getChildStaticTransformation(android.view.View,%20android.view.animation.Transformation)` to be
invoked when a child is drawn.

Any subclass overriding
`https://developer.android.com/reference/android/view/ViewGroup#getChildStaticTransformation(android.view.View,%20android.view.animation.Transformation)` should
set this property to true.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: True to enable static transformations on children, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup#getChildStaticTransformation(android.view.View,%20android.view.animation.Transformation)`