# androidx.core.view

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/ActionProvider.VisibilityListener` | Listens to changes in visibility as reported by `https://developer.android.com/reference/kotlin/androidx/core/view/ActionProvider#refreshVisibility()`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DifferentialMotionFlingTarget` | Represents an entity that may be flung by a differential motion or an entity that initiates fling on a target View. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DragStartHelper.OnDragStartListener` | Interface definition for a callback to be invoked when a drag start gesture is detected. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/LayoutInflaterFactory` | **This interface is deprecated.** Use `https://developer.android.com/reference/android/view/LayoutInflater.Factory2.html` directly. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost` | A class that allows you to host and keep track of `https://developer.android.com/reference/kotlin/androidx/core/view/MenuProvider`s that will supply `https://developer.android.com/reference/android/view/MenuItem.html`s to the app bar. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuItemCompat.OnActionExpandListener` | **This interface is deprecated.** Use `https://developer.android.com/reference/android/view/MenuItem.OnActionExpandListener.html` directly. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuProvider` | Interface for indicating that a component will be supplying `https://developer.android.com/reference/android/view/MenuItem.html`s to the component owning the app bar. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingChild` | This interface should be implemented by `https://developer.android.com/reference/android/view/View.html` subclasses that wish to support dispatching nested scrolling operations to a cooperating parent `https://developer.android.com/reference/android/view/ViewGroup.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingChild2` | This interface should be implemented by `https://developer.android.com/reference/android/view/View.html` subclasses that wish to support dispatching nested scrolling operations to a cooperating parent `https://developer.android.com/reference/android/view/ViewGroup.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingChild3` | This interface should be implemented by `https://developer.android.com/reference/android/view/View.html` subclasses that wish to support dispatching nested scrolling operations to a cooperating parent `https://developer.android.com/reference/android/view/ViewGroup.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingParent` | This interface should be implemented by `https://developer.android.com/reference/android/view/ViewGroup.html` subclasses that wish to support scrolling operations delegated by a nested child view. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingParent2` | This interface should be implemented by `https://developer.android.com/reference/android/view/ViewGroup.html` subclasses that wish to support scrolling operations delegated by a nested child view. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingParent3` | This interface should be implemented by `https://developer.android.com/reference/android/view/ViewGroup.html` subclasses that wish to support scrolling operations delegated by a nested child view. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/OnApplyWindowInsetsListener` | Listener for applying window insets on a view in a custom way. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/OnReceiveContentListener` | Listener for apps to implement handling for insertion of content. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/OnReceiveContentViewBehavior` | Interface for widgets to implement default behavior for receiving content. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ScrollingView` | An interface that can be implemented by Views to provide scroll related APIs. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/TintableBackgroundView` | Interface which allows a `https://developer.android.com/reference/android/view/View.html` to receive background tinting calls from `https://developer.android.com/reference/kotlin/androidx/core/view/ViewCompat` when running on API v20 devices or lower. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewCompat.OnUnhandledKeyEventListenerCompat` | Interface definition for a callback to be invoked when a hardware key event hasn't been handled by the view hierarchy. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewPropertyAnimatorListener` | An animation listener receives notifications from an animation. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewPropertyAnimatorUpdateListener` | Implementors of this interface can add themselves as update listeners to an `ViewPropertyAnimatorCompat` instance to receive callbacks on every animation frame, after the current frame's values have been calculated for that `ViewPropertyAnimatorCompat`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControlListenerCompat` | Listener that encapsulates a request to `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat#controlWindowInsetsAnimation(int,long,android.view.animation.Interpolator,android.os.CancellationSignal,androidx.core.view.WindowInsetsAnimationControlListenerCompat)`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat.OnControllableInsetsChangedListener` | Listener to be notified when the set of controllable `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type` controlled by a `https://developer.android.com/reference/android/view/WindowInsetsController.html` changes. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/AccessibilityDelegateCompat` | Helper for accessing `https://developer.android.com/reference/android/view/View.AccessibilityDelegate.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ActionProvider` | This class is a mediator for accomplishing a given task, for example sharing a file. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ContentInfoCompat` | Holds all the relevant data for a request to `https://developer.android.com/reference/kotlin/androidx/core/view/OnReceiveContentListener`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ContentInfoCompat.Builder` | Builder for `https://developer.android.com/reference/kotlin/androidx/core/view/ContentInfoCompat`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DifferentialMotionFlingController` | Controller differential motion flings. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DisplayCompat` | A class for retrieving accurate display modes for a display. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DisplayCompat.ModeCompat` | Compat class which provides access to the underlying display mode, if there is one, and a more reliable display mode size. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DisplayCutoutCompat` | Represents the area of the display that is not functional for displaying content. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DisplayShapeCompat` | Compatibility class for representing the physical shape of a display. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DragAndDropPermissionsCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/DragAndDropPermissions.html` a backwards compatible fashion. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/DragStartHelper` | DragStartHelper is a utility class for implementing drag and drop support. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/GestureDetectorCompat` | **This class is deprecated.** Use `https://developer.android.com/reference/android/view/GestureDetector.html` directly <br /> |
| `https://developer.android.com/reference/kotlin/androidx/core/view/GravityCompat` | Compatibility shim for accessing newer functionality from `https://developer.android.com/reference/android/view/Gravity.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/HapticFeedbackConstantsCompat` | Helper class for accessing values in `https://developer.android.com/reference/android/view/HapticFeedbackConstants.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/InputDeviceCompat` | Helper class for accessing values in `https://developer.android.com/reference/android/view/InputDevice.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/LayoutInflaterCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/LayoutInflater.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MarginLayoutParamsCompat` | **This class is deprecated.** Use `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` directly. <br /> |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/Menu.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHostHelper` | Helper class for implementing `https://developer.android.com/reference/kotlin/androidx/core/view/MenuHost`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MenuItemCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/MenuItem.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/MotionEventCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/MotionEvent.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingChildHelper` | Helper class for implementing nested scrolling child views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21). |
| `https://developer.android.com/reference/kotlin/androidx/core/view/NestedScrollingParentHelper` | Helper class for implementing nested scrolling parent views compatible with Android platform versions earlier than Android 5.0 Lollipop (API 21). |
| `https://developer.android.com/reference/kotlin/androidx/core/view/OneShotPreDrawListener` | An OnPreDrawListener that will remove itself after one OnPreDraw call. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/PointerIconCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/PointerIcon.html` in a backwards compatible fashion. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/RoundedCornerCompat` | Represents a rounded corner of the display. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ScaleGestureDetectorCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/ScaleGestureDetector.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ScrollFeedbackProviderCompat` | Compat to access `https://developer.android.com/reference/android/view/ScrollFeedbackProvider.html` across different build versions. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/SoftwareKeyboardControllerCompat` | Provide controls for showing and hiding the IME. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/VelocityTrackerCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/VelocityTracker.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/View.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewConfigurationCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/ViewConfiguration.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewGroupCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/ViewGroup.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewParentCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/ViewParent.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewPropertyAnimatorCompat` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewPropertyAnimatorListenerAdapter` | This adapter class provides empty implementations of the methods from `https://developer.android.com/reference/kotlin/androidx/core/view/ViewPropertyAnimatorListener`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/ViewStructureCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/ViewStructure.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowCompat` | Helper for accessing features in `https://developer.android.com/reference/android/view/Window.html`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat` | Class representing an animation of a set of windows that cause insets. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.BoundsCompat` | Class representing the range of an `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat` |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationCompat.Callback` | Interface that allows the application to listen to animation events for windows that cause insets. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsAnimationControllerCompat` | Controller for app-driven animation of system windows. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat` | Describes a set of insets for window content. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Builder` | Builder for `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat`. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Side` | Class that defines different sides for insets. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsCompat.Type` | Class that defines different types of sources causing window insets. |
| `https://developer.android.com/reference/kotlin/androidx/core/view/WindowInsetsControllerCompat` | Provide simple controls of windows that generate insets. |

## Extension functions summary

|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).contains(android.view.MenuItem)(item: https://developer.android.com/reference/android/view/MenuItem.html)` Returns `true` if `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).contains(android.view.MenuItem)` is found in this menu. |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).contains(android.view.View)(view: https://developer.android.com/reference/android/view/View.html)` Returns `true` if `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).contains(android.view.View)` is found in this view group. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnAttach(kotlin.Function1)(crossinline action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action when this view is attached to a window. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnDetach(kotlin.Function1)(crossinline action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action when this view is detached from a window. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnLayout(kotlin.Function1)(crossinline action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action when this view is laid out. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnNextLayout(kotlin.Function1)(crossinline action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action when this view is next laid out. |
| `inline https://developer.android.com/reference/kotlin/androidx/core/view/OneShotPreDrawListener` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnPreDraw(kotlin.Function1)(crossinline action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action when the view tree is about to be drawn. |
| `https://developer.android.com/reference/android/graphics/Bitmap.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).drawToBitmap(android.graphics.Bitmap.Config)(config: https://developer.android.com/reference/android/graphics/Bitmap.Config.html)` Return a `https://developer.android.com/reference/android/graphics/Bitmap.html` representation of this `https://developer.android.com/reference/android/view/View.html`. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).forEach(kotlin.Function1)(action: (item: https://developer.android.com/reference/android/view/MenuItem.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action on each item in this menu. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).forEach(kotlin.Function1)(action: (view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action on each view in this view group. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).forEachIndexed(kotlin.Function2)(action: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, item: https://developer.android.com/reference/android/view/MenuItem.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action on each item in this menu, providing its sequential index. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).forEachIndexed(kotlin.Function2)(action: (index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, view: https://developer.android.com/reference/android/view/View.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given action on each view in this view group, providing its sequential index. |
| `inline operator https://developer.android.com/reference/android/view/MenuItem.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).get(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the menu at `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).get(kotlin.Int)`. |
| `operator https://developer.android.com/reference/android/view/View.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).get(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the view at `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).get(kotlin.Int)`. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).isEmpty()()` Returns true if this menu contains no items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).isEmpty()()` Returns true if this view group contains no views. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).isNotEmpty()()` Returns true if this menu contains one or more items. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).isNotEmpty()()` Returns true if this view group contains one or more views. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html<https://developer.android.com/reference/android/view/MenuItem.html>` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).iterator()()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html` over the items in this menu. |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html<https://developer.android.com/reference/android/view/View.html>` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).iterator()()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html` over the views in this view group. |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).minusAssign(android.view.MenuItem)(item: https://developer.android.com/reference/android/view/MenuItem.html)` Removes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).minusAssign(android.view.MenuItem)` from this menu. |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).minusAssign(android.view.View)(view: https://developer.android.com/reference/android/view/View.html)` Removes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).minusAssign(android.view.View)` from this view group. |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).plusAssign(android.view.View)(view: https://developer.android.com/reference/android/view/View.html)` Adds `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).plusAssign(android.view.View)` to this view group. |
| `inline https://developer.android.com/reference/java/lang/Runnable.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).postDelayed(kotlin.Long,kotlin.Function0)(delayInMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, crossinline action: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Version of `https://developer.android.com/reference/android/view/View.html#postDelayed(java.lang.Runnable, long)` which re-orders the parameters, allowing the action to be placed outside of parentheses. |
| `https://developer.android.com/reference/java/lang/Runnable.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).postOnAnimationDelayed(kotlin.Long,kotlin.Function0)(delayInMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, action: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Version of `https://developer.android.com/reference/android/view/View.html#postOnAnimationDelayed(java.lang.Runnable, long)` which re-orders the parameters, allowing the action to be placed outside of parentheses. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).removeItemAt(kotlin.Int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the menu item at the specified index. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup.MarginLayoutParams).setMargins(kotlin.Int)(size: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the margins in the ViewGroup's MarginLayoutParams. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).setPadding(kotlin.Int)(size: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sets the view's padding. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)(block: https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Executes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)` with the View's layoutParams and reassigns the layoutParams with the updated version. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html> https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)(block: T.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Executes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)` with a typed version of the View's layoutParams and reassigns the layoutParams with the updated version. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup.MarginLayoutParams).updateMargins(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)( left: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Updates the margins in the `https://developer.android.com/reference/android/view/ViewGroup.html`'s `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup.MarginLayoutParams).updateMarginsRelative(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)( start: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Updates the relative margins in the ViewGroup's MarginLayoutParams. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updatePadding(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)(left: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Updates this view's padding. |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updatePaddingRelative(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)( start: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: @https://developer.android.com/reference/kotlin/androidx/annotation/Px https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Updates this view's relative padding. |

## Extension properties summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<https://developer.android.com/reference/android/view/View.html>` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).allViews()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over this view and its descendants recursively. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<https://developer.android.com/reference/android/view/ViewParent.html>` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).ancestors()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` of the parent chain of this view by repeatedly calling `https://developer.android.com/reference/android/view/View.html#getParent()`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<https://developer.android.com/reference/android/view/MenuItem.html>` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).children()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the items in this menu. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<https://developer.android.com/reference/android/view/View.html>` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).children()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the immediate child views in this view group. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html<https://developer.android.com/reference/android/view/View.html>` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).descendants()` Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the child views in this view group recursively. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).indices()` Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` of the valid indices for the children of this view group. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).isGone()` Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#GONE`, false otherwise. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).isInvisible()` Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#INVISIBLE`, false otherwise. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).isVisible()` Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#VISIBLE`, false otherwise. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginBottom()` Returns the bottom margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginEnd()` Returns the end margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginLeft()` Returns the left margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginRight()` Returns the right margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginStart()` Returns the start margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/View.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).marginTop()` Returns the top margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/Menu.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).size()` Returns the number of items in this menu. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/android/view/ViewGroup.html.https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).size()` Returns the number of views in this view group. |

## Extension functions

### Menu.contains

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:contains) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
operator fun Menu.contains(item: MenuItem): Boolean
```

Returns `true` if `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).contains(android.view.MenuItem)` is found in this menu.

### ViewGroup.contains

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:contains) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun ViewGroup.contains(view: View): Boolean
```

Returns `true` if `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).contains(android.view.View)` is found in this view group.

### View.doOnAttach

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:doOnAttach) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
inline fun View.doOnAttach(crossinline action: (view: View) -> Unit): Unit
```

Performs the given action when this view is attached to a window. If the view is already attached to a window the action will be performed immediately, otherwise the action will be performed after the view is next attached.

The action will only be invoked once, and any listeners will then be removed.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnDetach(kotlin.Function1)` |   |

### View.doOnDetach

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:doOnDetach) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/core#1.2.0)

```
inline fun View.doOnDetach(crossinline action: (view: View) -> Unit): Unit
```

Performs the given action when this view is detached from a window. If the view is not attached to a window the action will be performed immediately, otherwise the action will be performed after the view is detached from its current window.

The action will only be invoked once, and any listeners will then be removed.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnAttach(kotlin.Function1)` |   |

### View.doOnLayout

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:doOnLayout) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.doOnLayout(crossinline action: (view: View) -> Unit): Unit
```

Performs the given action when this view is laid out. If the view has been laid out and it has not requested a layout, the action will be performed straight away, otherwise the action will be performed after the view is next laid out.

The action will only be invoked once on the next layout and then removed.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnNextLayout(kotlin.Function1)` |   |

### View.doOnNextLayout

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:doOnNextLayout) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.doOnNextLayout(crossinline action: (view: View) -> Unit): Unit
```

Performs the given action when this view is next laid out.

The action will only be invoked once on the next layout and then removed.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).doOnLayout(kotlin.Function1)` |   |

### View.doOnPreDraw

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:doOnPreDraw) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.doOnPreDraw(crossinline action: (view: View) -> Unit): OneShotPreDrawListener
```

Performs the given action when the view tree is about to be drawn.

The action will only be invoked once prior to the next draw and then removed.

### View.drawToBitmap

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:drawToBitmap) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun View.drawToBitmap(config: Bitmap.Config = Bitmap.Config.ARGB_8888): Bitmap
```

Return a `https://developer.android.com/reference/android/graphics/Bitmap.html` representation of this `https://developer.android.com/reference/android/view/View.html`.

The resulting bitmap will be the same width and height as this view's current layout dimensions. This does not take into account any transformations such as scale or translation.

Note, this will use the software rendering pipeline to draw the view to the bitmap. This may result with different drawing to what is rendered on a hardware accelerated canvas (such as the device screen).

If this view has not been laid out this method will throw a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html`.

| Parameters |
|---|---|
| `config: https://developer.android.com/reference/android/graphics/Bitmap.Config.html = Bitmap.Config.ARGB_8888` | Bitmap config of the desired bitmap. Defaults to `https://developer.android.com/reference/android/graphics/Bitmap.Config.html#ARGB_8888`. |

### Menu.forEach

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:forEach) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Menu.forEach(action: (item: MenuItem) -> Unit): Unit
```

Performs the given action on each item in this menu.

### ViewGroup.forEach

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:forEach) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.forEach(action: (view: View) -> Unit): Unit
```

Performs the given action on each view in this view group.

### Menu.forEachIndexed

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:forEachIndexed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Menu.forEachIndexed(action: (index: Int, item: MenuItem) -> Unit): Unit
```

Performs the given action on each item in this menu, providing its sequential index.

### ViewGroup.forEachIndexed

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:forEachIndexed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.forEachIndexed(action: (index: Int, view: View) -> Unit): Unit
```

Performs the given action on each view in this view group, providing its sequential index.

### Menu.get

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:get) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun Menu.get(index: Int): MenuItem
```

Returns the menu at `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).get(kotlin.Int)`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if index is less than 0 or greater than or equal to the count. |

### ViewGroup.get

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:get) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
operator fun ViewGroup.get(index: Int): View
```

Returns the view at `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).get(kotlin.Int)`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if index is less than 0 or greater than or equal to the count. |

### Menu.isEmpty

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:isEmpty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Menu.isEmpty(): Boolean
```

Returns true if this menu contains no items.

### ViewGroup.isEmpty

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:isEmpty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.isEmpty(): Boolean
```

Returns true if this view group contains no views.

### Menu.isNotEmpty

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:isNotEmpty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun Menu.isNotEmpty(): Boolean
```

Returns true if this menu contains one or more items.

### ViewGroup.isNotEmpty

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:isNotEmpty) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.isNotEmpty(): Boolean
```

Returns true if this view group contains one or more views.

### Menu.iterator

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:iterator) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
operator fun Menu.iterator(): MutableIterator<MenuItem>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html` over the items in this menu.

### ViewGroup.iterator

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:iterator) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
operator fun ViewGroup.iterator(): MutableIterator<View>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-iterator/index.html` over the views in this view group.

### Menu.minusAssign

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:minusAssign) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun Menu.minusAssign(item: MenuItem): Unit
```

Removes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.Menu).minusAssign(android.view.MenuItem)` from this menu.

### ViewGroup.minusAssign

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:minusAssign) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun ViewGroup.minusAssign(view: View): Unit
```

Removes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).minusAssign(android.view.View)` from this view group.

### ViewGroup.plusAssign

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:plusAssign) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline operator fun ViewGroup.plusAssign(view: View): Unit
```

Adds `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).plusAssign(android.view.View)` to this view group.

### View.postDelayed

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:postDelayed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.postDelayed(delayInMillis: Long, crossinline action: () -> Unit): Runnable
```

Version of `https://developer.android.com/reference/android/view/View.html#postDelayed(java.lang.Runnable, long)` which re-orders the parameters, allowing the action to be placed outside of parentheses.

```kotlin
view.postDelayed(200) {
    doSomething()
}
```

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/Runnable.html` | the created Runnable |

### View.postOnAnimationDelayed

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:postOnAnimationDelayed) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
fun View.postOnAnimationDelayed(delayInMillis: Long, action: () -> Unit): Runnable
```

Version of `https://developer.android.com/reference/android/view/View.html#postOnAnimationDelayed(java.lang.Runnable, long)` which re-orders the parameters, allowing the action to be placed outside of parentheses.

```kotlin
view.postOnAnimationDelayed(16) {
    doSomething()
}
```

| Returns |
|---|---|
| `https://developer.android.com/reference/java/lang/Runnable.html` | the created Runnable |

### Menu.removeItemAt

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+function:removeItemAt) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/core#1.9.0)

```
inline fun Menu.removeItemAt(index: Int): Unit
```

Removes the menu item at the specified index.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-index-out-of-bounds-exception/index.html` | if index is less than 0 or greater than or equal to the count. |

### ViewGroup.MarginLayoutParams.setMargins

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:setMargins) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.MarginLayoutParams.setMargins(size: @Px Int): Unit
```

Sets the margins in the ViewGroup's MarginLayoutParams. This version of the method sets all axes to the provided size.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int)` |   |

### View.setPadding

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:setPadding) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.setPadding(size: @Px Int): Unit
```

Sets the view's padding. This version of the method sets all axes to the provided size.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#setPadding(int, int, int, int)` |   |

### View.updateLayoutParams

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:updateLayoutParams) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.updateLayoutParams(block: ViewGroup.LayoutParams.() -> Unit): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)` with the View's layoutParams and reassigns the layoutParams with the updated version.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If no `LayoutParams` is set on the view. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#getLayoutParams()` |   |
| `https://developer.android.com/reference/android/view/View.html#setLayoutParams(android.view.ViewGroup.LayoutParams)` |   |

### View.updateLayoutParams

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:updateLayoutParams)

```
inline fun <T : ViewGroup.LayoutParams> View.updateLayoutParams(block: T.() -> Unit): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).updateLayoutParams(kotlin.Function1)` with a typed version of the View's layoutParams and reassigns the layoutParams with the updated version.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-null-pointer-exception/index.html` | If no `LayoutParams` is set on the view. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-class-cast-exception/index.html` | If the `LayoutParams` type is not `T` or a subtype of `T`. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#getLayoutParams()` |   |
| `https://developer.android.com/reference/android/view/View.html#setLayoutParams(android.view.ViewGroup.LayoutParams)` |   |

### ViewGroup.MarginLayoutParams.updateMargins

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:updateMargins) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.MarginLayoutParams.updateMargins(
    left: @Px Int = leftMargin,
    top: @Px Int = topMargin,
    right: @Px Int = rightMargin,
    bottom: @Px Int = bottomMargin
): Unit
```

Updates the margins in the `https://developer.android.com/reference/android/view/ViewGroup.html`'s `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`. This version of the method allows using named parameters to just set one or more axes.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int)` |   |

### ViewGroup.MarginLayoutParams.updateMarginsRelative

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+function:updateMarginsRelative) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun ViewGroup.MarginLayoutParams.updateMarginsRelative(
    start: @Px Int = marginStart,
    top: @Px Int = topMargin,
    end: @Px Int = marginEnd,
    bottom: @Px Int = bottomMargin
): Unit
```

Updates the relative margins in the ViewGroup's MarginLayoutParams. This version of the method allows using named parameters to just set one or more axes.

Note that this inline method references platform APIs added in API 17 and may raise runtime verification warnings on earlier platforms. See Chromium's guide to [Class Verification Failures](https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md) for more information.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int)` |   |

### View.updatePadding

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:updatePadding) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.updatePadding(
    left: @Px Int = paddingLeft,
    top: @Px Int = paddingTop,
    right: @Px Int = paddingRight,
    bottom: @Px Int = paddingBottom
): Unit
```

Updates this view's padding. This version of the method allows using named parameters to just set one or more axes.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#setPadding(int, int, int, int)` |   |

### View.updatePaddingRelative

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+function:updatePaddingRelative) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
inline fun View.updatePaddingRelative(
    start: @Px Int = paddingStart,
    top: @Px Int = paddingTop,
    end: @Px Int = paddingEnd,
    bottom: @Px Int = paddingBottom
): Unit
```

Updates this view's relative padding. This version of the method allows using named parameters to just set one or more axes.

Note that this inline method references platform APIs added in API 17 and may raise runtime verification warnings on earlier platforms. See Chromium's guide to [Class Verification Failures](https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md) for more information.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/View.html#setPaddingRelative(int, int, int, int)` |   |

## Extension properties

### View.allViews

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:allViews) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
val View.allViews: Sequence<View>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over this view and its descendants recursively. This is a depth-first traversal similar to `https://developer.android.com/reference/android/view/View.html#findViewById(int)`. A view with no children will return a single-element sequence of itself.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).descendants()` |   |

### View.ancestors

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:ancestors) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
val View.ancestors: Sequence<ViewParent>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` of the parent chain of this view by repeatedly calling `https://developer.android.com/reference/android/view/View.html#getParent()`. An unattached view will return a zero-element sequence.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).descendants()` |   |

### Menu.children

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+symbol:children) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val Menu.children: Sequence<MenuItem>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the items in this menu.

### ViewGroup.children

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+symbol:children) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val ViewGroup.children: Sequence<View>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the immediate child views in this view group.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).allViews()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).descendants()` |   |

### ViewGroup.descendants

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+symbol:descendants) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/core#1.5.0)

```
val ViewGroup.descendants: Sequence<View>
```

Returns a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.sequences/-sequence/index.html` over the child views in this view group recursively.

This performs a depth-first traversal. A view with no children will return a zero-element sequence.

For example, to efficiently filter views within the hierarchy using a predicate:

```kotlin
fun ViewGroup.findViewTreeIterator(predicate: (View) -> Boolean): Sequence<View> {
    return sequenceOf(this)
        .plus(descendantsTree)
        .filter { predicate(it) }
}
```

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).allViews()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.ViewGroup).children()` |   |
| `https://developer.android.com/reference/kotlin/androidx/core/view/package-summary#(android.view.View).ancestors()` |   |

### ViewGroup.indices

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+symbol:indices) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/core#1.8.0)

```
val ViewGroup.indices: IntRange
```

Returns an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-int-range/index.html` of the valid indices for the children of this view group.

This can be used for looping:

```kotlin
for (i in viewGroup.indices.reversed) {
  if (viewGroup[i] is SomeView) {
    viewGroup.removeViewAt(i)
  }
}
```

Or to determine if an index is valid:

```kotlin
if (2 in viewGroup.indices) {
  // Do something...
}
```

### View.isGone

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:isGone) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
var View.isGone: Boolean
```

Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#GONE`, false otherwise.

```kotlin
if (view.isGone) {
    // Behavior...
}
```

Setting this property to true sets the visibility to `https://developer.android.com/reference/android/view/View.html#GONE`, false to `https://developer.android.com/reference/android/view/View.html#VISIBLE`.

```kotlin
view.isGone = true
```

### View.isInvisible

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:isInvisible) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
var View.isInvisible: Boolean
```

Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#INVISIBLE`, false otherwise.

```kotlin
if (view.isInvisible) {
    // Behavior...
}
```

Setting this property to true sets the visibility to `https://developer.android.com/reference/android/view/View.html#INVISIBLE`, false to `https://developer.android.com/reference/android/view/View.html#VISIBLE`.

```kotlin
view.isInvisible = true
```

### View.isVisible

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:isVisible) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
var View.isVisible: Boolean
```

Returns true when this view's visibility is `https://developer.android.com/reference/android/view/View.html#VISIBLE`, false otherwise.

```kotlin
if (view.isVisible) {
    // Behavior...
}
```

Setting this property to true sets the visibility to `https://developer.android.com/reference/android/view/View.html#VISIBLE`, false to `https://developer.android.com/reference/android/view/View.html#GONE`.

```kotlin
view.isVisible = true
```

### View.marginBottom

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginBottom) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginBottom: Int
```

Returns the bottom margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` |   |

### View.marginEnd

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginEnd) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginEnd: Int
```

Returns the end margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd()` |   |

### View.marginLeft

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginLeft) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginLeft: Int
```

Returns the left margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` |   |

### View.marginRight

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginRight) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginRight: Int
```

Returns the right margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` |   |

### View.marginStart

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginStart) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginStart: Int
```

Returns the start margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart()` |   |

### View.marginTop

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/View.kt+symbol:marginTop) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val View.marginTop: Int
```

Returns the top margin if this view's `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html` is a `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html`, otherwise 0.

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html` |   |

### Menu.size

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/Menu.kt+symbol:size) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val Menu.size: Int
```

Returns the number of items in this menu.

### ViewGroup.size

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/view/ViewGroup.kt+symbol:size) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
val ViewGroup.size: Int
```

Returns the number of views in this view group.