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

# Window

*** ** * ** ***


`
public


abstract
class
Window
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Abstract base class for a top-level window look and behavior policy. An
instance of this class should be used as the top-level view added to the
window manager. It provides standard UI policies such as a background, title
area, default key processing, etc.

The framework will instantiate an implementation of this class on behalf of the application.

## Summary

| ### Nested classes ||
|---|---|
| ` interface` | `https://developer.android.com/reference/android/view/Window.Callback` API from a Window back to its caller. |
| ` interface` | `https://developer.android.com/reference/android/view/Window.OnFrameMetricsAvailableListener` Callback for clients that want frame timing information for each frame rendered by the Window. |
| ` interface` | `https://developer.android.com/reference/android/view/Window.OnRestrictedCaptionAreaChangedListener` Callback for clients that want to be aware of where caption draws content. |

| ### XML attributes ||
|---|---|
| [`android:navigationBarColor`](https://developer.android.com/reference/android/view/Window#attr_android:navigationBarColor) | *This is deprecated. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.* *May be a color value, in the form of "`#*rgb*`", "`#*argb*`", "`#*rrggbb*`", or "`#*aarrggbb*`".* |
| [`android:navigationBarDividerColor`](https://developer.android.com/reference/android/view/Window#attr_android:navigationBarDividerColor) | *This is deprecated. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.* *May be a color value, in the form of "`#*rgb*`", "`#*argb*`", "`#*rrggbb*`", or "`#*aarrggbb*`".* |
| [`android:windowAllowEnterTransitionOverlap`](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowEnterTransitionOverlap) | Flag indicating whether this Window's transition should overlap with the exiting transition of the calling Activity. |
| [`android:windowAllowReturnTransitionOverlap`](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowReturnTransitionOverlap) | Flag indicating whether this Window's transition should overlap with the exiting transition of the called Activity when the called Activity finishes. |
| [`android:windowContentTransitionManager`](https://developer.android.com/reference/android/view/Window#attr_android:windowContentTransitionManager) | Reference to a TransitionManager XML resource defining the desired transitions between different window content. |
| [`android:windowEnterTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowEnterTransition) | Reference to a Transition XML resource defining the desired Transition used to move Views into the initial Window's content Scene. |
| [`android:windowExitTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowExitTransition) | Reference to a Transition XML resource defining the desired Transition used to move Views out of the Window's content Scene when launching a new Activity. |
| [`android:windowReenterTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowReenterTransition) | Reference to a Transition XML resource defining the desired Transition used to move Views in to the scene when returning from a previously-started Activity. |
| [`android:windowReturnTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowReturnTransition) | Reference to a Transition XML resource defining the desired Transition used to move Views out of the scene when the Window is preparing to close. |
| [`android:windowSharedElementEnterTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementEnterTransition) | Reference to a Transition XML resource defining the desired Transition used to move shared elements transferred into the Window's initial content Scene. |
| [`android:windowSharedElementExitTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementExitTransition) | Reference to a Transition XML resource defining the desired Transition used when starting a new Activity to move shared elements prior to transferring to the called Activity. |
| [`android:windowSharedElementReenterTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReenterTransition) | Reference to a Transition XML resource defining the desired Transition used for shared elements transferred back to a calling Activity. |
| [`android:windowSharedElementReturnTransition`](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReturnTransition) | Reference to a Transition XML resource defining the desired Transition used to move shared elements transferred back to a calling Activity. |
| [`android:windowSharedElementsUseOverlay`](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementsUseOverlay) | Indicates whether or not shared elements should use an overlay during transitions. |
| [`android:windowTransitionBackgroundFadeDuration`](https://developer.android.com/reference/android/view/Window#attr_android:windowTransitionBackgroundFadeDuration) | The duration, in milliseconds, of the window background fade duration when transitioning into or away from an Activity when called with an Activity Transition. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_AUTO` Flag for letting the theme drive the color of the window caption controls. |
| `int` | `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_DARK` Flag for setting dark-color controls on the window caption. |
| `int` | `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_LIGHT` Flag for setting light-color controls on the window caption. |
| `int` | `https://developer.android.com/reference/android/view/Window#DEFAULT_FEATURES` *This constant was deprecated in API level 22. use `https://developer.android.com/reference/android/view/Window#getDefaultFeatures(android.content.Context)` instead.* |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR` Flag for enabling the Action Bar. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR_OVERLAY` Flag for requesting an Action Bar that overlays window content. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_MODE_OVERLAY` Flag for specifying the behavior of action modes when an Action Bar is not present. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS` Enables Activities to run Activity Transitions either through sending or receiving ActivityOptions bundle created with `https://developer.android.com/reference/android/app/ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,%20android.util.Pair<android.view.View,java.lang.String>[])` or `https://developer.android.com/reference/android/app/ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,%20android.view.View,%20java.lang.String)`. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS` Flag for requesting that window content changes should be animated using a TransitionManager. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_CONTEXT_MENU` Flag for the context menu. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_CUSTOM_TITLE` Flag for custom title. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_INDETERMINATE_PROGRESS` *This constant was deprecated in API level 24. No longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_LEFT_ICON` Flag for having an icon on the left side of the title bar |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_NO_TITLE` Flag for the "no title" feature, turning off the title at the top of the screen. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_OPTIONS_PANEL` Flag for the "options panel" feature. |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` *This constant was deprecated in API level 24. No longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_RIGHT_ICON` Flag for having an icon on the right side of the title bar |
| `int` | `https://developer.android.com/reference/android/view/Window#FEATURE_SWIPE_TO_DISMISS` *This constant was deprecated in API level 30. Swipe-to-dismiss isn't functional anymore.* |
| `int` | `https://developer.android.com/reference/android/view/Window#ID_ANDROID_CONTENT` The ID that the main layout in the XML layout file should have. |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/view/Window#NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME` The transitionName for the navigation bar background View when a custom background is used. |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_END` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_INDETERMINATE_OFF` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_INDETERMINATE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_INDETERMINATE_ON` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_INDETERMINATE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_SECONDARY_END` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_SECONDARY_START` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_START` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_VISIBILITY_OFF` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `int` | `https://developer.android.com/reference/android/view/Window#PROGRESS_VISIBILITY_ON` *This constant was deprecated in API level 24. `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer supported starting in API 21.* |
| `https://developer.android.com/reference/java/lang/String` | `https://developer.android.com/reference/android/view/Window#STATUS_BAR_BACKGROUND_TRANSITION_NAME` The transitionName for the status bar background View when a custom background is used. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/view/Window#Window(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` |

| ### Public methods ||
|---|---|
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#addContentView(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) ` Variation on `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)` to add an additional content view to the screen. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#addFlags(int)(int flags) ` Convenience function to set the flag bits as specified in flags, as per `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`. |
| ` final void` | ` https://developer.android.com/reference/android/view/Window#addOnFrameMetricsAvailableListener(android.view.Window.OnFrameMetricsAvailableListener,%20android.os.Handler)(https://developer.android.com/reference/android/view/Window.OnFrameMetricsAvailableListener listener, https://developer.android.com/reference/android/os/Handler handler) ` Set an observer to collect frame stats for each frame rendered in this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#clearFlags(int)(int flags) ` Convenience function to clear the flag bits as specified in flags, as per `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#closeAllPanels()() ` |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#closePanel(int)(int featureId) ` |
| ` <T extends https://developer.android.com/reference/android/view/View> T` | ` https://developer.android.com/reference/android/view/Window#findViewById(int)(int id) ` Finds a view that was identified by the `android:id` XML attribute that was processed in `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#getAllowEnterTransitionOverlap()() ` Returns how the transition set in `https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)` overlaps with the exit transition of the calling Activity. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#getAllowReturnTransitionOverlap()() ` Returns how the transition set in `https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)` overlaps with the exit transition of the called Activity when reentering after if finishes. |
| ` final https://developer.android.com/reference/android/view/WindowManager.LayoutParams` | ` https://developer.android.com/reference/android/view/Window#getAttributes()() ` Retrieve the current window attributes associated with this panel. |
| ` final https://developer.android.com/reference/android/view/Window.Callback` | ` https://developer.android.com/reference/android/view/Window#getCallback()() ` Return the current Callback interface for this window. |
| ` int` | ` https://developer.android.com/reference/android/view/Window#getColorMode()() ` Returns the requested color mode of the window, one of `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_DEFAULT`, `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT` or `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR`. |
| ` final https://developer.android.com/reference/android/view/Window` | ` https://developer.android.com/reference/android/view/Window#getContainer()() ` Return the container for this Window. |
| ` https://developer.android.com/reference/android/transition/Scene` | ` https://developer.android.com/reference/android/view/Window#getContentScene()() ` Retrieve the `https://developer.android.com/reference/android/transition/Scene` representing this window's current content. |
| ` final https://developer.android.com/reference/android/content/Context` | ` https://developer.android.com/reference/android/view/Window#getContext()() ` Return the Context this window policy is running in, for retrieving resources and other information. |
| ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/Window#getCurrentFocus()() ` Return the view in this Window that currently has focus, or null if there are none. |
| ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/Window#getDecorView()() ` Retrieve the top-level window decor view (containing the standard window frame/decorations and the client's content inside of that), which can be added as a window to the window manager. |
| ` static int` | ` https://developer.android.com/reference/android/view/Window#getDefaultFeatures(android.content.Context)(https://developer.android.com/reference/android/content/Context context) ` Return the feature bits set by default on a window. |
| ` float` | ` https://developer.android.com/reference/android/view/Window#getDesiredHdrHeadroom()() ` Get the desired amount of HDR headroom as set by `https://developer.android.com/reference/android/view/Window#setDesiredHdrHeadroom(float)` |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getEnterTransition()() ` Returns the transition used to move Views into the initial scene. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getExitTransition()() ` Returns the Transition that will be used to move Views out of the scene when starting a new Activity. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#getFrameRateBoostOnTouchEnabled()() ` Get whether frame rate touch boost is enabled `https://developer.android.com/reference/android/view/Window#setFrameRateBoostOnTouchEnabled(boolean)` |
| ` https://developer.android.com/reference/android/view/WindowInsetsController` | ` https://developer.android.com/reference/android/view/Window#getInsetsController()() ` |
| ` abstract https://developer.android.com/reference/android/view/LayoutInflater` | ` https://developer.android.com/reference/android/view/Window#getLayoutInflater()() ` Quick access to the `https://developer.android.com/reference/android/view/LayoutInflater` instance that this Window retrieved from its Context. |
| ` https://developer.android.com/reference/android/media/session/MediaController` | ` https://developer.android.com/reference/android/view/Window#getMediaController()() ` Gets the `https://developer.android.com/reference/android/media/session/MediaController` that was previously set. |
| ` abstract int` | ` https://developer.android.com/reference/android/view/Window#getNavigationBarColor()() ` *This method was deprecated in API level 35. This is no longer needed since the setter is deprecated.* |
| ` int` | ` https://developer.android.com/reference/android/view/Window#getNavigationBarDividerColor()() ` *This method was deprecated in API level 35. This is no longer needed since the setter is deprecated.* |
| ` https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` | ` https://developer.android.com/reference/android/view/Window#getOnBackInvokedDispatcher()() ` Returns the `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` instance associated with this window. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getReenterTransition()() ` Returns the Transition that will be used to move Views in to the scene when returning from a previously-started Activity. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getReturnTransition()() ` Returns the Transition that will be used to move Views out of the scene when the Window is preparing to close, for example after a call to `https://developer.android.com/reference/android/app/Activity#finishAfterTransition()`. |
| ` https://developer.android.com/reference/android/view/AttachedSurfaceControl` | ` https://developer.android.com/reference/android/view/Window#getRootSurfaceControl()() ` This will be null before a content view is added, e.g. via `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View)` or `https://developer.android.com/reference/android/view/Window#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getSharedElementEnterTransition()() ` Returns the Transition that will be used for shared elements transferred into the content Scene. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getSharedElementExitTransition()() ` Returns the Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getSharedElementReenterTransition()() ` Returns the Transition that will be used for shared elements reentering from a started Activity after it has returned the shared element to it start location. |
| ` https://developer.android.com/reference/android/transition/Transition` | ` https://developer.android.com/reference/android/view/Window#getSharedElementReturnTransition()() ` Returns the Transition that will be used for shared elements transferred back to a calling Activity. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#getSharedElementsUseOverlay()() ` Returns `true` when shared elements should use an Overlay during shared element transitions or `false` when they should animate as part of the normal View hierarchy. |
| ` abstract int` | ` https://developer.android.com/reference/android/view/Window#getStatusBarColor()() ` *This method was deprecated in API level 35. This is no longer needed since the setter is deprecated.* |
| ` https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` | ` https://developer.android.com/reference/android/view/Window#getSystemGestureExclusionRects()() ` Retrieve the list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures. |
| ` long` | ` https://developer.android.com/reference/android/view/Window#getTransitionBackgroundFadeDuration()() ` Returns the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition. |
| ` https://developer.android.com/reference/android/transition/TransitionManager` | ` https://developer.android.com/reference/android/view/Window#getTransitionManager()() ` Retrieve the `https://developer.android.com/reference/android/transition/TransitionManager` responsible for for default transitions in this window. |
| ` abstract int` | ` https://developer.android.com/reference/android/view/Window#getVolumeControlStream()() ` |
| ` https://developer.android.com/reference/android/view/WindowManager` | ` https://developer.android.com/reference/android/view/Window#getWindowManager()() ` Return the window manager allowing this Window to display its own windows. |
| ` final https://developer.android.com/reference/android/content/res/TypedArray` | ` https://developer.android.com/reference/android/view/Window#getWindowStyle()() ` Return the `https://developer.android.com/reference/android/R.styleable#Window` attributes from this window's theme. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/Window#hasChildren()() ` |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#hasFeature(int)(int feature) ` Query for the availability of a certain feature. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#injectInputEvent(android.view.InputEvent)(https://developer.android.com/reference/android/view/InputEvent event) ` Inject an event to window locally. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#invalidatePanelMenu(int)(int featureId) ` |
| ` final boolean` | ` https://developer.android.com/reference/android/view/Window#isActive()() ` |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#isFloating()() ` Return whether this window is being displayed with a floating style (based on the `https://developer.android.com/reference/android/R.attr#windowIsFloating` attribute in the style/theme). |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#isFrameRatePowerSavingsBalanced()() ` Get whether frameratepowersavingsbalance is enabled for this Window. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#isNavigationBarContrastEnforced()() ` Returns whether the system is ensuring that the navigation bar has enough contrast when a fully transparent background is requested. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#isShortcutKey(int,%20android.view.KeyEvent)(int keyCode, https://developer.android.com/reference/android/view/KeyEvent event) ` Is a keypress one of the defined shortcut keys for this window. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#isStatusBarContrastEnforced()() ` *This method was deprecated in API level 35. This is not needed since the setter is deprecated.* |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#isWideColorGamut()() ` Returns true if this window's color mode is `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT`, the display has a wide color gamut and this device supports wide color gamut rendering. |
| ` final void` | ` https://developer.android.com/reference/android/view/Window#makeActive()() ` |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration newConfig) ` Should be called when the configuration is changed. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#openPanel(int,%20android.view.KeyEvent)(int featureId, https://developer.android.com/reference/android/view/KeyEvent event) ` |
| ` abstract https://developer.android.com/reference/android/view/View` | ` https://developer.android.com/reference/android/view/Window#peekDecorView()() ` Retrieve the current decor view, but only if it has already been created; otherwise returns null. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#performContextMenuIdentifierAction(int,%20int)(int id, int flags) ` |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#performPanelIdentifierAction(int,%20int,%20int)(int featureId, int id, int flags) ` |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#performPanelShortcut(int,%20int,%20android.view.KeyEvent,%20int)(int featureId, int keyCode, https://developer.android.com/reference/android/view/KeyEvent event, int flags) ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#registerScrollCaptureCallback(android.view.ScrollCaptureCallback)(https://developer.android.com/reference/android/view/ScrollCaptureCallback callback) ` Used to provide scroll capture support for an arbitrary window. |
| ` final void` | ` https://developer.android.com/reference/android/view/Window#removeOnFrameMetricsAvailableListener(android.view.Window.OnFrameMetricsAvailableListener)(https://developer.android.com/reference/android/view/Window.OnFrameMetricsAvailableListener listener) ` Remove observer and stop listening to frame stats for this window. |
| ` boolean` | ` https://developer.android.com/reference/android/view/Window#requestFeature(int)(int featureId) ` Enable extended screen features. |
| ` final <T extends https://developer.android.com/reference/android/view/View> T` | ` https://developer.android.com/reference/android/view/Window#requireViewById(int)(int id) ` Finds a view that was identified by the `android:id` XML attribute that was processed in `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`, or throws an IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#restoreHierarchyState(android.os.Bundle)(https://developer.android.com/reference/android/os/Bundle savedInstanceState) ` |
| ` abstract https://developer.android.com/reference/android/os/Bundle` | ` https://developer.android.com/reference/android/view/Window#saveHierarchyState()() ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setAllowEnterTransitionOverlap(boolean)(boolean allow) ` Controls how the transition set in `https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)` overlaps with the exit transition of the calling Activity. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setAllowReturnTransitionOverlap(boolean)(boolean allow) ` Controls how the transition set in `https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)` overlaps with the exit transition of the called Activity when reentering after if finishes. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setAttributes(android.view.WindowManager.LayoutParams)(https://developer.android.com/reference/android/view/WindowManager.LayoutParams a) ` Specify custom window attributes. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setBackgroundBlurRadius(int)(int blurRadius) ` <br /> Blurs the screen behind the window within the bounds of the window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setBackgroundDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable) ` Change the background of this window to a custom Drawable. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setBackgroundDrawableResource(int)(int resId) ` Change the background of this window to a Drawable resource. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setCallback(android.view.Window.Callback)(https://developer.android.com/reference/android/view/Window.Callback callback) ` Set the Callback interface for this window, used to intercept key events and other dynamic operations in the window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setChildDrawable(int,%20android.graphics.drawable.Drawable)(int featureId, https://developer.android.com/reference/android/graphics/drawable/Drawable drawable) ` |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setChildInt(int,%20int)(int featureId, int value) ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setClipToOutline(boolean)(boolean clipToOutline) ` Sets whether window content should be clipped to the outline of the window background. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setColorMode(int)(int colorMode) ` <br /> Sets the requested color mode of the window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setContainer(android.view.Window)(https://developer.android.com/reference/android/view/Window container) ` Set the container for this window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setContentView(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) ` Set the screen content to an explicit view. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setContentView(android.view.View)(https://developer.android.com/reference/android/view/View view) ` Convenience for `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)` set the screen content to an explicit view. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setContentView(int)(int layoutResID) ` Convenience for `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)` to set the screen content from a layout resource. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setDecorCaptionShade(int)(int decorCaptionShade) ` Set what color should the caption controls be. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setDecorFitsSystemWindows(boolean)(boolean decorFitsSystemWindows) ` *This method was deprecated in API level 35. Make space in the container views to prevent the critical elements from getting obscured by `https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#displayCutout()` instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setDesiredHdrHeadroom(float)(float desiredHeadroom) ` <br /> Sets the desired amount of HDR headroom to be used when rendering as a ratio of targetHdrPeakBrightnessInNits / targetSdrWhitePointInNits. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setDimAmount(float)(float amount) ` Set the amount of dim behind the window when using `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DIM_BEHIND`. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setDimColor(long)(long color) ` Set the color of the dim behind the window when using `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DIM_BEHIND`. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setElevation(float)(float elevation) ` Sets the window elevation. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used to move Views into the initial scene. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used to move Views out of the scene when starting a new Activity. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)(int featureId, https://developer.android.com/reference/android/graphics/drawable/Drawable drawable) ` Set an explicit Drawable value for feature of this window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setFeatureDrawableAlpha(int,%20int)(int featureId, int alpha) ` Set a custom alpha value for the given drawable feature, controlling how much the background is visible through it. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setFeatureDrawableResource(int,%20int)(int featureId, int resId) ` Set the value for a drawable feature of this window, from a resource identifier. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setFeatureDrawableUri(int,%20android.net.Uri)(int featureId, https://developer.android.com/reference/android/net/Uri uri) ` Set the value for a drawable feature of this window, from a URI. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setFeatureInt(int,%20int)(int featureId, int value) ` Set the integer value for a feature. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)(int flags, int mask) ` Set the flags of the window, as per the `https://developer.android.com/reference/android/view/WindowManager.LayoutParams` flags. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setFormat(int)(int format) ` Set the format of window, as per the PixelFormat types. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setFrameRateBoostOnTouchEnabled(boolean)(boolean enabled) ` Sets whether the frame rate touch boost is enabled for this Window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setFrameRatePowerSavingsBalanced(boolean)(boolean enabled) ` Set whether frameratepowersavingsbalance is enabled for this Window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setGravity(int)(int gravity) ` Set the gravity of the window, as per the Gravity constants. |
| ` final void` | ` https://developer.android.com/reference/android/view/Window#setHideOverlayWindows(boolean)(boolean hide) ` Prevent non-system overlay windows from being drawn on top of this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setIcon(int)(int resId) ` Set the primary icon for this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setLayout(int,%20int)(int width, int height) ` Set the width and height layout parameters of the window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setLocalFocus(boolean,%20boolean)(boolean hasFocus, boolean inTouchMode) ` Set focus locally. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setLogo(int)(int resId) ` Set the logo for this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setMediaController(android.media.session.MediaController)(https://developer.android.com/reference/android/media/session/MediaController controller) ` Sets a `https://developer.android.com/reference/android/media/session/MediaController` to send media keys and volume changes to. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)(int color) ` *This method was deprecated in API level 35. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setNavigationBarContrastEnforced(boolean)(boolean enforceContrast) ` Sets whether the system should ensure that the navigation bar has enough contrast when a fully transparent background is requested. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setNavigationBarDividerColor(int)(int dividerColor) ` *This method was deprecated in API level 35. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or `https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setPreferMinimalPostProcessing(boolean)(boolean isPreferred) ` If `isPreferred` is true, this method requests that the connected display does minimal post processing when this window is visible on the screen. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setReenterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used to move Views in to the scene when returning from a previously-started Activity. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setResizingCaptionDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable drawable) ` Set the drawable that is drawn underneath the caption during the resizing. |
| ` final void` | ` https://developer.android.com/reference/android/view/Window#setRestrictedCaptionAreaListener(android.view.Window.OnRestrictedCaptionAreaChangedListener)(https://developer.android.com/reference/android/view/Window.OnRestrictedCaptionAreaChangedListener listener) ` Set a callback for changes of area where caption will draw its content. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setReturnTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used to move Views out of the scene when the Window is preparing to close, for example after a call to `https://developer.android.com/reference/android/app/Activity#finishAfterTransition()`. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSharedElementEnterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used for shared elements transferred into the content Scene. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSharedElementExitTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used for shared elements after starting a new Activity before the shared elements are transferred to the called Activity. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSharedElementReenterTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used for shared elements reentering from a started Activity after it has returned the shared element to it start location. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSharedElementReturnTransition(android.transition.Transition)(https://developer.android.com/reference/android/transition/Transition transition) ` Sets the Transition that will be used for shared elements transferred back to a calling Activity. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSharedElementsUseOverlay(boolean)(boolean sharedElementsUseOverlay) ` Sets whether or not shared elements should use an Overlay during shared element transitions. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSoftInputMode(int)(int mode) ` Specify an explicit soft input mode to use for the window, as per `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#softInputMode`. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setStatusBarColor(int)(int color) ` *This method was deprecated in API level 35. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()`} instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setStatusBarContrastEnforced(boolean)(boolean ensureContrast) ` *This method was deprecated in API level 35. Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()`} instead.* |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setSustainedPerformanceMode(boolean)(boolean enable) ` Sets the Sustained Performance requirement for the calling window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#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 window's coordinate space where the system should not intercept touch or other pointing device gestures. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setTitle(java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence title) ` Sets a user-facing title for the window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setTitleColor(int)(int textColor) ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setTransitionBackgroundFadeDuration(long)(long fadeDurationMillis) ` Sets the duration, in milliseconds, of the window background fade when transitioning into or away from an Activity when called with an Activity Transition. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setTransitionManager(android.transition.TransitionManager)(https://developer.android.com/reference/android/transition/TransitionManager tm) ` Set the `https://developer.android.com/reference/android/transition/TransitionManager` to use for default transitions in this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setType(int)(int type) ` Set the type of the window, as per the WindowManager.LayoutParams types. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setUiOptions(int)(int uiOptions) ` Set extra options that will influence the UI for this window. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setUiOptions(int,%20int)(int uiOptions, int mask) ` Set extra options that will influence the UI for this window. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#setVolumeControlStream(int)(int streamType) ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setWindowAnimations(int)(int resId) ` Specify custom animations to use for the window, as per `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#windowAnimations`. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setWindowManager(android.view.WindowManager,%20android.os.IBinder,%20java.lang.String)(https://developer.android.com/reference/android/view/WindowManager wm, https://developer.android.com/reference/android/os/IBinder appToken, https://developer.android.com/reference/java/lang/String appName) ` Creates and sets the window manager for use by this Window to, for example, display panels. |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setWindowManager(android.view.WindowManager,%20android.os.IBinder,%20java.lang.String,%20boolean)(https://developer.android.com/reference/android/view/WindowManager wm, https://developer.android.com/reference/android/os/IBinder appToken, https://developer.android.com/reference/java/lang/String appName, boolean hardwareAccelerated) ` Creates and sets the window manager for use by this Window to, for example, display panels. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#superDispatchGenericMotionEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Used by custom windows, such as Dialog, to pass the generic motion event further down the view hierarchy. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#superDispatchKeyEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event) ` Used by custom windows, such as Dialog, to pass the key press event further down the view hierarchy. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#superDispatchKeyShortcutEvent(android.view.KeyEvent)(https://developer.android.com/reference/android/view/KeyEvent event) ` Used by custom windows, such as Dialog, to pass the key shortcut press event further down the view hierarchy. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#superDispatchTouchEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Used by custom windows, such as Dialog, to pass the touch screen event further down the view hierarchy. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/Window#superDispatchTrackballEvent(android.view.MotionEvent)(https://developer.android.com/reference/android/view/MotionEvent event) ` Used by custom windows, such as Dialog, to pass the trackball event further down the view hierarchy. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#takeInputQueue(android.view.InputQueue.Callback)(https://developer.android.com/reference/android/view/InputQueue.Callback callback) ` Take ownership of this window's InputQueue. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#takeKeyEvents(boolean)(boolean get) ` Request that key events come to this activity. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#takeSurface(android.view.SurfaceHolder.Callback2)(https://developer.android.com/reference/android/view/SurfaceHolder.Callback2 callback) ` Take ownership of this window's surface. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#togglePanel(int,%20android.view.KeyEvent)(int featureId, https://developer.android.com/reference/android/view/KeyEvent event) ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#unregisterScrollCaptureCallback(android.view.ScrollCaptureCallback)(https://developer.android.com/reference/android/view/ScrollCaptureCallback callback) ` Unregisters a `https://developer.android.com/reference/android/view/ScrollCaptureCallback` previously registered with this window. |

| ### Protected methods ||
|---|---|
| ` final int` | ` https://developer.android.com/reference/android/view/Window#getFeatures()() ` Return the feature bits that are enabled. |
| ` final int` | ` https://developer.android.com/reference/android/view/Window#getForcedWindowFlags()() ` Return the window flags that have been explicitly set by the client, so will not be modified by `https://developer.android.com/reference/android/view/Window#getDecorView()`. |
| ` final int` | ` https://developer.android.com/reference/android/view/Window#getLocalFeatures()() ` Return the feature bits that are being implemented by this Window. |
| ` final boolean` | ` https://developer.android.com/reference/android/view/Window#hasSoftInputMode()() ` Has the app specified their own soft input mode? |
| ` abstract void` | ` https://developer.android.com/reference/android/view/Window#onActive()() ` |
| ` void` | ` https://developer.android.com/reference/android/view/Window#setDefaultWindowFormat(int)(int format) ` Set the default format of window, as per the PixelFormat types. |

### Inherited methods

From class `

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

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


## XML attributes

### android:navigationBarColor


**This is deprecated.**   

Draw proper background behind
`https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.

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

The color for the navigation bar. If the color is not opaque, consider setting
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE` and
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`.
For this to take effect, the window must be drawing the system bar backgrounds with
`https://developer.android.com/reference/android/R.attr#windowDrawsSystemBarBackgrounds` and the navigation bar must not
have been requested to be translucent with
`https://developer.android.com/reference/android/R.attr#windowTranslucentNavigation`.
Corresponds to `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`.

If the color is transparent and the window enforces the navigation bar contrast, the
system will determine whether a scrim is necessary and draw one on behalf of the app to
ensure that the navigation bar has enough contrast with the contents of this app, and
set an appropriate effective bar background accordingly.
See: `https://developer.android.com/reference/android/R.attr#enforceNavigationBarContrast`

If the window belongs to an app targeting
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
this attribute is ignored.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`

### android:navigationBarDividerColor


**This is deprecated.**   

Draw proper background behind
`https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.

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

Shows a thin line of the specified color between the navigation bar and the app
content.

For this to take effect, the window must be drawing the system bar backgrounds with
`https://developer.android.com/reference/android/R.attr#windowDrawsSystemBarBackgrounds` and the navigation bar must not
have been requested to be translucent with
`https://developer.android.com/reference/android/R.attr#windowTranslucentNavigation`.
Corresponds to `https://developer.android.com/reference/android/view/Window#setNavigationBarDividerColor(int)`.

If the window belongs to an app targeting
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
this attribute is ignored.

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarDividerColor(int)`

### android:windowAllowEnterTransitionOverlap

Flag indicating whether this Window's transition should overlap with
the exiting transition of the calling Activity. Corresponds to
`https://developer.android.com/reference/android/view/Window#setAllowEnterTransitionOverlap(boolean)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setAllowEnterTransitionOverlap(boolean)`

### android:windowAllowReturnTransitionOverlap

Flag indicating whether this Window's transition should overlap with
the exiting transition of the called Activity when the called Activity
finishes. Corresponds to
`https://developer.android.com/reference/android/view/Window#setAllowReturnTransitionOverlap(boolean)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setAllowReturnTransitionOverlap(boolean)`

### android:windowContentTransitionManager

Reference to a TransitionManager XML resource defining the desired
transitions between different window content.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setTransitionManager(android.transition.TransitionManager)`

### android:windowEnterTransition

Reference to a Transition XML resource defining the desired Transition
used to move Views into the initial Window's content Scene. Corresponds to
`https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)`

### android:windowExitTransition

Reference to a Transition XML resource defining the desired Transition
used to move Views out of the Window's content Scene when launching a new Activity.
Corresponds to
`https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)`

### android:windowReenterTransition

Reference to a Transition XML resource defining the desired Transition
used to move Views in to the scene when returning from a previously-started Activity.
Corresponds to
`https://developer.android.com/reference/android/view/Window#setReenterTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setReenterTransition(android.transition.Transition)`

### android:windowReturnTransition

Reference to a Transition XML resource defining the desired Transition
used to move Views out of the scene when the Window is
preparing to close. Corresponds to
`https://developer.android.com/reference/android/view/Window#setReturnTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setReturnTransition(android.transition.Transition)`

### android:windowSharedElementEnterTransition

Reference to a Transition XML resource defining the desired Transition
used to move shared elements transferred into the Window's initial content Scene.
Corresponds to `https://developer.android.com/reference/android/view/Window#setSharedElementEnterTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setSharedElementEnterTransition(android.transition.Transition)`

### android:windowSharedElementExitTransition

Reference to a Transition XML resource defining the desired Transition
used when starting a new Activity to move shared elements prior to transferring
to the called Activity.
Corresponds to `https://developer.android.com/reference/android/view/Window#setSharedElementExitTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setSharedElementExitTransition(android.transition.Transition)`

### android:windowSharedElementReenterTransition

Reference to a Transition XML resource defining the desired Transition
used for shared elements transferred back to a calling Activity.
Corresponds to `https://developer.android.com/reference/android/view/Window#setSharedElementReenterTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setSharedElementReenterTransition(android.transition.Transition)`

### android:windowSharedElementReturnTransition

Reference to a Transition XML resource defining the desired Transition
used to move shared elements transferred back to a calling Activity.
Corresponds to `https://developer.android.com/reference/android/view/Window#setSharedElementReturnTransition(android.transition.Transition)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setSharedElementReturnTransition(android.transition.Transition)`

### android:windowSharedElementsUseOverlay

Indicates whether or not shared elements should use an overlay
during transitions. The default value is true.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setSharedElementsUseOverlay(boolean)`

### android:windowTransitionBackgroundFadeDuration

The duration, in milliseconds, of the window background fade duration
when transitioning into or away from an Activity when called with an
Activity Transition. Corresponds to
`https://developer.android.com/reference/android/view/Window#setTransitionBackgroundFadeDuration(long)`.

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

<br />

**Related methods:**

- `https://developer.android.com/reference/android/view/Window#setTransitionBackgroundFadeDuration(long)`

## Constants

### DECOR_CAPTION_SHADE_AUTO

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

```
public static final int DECOR_CAPTION_SHADE_AUTO
```

Flag for letting the theme drive the color of the window caption controls. Use with
`https://developer.android.com/reference/android/view/Window#setDecorCaptionShade(int)`. This is the default value.

<br />

Constant Value:

0
(0x00000000)


### DECOR_CAPTION_SHADE_DARK

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

```
public static final int DECOR_CAPTION_SHADE_DARK
```

Flag for setting dark-color controls on the window caption. Use with
`https://developer.android.com/reference/android/view/Window#setDecorCaptionShade(int)`.

<br />

Constant Value:

2
(0x00000002)


### DECOR_CAPTION_SHADE_LIGHT

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

```
public static final int DECOR_CAPTION_SHADE_LIGHT
```

Flag for setting light-color controls on the window caption. Use with
`https://developer.android.com/reference/android/view/Window#setDecorCaptionShade(int)`.

<br />

Constant Value:

1
(0x00000001)


### DEFAULT_FEATURES

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

```
protected static final int DEFAULT_FEATURES
```


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

use `https://developer.android.com/reference/android/view/Window#getDefaultFeatures(android.content.Context)` instead.

The default features enabled.

<br />

Constant Value:

65
(0x00000041)


### FEATURE_ACTION_BAR

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

```
public static final int FEATURE_ACTION_BAR
```

Flag for enabling the Action Bar.
This is enabled by default for some devices. The Action Bar
replaces the title bar and provides an alternate location
for an on-screen menu button on some devices.

<br />

Constant Value:

8
(0x00000008)


### FEATURE_ACTION_BAR_OVERLAY

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

```
public static final int FEATURE_ACTION_BAR_OVERLAY
```

Flag for requesting an Action Bar that overlays window content.
Normally an Action Bar will sit in the space above window content, but if this
feature is requested along with `https://developer.android.com/reference/android/view/Window#FEATURE_ACTION_BAR` it will be layered over
the window content itself. This is useful if you would like your app to have more control
over how the Action Bar is displayed, such as letting application content scroll beneath
an Action Bar with a transparent background or otherwise displaying a transparent/translucent
Action Bar over application content.

This mode is especially useful with `https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN`, which allows you to seamlessly hide the
action bar in conjunction with other screen decorations.

As of `https://developer.android.com/reference/android/os/Build.VERSION_CODES#JELLY_BEAN`, when an
ActionBar is in this mode it will adjust the insets provided to
`https://developer.android.com/reference/android/view/View#fitSystemWindows(android.graphics.Rect)`
to include the content covered by the action bar, so you can do layout within
that space.

<br />

Constant Value:

9
(0x00000009)


### FEATURE_ACTION_MODE_OVERLAY

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

```
public static final int FEATURE_ACTION_MODE_OVERLAY
```

Flag for specifying the behavior of action modes when an Action Bar is not present.
If overlay is enabled, the action mode UI will be allowed to cover existing window content.

<br />

Constant Value:

10
(0x0000000a)


### FEATURE_ACTIVITY_TRANSITIONS

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

```
public static final int FEATURE_ACTIVITY_TRANSITIONS
```

Enables Activities to run Activity Transitions either through sending or receiving
ActivityOptions bundle created with
`https://developer.android.com/reference/android/app/ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,%20android.util.Pair<android.view.View,java.lang.String>[])` or `https://developer.android.com/reference/android/app/ActivityOptions#makeSceneTransitionAnimation(android.app.Activity,%20android.view.View,%20java.lang.String)`.

<br />

Constant Value:

13
(0x0000000d)


### FEATURE_CONTENT_TRANSITIONS

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

```
public static final int FEATURE_CONTENT_TRANSITIONS
```

Flag for requesting that window content changes should be animated using a
TransitionManager.

The TransitionManager is set using
`https://developer.android.com/reference/android/view/Window#setTransitionManager(android.transition.TransitionManager)`. If none is set,
a default TransitionManager will be used.

<br />

<br />

**See also:**

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

Constant Value:

12
(0x0000000c)


### FEATURE_CONTEXT_MENU

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

```
public static final int FEATURE_CONTEXT_MENU
```

Flag for the context menu. This is enabled by default.

<br />

Constant Value:

6
(0x00000006)


### FEATURE_CUSTOM_TITLE

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

```
public static final int FEATURE_CUSTOM_TITLE
```

Flag for custom title. You cannot combine this feature with other title features.

<br />

Constant Value:

7
(0x00000007)


### FEATURE_INDETERMINATE_PROGRESS

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

```
public static final int FEATURE_INDETERMINATE_PROGRESS
```


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

No longer supported starting in API 21.

Flag for indeterminate progress.

<br />

Constant Value:

5
(0x00000005)


### FEATURE_LEFT_ICON

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

```
public static final int FEATURE_LEFT_ICON
```

Flag for having an icon on the left side of the title bar

<br />

Constant Value:

3
(0x00000003)


### FEATURE_NO_TITLE

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

```
public static final int FEATURE_NO_TITLE
```

Flag for the "no title" feature, turning off the title at the top
of the screen.

<br />

Constant Value:

1
(0x00000001)


### FEATURE_OPTIONS_PANEL

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

```
public static final int FEATURE_OPTIONS_PANEL
```

Flag for the "options panel" feature. This is enabled by default.

<br />

Constant Value:

0
(0x00000000)


### FEATURE_PROGRESS

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

```
public static final int FEATURE_PROGRESS
```


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

No longer supported starting in API 21.

Flag for the progress indicator feature.

<br />

Constant Value:

2
(0x00000002)


### FEATURE_RIGHT_ICON

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

```
public static final int FEATURE_RIGHT_ICON
```

Flag for having an icon on the right side of the title bar

<br />

Constant Value:

4
(0x00000004)


### FEATURE_SWIPE_TO_DISMISS

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

```
public static final int FEATURE_SWIPE_TO_DISMISS
```


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

Swipe-to-dismiss isn't functional anymore.

Flag for requesting a decoration-free window that is dismissed by swiping from the left.

<br />

Constant Value:

11
(0x0000000b)


### ID_ANDROID_CONTENT

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

```
public static final int ID_ANDROID_CONTENT
```

The ID that the main layout in the XML layout file should have.

<br />

Constant Value:

16908290
(0x01020002)


### NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME

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

```
public static final String NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME
```

The transitionName for the navigation bar background View when a custom background is used.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`

Constant Value:

"android:navigation:background"


### PROGRESS_END

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

```
public static final int PROGRESS_END
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Ending value for the (primary) progress.

<br />

Constant Value:

10000
(0x00002710)


### PROGRESS_INDETERMINATE_OFF

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

```
public static final int PROGRESS_INDETERMINATE_OFF
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_INDETERMINATE_PROGRESS` and related methods
are no longer supported starting in API 21.

Flag for setting the progress bar's indeterminate mode off.

<br />

Constant Value:

-4
(0xfffffffc)


### PROGRESS_INDETERMINATE_ON

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

```
public static final int PROGRESS_INDETERMINATE_ON
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_INDETERMINATE_PROGRESS` and related methods
are no longer supported starting in API 21.

Flag for setting the progress bar's indeterminate mode on.

<br />

Constant Value:

-3
(0xfffffffd)


### PROGRESS_SECONDARY_END

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

```
public static final int PROGRESS_SECONDARY_END
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Highest possible value for the secondary progress.

<br />

Constant Value:

30000
(0x00007530)


### PROGRESS_SECONDARY_START

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

```
public static final int PROGRESS_SECONDARY_START
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Lowest possible value for the secondary progress.

<br />

Constant Value:

20000
(0x00004e20)


### PROGRESS_START

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

```
public static final int PROGRESS_START
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Starting value for the (primary) progress.

<br />

Constant Value:

0
(0x00000000)


### PROGRESS_VISIBILITY_OFF

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

```
public static final int PROGRESS_VISIBILITY_OFF
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Flag for setting the progress bar's visibility to GONE.

<br />

Constant Value:

-2
(0xfffffffe)


### PROGRESS_VISIBILITY_ON

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

```
public static final int PROGRESS_VISIBILITY_ON
```


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

`https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS` and related methods are no longer
supported starting in API 21.

Flag for setting the progress bar's visibility to VISIBLE.

<br />

Constant Value:

-1
(0xffffffff)


### STATUS_BAR_BACKGROUND_TRANSITION_NAME

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

```
public static final String STATUS_BAR_BACKGROUND_TRANSITION_NAME
```

The transitionName for the status bar background View when a custom background is used.

<br />

**See also:**

- `https://developer.android.com/reference/android/view/Window#setStatusBarColor(int)`

Constant Value:

"android:status:background"


## Public constructors

### Window

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

```
public Window (Context context)
```

<br />

<br />

| Parameters ||
|---|---|
| `context` | `Context` <br /> |

## Public methods

### addContentView

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

```
public abstract void addContentView (View view, 
                ViewGroup.LayoutParams params)
```

Variation on
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`
to add an additional content view to the screen. Added after any existing
ones in the screen -- existing views are NOT removed.

<br />

| Parameters ||
|---|---|
| `view` | `View`: The desired content to display. <br /> |
| `params` | `ViewGroup.LayoutParams`: Layout parameters for the view. <br /> |

### addFlags

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

```
public void addFlags (int flags)
```

Convenience function to set the flag bits as specified in flags, as
per `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`.

<br />

| Parameters ||
|---|---|
| `flags` | `int`: The flag bits to be set. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`
- `https://developer.android.com/reference/android/view/Window#clearFlags(int)`

### addOnFrameMetricsAvailableListener

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

```
public final void addOnFrameMetricsAvailableListener (Window.OnFrameMetricsAvailableListener listener, 
                Handler handler)
```

Set an observer to collect frame stats for each frame rendered in this window.

Must be in hardware rendering mode.

<br />

| Parameters ||
|---|---|
| `listener` | `Window.OnFrameMetricsAvailableListener`: This value cannot be `null`. <br /> |
| `handler` | `Handler` <br /> |

### clearFlags

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

```
public void clearFlags (int flags)
```

Convenience function to clear the flag bits as specified in flags, as
per `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`.

<br />

| Parameters ||
|---|---|
| `flags` | `int`: The flag bits to be cleared. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`
- `https://developer.android.com/reference/android/view/Window#addFlags(int)`

### closeAllPanels

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

```
public abstract void closeAllPanels ()
```

<br />

<br />

### closePanel

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

```
public abstract void closePanel (int featureId)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |

### findViewById

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

```
public T findViewById (int id)
```

Finds a view that was identified by the `android:id` XML attribute
that was processed in `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`.


This will implicitly call `https://developer.android.com/reference/android/view/Window#getDecorView()` with all of the associated side-effects.


**Note:** In most cases -- depending on compiler support --
the resulting view is automatically cast to the target class type. If
the target class type is unconstrained, an explicit cast may be
necessary.

<br />

| Parameters ||
|---|---|
| `id` | `int`: the ID to search for <br /> |

| Returns ||
|---|---|
| `T` | a view with given ID if found, or `null` otherwise <br /> |

**See also:**

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

### getAllowEnterTransitionOverlap

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

```
public boolean getAllowEnterTransitionOverlap ()
```

Returns how the transition set in
`https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)` overlaps with the exit
transition of the calling Activity. When true, the transition will start as soon as possible.
When false, the transition will wait until the remote exiting transition completes before
starting. The default value is true.

<br />

**Related XML Attributes:**

- [android:windowAllowEnterTransitionOverlap](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowEnterTransitionOverlap)

| Returns ||
|---|---|
| `boolean` | true when the enter transition should start as soon as possible or false to when it should wait until the exiting transition completes. <br /> |

### getAllowReturnTransitionOverlap

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

```
public boolean getAllowReturnTransitionOverlap ()
```

Returns how the transition set in
`https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)` overlaps with the exit
transition of the called Activity when reentering after if finishes. When true,
the transition will start as soon as possible. When false, the transition will wait
until the called Activity's exiting transition completes before starting.
The default value is true.

<br />

**Related XML Attributes:**

- [android:windowAllowReturnTransitionOverlap](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowReturnTransitionOverlap)

| Returns ||
|---|---|
| `boolean` | true when the transition should start when possible or false when it should wait until the called Activity's exiting transition completes. <br /> |

### getAttributes

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

```
public final WindowManager.LayoutParams getAttributes ()
```

Retrieve the current window attributes associated with this panel.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowManager.LayoutParams` | WindowManager.LayoutParams Either the existing window attributes object, or a freshly created one if there is none. <br /> |

### getCallback

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

```
public final Window.Callback getCallback ()
```

Return the current Callback interface for this window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/Window.Callback` | <br /> |

### getColorMode

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

```
public int getColorMode ()
```

Returns the requested color mode of the window, one of
`https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_DEFAULT`, `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT`
or `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR`. If `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT`
was requested it is possible the window will not be put in wide color gamut mode depending
on device and display support for that mode. Use `https://developer.android.com/reference/android/view/Window#isWideColorGamut()` to determine
if the window is currently in wide color gamut mode.

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_DEFAULT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR` |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setColorMode(int)`
- `https://developer.android.com/reference/android/view/Display#isWideColorGamut()`
- `https://developer.android.com/reference/android/content/res/Configuration#isScreenWideColorGamut()`

### getContainer

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

```
public final Window getContainer ()
```

Return the container for this Window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/Window` | Window The containing window, or null if this is a top-level window. <br /> |

### getContentScene

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

```
public Scene getContentScene ()
```

Retrieve the `https://developer.android.com/reference/android/transition/Scene` representing this window's current content.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS`.

This method will return null if the current content is not represented by a Scene.

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Scene` | Current Scene being shown or null <br /> |

### getContext

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

```
public final Context getContext ()
```

Return the Context this window policy is running in, for retrieving
resources and other information.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Context` | Context The Context that was supplied to the constructor. <br /> |

### getCurrentFocus

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

```
public abstract View getCurrentFocus ()
```

Return the view in this Window that currently has focus, or null if
there are none. Note that this does not look in any containing
Window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | View The current View with focus or null. <br /> |

### getDecorView

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

```
public abstract View getDecorView ()
```

Retrieve the top-level window decor view (containing the standard
window frame/decorations and the client's content inside of that), which
can be added as a window to the window manager.

*Note that calling this function for the first time "locks in"
various window characteristics as described in
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`.*

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | Returns the top-level window decor view. This value cannot be `null`. <br /> |

### getDefaultFeatures

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

```
public static int getDefaultFeatures (Context context)
```

Return the feature bits set by default on a window.

<br />

| Parameters ||
|---|---|
| `context` | `Context`: The context used to access resources <br /> |

| Returns ||
|---|---|
| `int` | <br /> |

### getDesiredHdrHeadroom

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

```
public float getDesiredHdrHeadroom ()
```

Get the desired amount of HDR headroom as set by `https://developer.android.com/reference/android/view/Window#setDesiredHdrHeadroom(float)`

<br />

| Returns ||
|---|---|
| `float` | The amount of HDR headroom set, or 0 for automatic/default behavior. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setDesiredHdrHeadroom(float)`

### getEnterTransition

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

```
public Transition getEnterTransition ()
```

Returns the transition used to move Views into the initial scene. The entering
Views will be those that are regular Views or ViewGroups that have
`https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as entering is governed by changing visibility from
`https://developer.android.com/reference/android/view/View#INVISIBLE` to `https://developer.android.com/reference/android/view/View#VISIBLE`. If `transition` is null,
entering Views will remain unaffected. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowEnterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowEnterTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | the Transition to use to move Views into the initial Scene. <br /> |

### getExitTransition

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

```
public Transition getExitTransition ()
```

Returns the Transition that will be used to move Views out of the scene when starting a
new Activity. The exiting Views will be those that are regular Views or ViewGroups that
have `https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as exiting is governed by changing visibility
from `https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`. If transition is null, the views will
remain unaffected. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowExitTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowExitTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | the Transition to use to move Views out of the scene when calling a new Activity. <br /> |

### getFrameRateBoostOnTouchEnabled

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

```
public boolean getFrameRateBoostOnTouchEnabled ()
```

Get whether frame rate touch boost is enabled
`https://developer.android.com/reference/android/view/Window#setFrameRateBoostOnTouchEnabled(boolean)`

<br />

| Returns ||
|---|---|
| `boolean` | whether the frame rate touch boost is enabled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setFrameRateBoostOnTouchEnabled(boolean)`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#getFrameRateBoostOnTouchEnabled()`

### getInsetsController

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

```
public WindowInsetsController getInsetsController ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowInsetsController` | The `https://developer.android.com/reference/android/view/WindowInsetsController` associated with this window. This value may be `null`. <br /> |

**See also:**

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

### getLayoutInflater

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

```
public abstract LayoutInflater getLayoutInflater ()
```

Quick access to the `https://developer.android.com/reference/android/view/LayoutInflater` instance that this Window
retrieved from its Context.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/LayoutInflater` | LayoutInflater The shared LayoutInflater. This value cannot be `null`. <br /> |

### getMediaController

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

```
public MediaController getMediaController ()
```

Gets the `https://developer.android.com/reference/android/media/session/MediaController` that was previously set.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/media/session/MediaController` | The controller which should receive events. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setMediaController(android.media.session.MediaController)`
- `https://developer.android.com/reference/android/app/Activity#getMediaController()`

### getNavigationBarColor

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

```
public abstract int getNavigationBarColor ()
```


**This method was deprecated
in API level 35.**   

This is no longer needed since the setter is deprecated.

<br />

<br />

| Returns ||
|---|---|
| `int` | the color of the navigation bar. <br /> |

### getNavigationBarDividerColor

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

```
public int getNavigationBarDividerColor ()
```


**This method was deprecated
in API level 35.**   

This is no longer needed since the setter is deprecated.

Retrieves the color of the navigation bar divider.

<br />

**Related XML Attributes:**

- [android:navigationBarDividerColor](https://developer.android.com/reference/android/view/Window#attr_android:navigationBarDividerColor)

| Returns ||
|---|---|
| `int` | The color of the navigation bar divider color. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`

### getOnBackInvokedDispatcher

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

```
public OnBackInvokedDispatcher getOnBackInvokedDispatcher ()
```

Returns the `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` instance associated with this window.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/window/OnBackInvokedDispatcher` | This value cannot be `null`. <br /> |

### getReenterTransition

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

```
public Transition getReenterTransition ()
```

Returns the Transition that will be used to move Views in to the scene when returning from
a previously-started Activity. The entering Views will be those that are regular Views
or ViewGroups that have `https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions
will extend `https://developer.android.com/reference/android/transition/Visibility` as exiting is governed by changing
visibility from `https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowReenterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowReenterTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | The Transition to use to move Views into the scene when reentering from a previously-started Activity. <br /> |

### getReturnTransition

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

```
public Transition getReturnTransition ()
```

Returns the Transition that will be used to move Views out of the scene when the Window is
preparing to close, for example after a call to
`https://developer.android.com/reference/android/app/Activity#finishAfterTransition()`. The exiting
Views will be those that are regular Views or ViewGroups that have
`https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as entering is governed by changing visibility from
`https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`.

<br />

**Related XML Attributes:**

- [android:windowReturnTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowReturnTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | The Transition to use to move Views out of the Scene when the Window is preparing to close. <br /> |

### getRootSurfaceControl

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

```
public AttachedSurfaceControl getRootSurfaceControl ()
```

This will be null before a content view is added, e.g. via
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View)` or `https://developer.android.com/reference/android/view/Window#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`. See
`https://developer.android.com/reference/android/view/View#getRootSurfaceControl()`.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/AttachedSurfaceControl` | The `https://developer.android.com/reference/android/view/AttachedSurfaceControl` interface for this Window <br /> |

### getSharedElementEnterTransition

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

```
public Transition getSharedElementEnterTransition ()
```

Returns the Transition that will be used for shared elements transferred into the content
Scene. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementEnterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementEnterTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | Transition to use for sharend elements transferred into the content Scene. <br /> |

### getSharedElementExitTransition

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

```
public Transition getSharedElementExitTransition ()
```

Returns the Transition to use for shared elements in the launching Window prior
to transferring to the launched Activity's Window.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementExitTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementExitTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | the Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window. <br /> |

### getSharedElementReenterTransition

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

```
public Transition getSharedElementReenterTransition ()
```

Returns the Transition that will be used for shared elements reentering from a started
Activity after it has returned the shared element to it start location.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementReenterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReenterTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | the Transition that will be used for shared elements reentering from a started Activity after it has returned the shared element to it start location. <br /> |

### getSharedElementReturnTransition

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

```
public Transition getSharedElementReturnTransition ()
```

Returns the Transition that will be used for shared elements transferred back to a
calling Activity. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementReturnTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReturnTransition)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/Transition` | Transition to use for sharend elements transferred into the content Scene. <br /> |

### getSharedElementsUseOverlay

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

```
public boolean getSharedElementsUseOverlay ()
```

Returns `true` when shared elements should use an Overlay during
shared element transitions or `false` when they should animate as
part of the normal View hierarchy. The default value is true.

<br />

**Related XML Attributes:**

- [android:windowSharedElementsUseOverlay](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementsUseOverlay)

| Returns ||
|---|---|
| `boolean` | `true` when shared elements should use an Overlay during shared element transitions or `false` when they should animate as part of the normal View hierarchy. <br /> |

### getStatusBarColor

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

```
public abstract int getStatusBarColor ()
```


**This method was deprecated
in API level 35.**   

This is no longer needed since the setter is deprecated.

<br />

<br />

| Returns ||
|---|---|
| `int` | the color of the status bar. <br /> |

### getSystemGestureExclusionRects

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

```
public List<Rect> getSystemGestureExclusionRects ()
```

Retrieve the list of areas within this window's coordinate space where the system should not
intercept touch or other pointing device gestures. This is the list as set by
`https://developer.android.com/reference/android/view/Window#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)` or an empty list if
`https://developer.android.com/reference/android/view/Window#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)` has not been called. It does not include
exclusion rects set by this window's view hierarchy.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/List<https://developer.android.com/reference/android/graphics/Rect>` | a list of system gesture exclusion rects specific to this window. This value cannot be `null`. <br /> |

### getTransitionBackgroundFadeDuration

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

```
public long getTransitionBackgroundFadeDuration ()
```

Returns the duration, in milliseconds, of the window background fade
when transitioning into or away from an Activity when called with an Activity Transition.

When executing the enter transition, the background starts transparent
and fades in. This requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`. The default is
300 milliseconds.

<br />

<br />

**Related XML Attributes:**

- [android:windowTransitionBackgroundFadeDuration](https://developer.android.com/reference/android/view/Window#attr_android:windowTransitionBackgroundFadeDuration)

| Returns ||
|---|---|
| `long` | The duration of the window background fade to opaque during enter transition. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getEnterTransition()`

### getTransitionManager

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

```
public TransitionManager getTransitionManager ()
```

Retrieve the `https://developer.android.com/reference/android/transition/TransitionManager` responsible for for default transitions
in this window. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS`.

This method will return non-null after content has been initialized (e.g. by using
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View)`) if `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS` has been granted.

<br />

<br />

**Related XML Attributes:**

- [android:windowContentTransitionManager](https://developer.android.com/reference/android/view/Window#attr_android:windowContentTransitionManager)

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/transition/TransitionManager` | This window's content TransitionManager or null if none is set. <br /> |

### getVolumeControlStream

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

```
public abstract int getVolumeControlStream ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/Activity#getVolumeControlStream()`

### getWindowManager

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

```
public WindowManager getWindowManager ()
```

Return the window manager allowing this Window to display its own
windows.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/WindowManager` | WindowManager The ViewManager. <br /> |

### getWindowStyle

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

```
public final TypedArray getWindowStyle ()
```

Return the `https://developer.android.com/reference/android/R.styleable#Window` attributes from this
window's theme.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/res/TypedArray` | <br /> |

### hasChildren

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

```
public final boolean hasChildren ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### hasFeature

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

```
public boolean hasFeature (int feature)
```

Query for the availability of a certain feature.

<br />

| Parameters ||
|---|---|
| `feature` | `int`: The feature ID to check <br /> |

| Returns ||
|---|---|
| `boolean` | true if the feature is enabled, false otherwise. <br /> |

### injectInputEvent

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

```
public void injectInputEvent (InputEvent event)
```

Inject an event to window locally.

<br />

| Parameters ||
|---|---|
| `event` | `InputEvent`: A key or touch event to inject to this window. <br /> |

### invalidatePanelMenu

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

```
public abstract void invalidatePanelMenu (int featureId)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |

### isActive

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

```
public final boolean isActive ()
```

<br />

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### isFloating

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

```
public abstract boolean isFloating ()
```

Return whether this window is being displayed with a floating style
(based on the `https://developer.android.com/reference/android/R.attr#windowIsFloating` attribute in
the style/theme).

<br />

| Returns ||
|---|---|
| `boolean` | Returns true if the window is configured to be displayed floating on top of whatever is behind it. <br /> |

### isFrameRatePowerSavingsBalanced

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

```
public boolean isFrameRatePowerSavingsBalanced ()
```

Get whether frameratepowersavingsbalance is enabled for this Window.
This allows device to adjust refresh rate
as needed and can be useful for power saving.
`https://developer.android.com/reference/android/view/Window#setFrameRateBoostOnTouchEnabled(boolean)`

<br />

| Returns ||
|---|---|
| `boolean` | whether the frameratepowersavingsbalance is enabled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setFrameRatePowerSavingsBalanced(boolean)`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#isFrameRatePowerSavingsBalanced()`

### isNavigationBarContrastEnforced

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

```
public boolean isNavigationBarContrastEnforced ()
```

Returns whether the system is ensuring that the navigation bar has enough contrast when a
fully transparent background is requested.

When the navigation bar color has a non-zero alpha value, the value of this
property has no effect.

<br />

| Returns ||
|---|---|
| `boolean` | true, if the system is ensuring contrast, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.attr#enforceNavigationBarContrast`
- `https://developer.android.com/reference/android/view/Window#setNavigationBarContrastEnforced(boolean)`
- `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`

### isShortcutKey

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

```
public abstract boolean isShortcutKey (int keyCode, 
                KeyEvent event)
```

Is a keypress one of the defined shortcut keys for this window.

<br />

| Parameters ||
|---|---|
| `keyCode` | `int`: the key code from `https://developer.android.com/reference/android/view/KeyEvent` to check. <br /> |
| `event` | `KeyEvent`: the `https://developer.android.com/reference/android/view/KeyEvent` to use to help check. <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### isStatusBarContrastEnforced

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

```
public boolean isStatusBarContrastEnforced ()
```


**This method was deprecated
in API level 35.**   

This is not needed since the setter is deprecated.

Returns whether the system is ensuring that the status bar has enough contrast when a
fully transparent background is requested.

When the status bar color has a non-zero alpha value, the value of this
property has no effect.

<br />

| Returns ||
|---|---|
| `boolean` | true, if the system is ensuring contrast, false otherwise. <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.attr#enforceStatusBarContrast`
- `https://developer.android.com/reference/android/view/Window#setStatusBarContrastEnforced(boolean)`
- `https://developer.android.com/reference/android/view/Window#setStatusBarColor(int)`

### isWideColorGamut

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

```
public boolean isWideColorGamut ()
```

Returns true if this window's color mode is `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT`,
the display has a wide color gamut and this device supports wide color gamut rendering.

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Display#isWideColorGamut()`
- `https://developer.android.com/reference/android/content/res/Configuration#isScreenWideColorGamut()`

### makeActive

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

```
public final void makeActive ()
```

<br />

<br />

### onConfigurationChanged

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

```
public abstract void onConfigurationChanged (Configuration newConfig)
```

Should be called when the configuration is changed.

<br />

| Parameters ||
|---|---|
| `newConfig` | `Configuration`: The new configuration. <br /> |

### openPanel

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

```
public abstract void openPanel (int featureId, 
                KeyEvent event)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `event` | `KeyEvent` <br /> |

### peekDecorView

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

```
public abstract View peekDecorView ()
```

Retrieve the current decor view, but only if it has already been created;
otherwise returns null.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/view/View` | Returns the top-level window decor or null. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getDecorView()`

### performContextMenuIdentifierAction

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

```
public abstract boolean performContextMenuIdentifierAction (int id, 
                int flags)
```

<br />

<br />

| Parameters ||
|---|---|
| `id` | `int` <br /> |
| `flags` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### performPanelIdentifierAction

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

```
public abstract boolean performPanelIdentifierAction (int featureId, 
                int id, 
                int flags)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `id` | `int` <br /> |
| `flags` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### performPanelShortcut

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

```
public abstract boolean performPanelShortcut (int featureId, 
                int keyCode, 
                KeyEvent event, 
                int flags)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `keyCode` | `int` <br /> |
| `event` | `KeyEvent` <br /> |
| `flags` | `int` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### registerScrollCaptureCallback

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

```
public void registerScrollCaptureCallback (ScrollCaptureCallback callback)
```

Used to provide scroll capture support for an arbitrary window. This registeres the given
callback with the root view of the window.

<br />

| Parameters ||
|---|---|
| `callback` | `ScrollCaptureCallback`: the callback to add. This value cannot be `null`. <br /> |

### removeOnFrameMetricsAvailableListener

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

```
public final void removeOnFrameMetricsAvailableListener (Window.OnFrameMetricsAvailableListener listener)
```

Remove observer and stop listening to frame stats for this window.

<br />

| Parameters ||
|---|---|
| `listener` | `Window.OnFrameMetricsAvailableListener` <br /> |

### requestFeature

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

```
public boolean requestFeature (int featureId)
```

Enable extended screen features. This must be called before
setContentView(). May be called as many times as desired as long as it
is before setContentView(). If not called, no extended features
will be available. You can not turn off a feature once it is requested.
You canot use other title features with `https://developer.android.com/reference/android/view/Window#FEATURE_CUSTOM_TITLE`.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired features, defined as constants by Window. <br /> |

| Returns ||
|---|---|
| `boolean` | The features that are now set. <br /> |

### requireViewById

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

```
public final T requireViewById (int id)
```

Finds a view that was identified by the `android:id` XML attribute
that was processed in `https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)`, or throws an
IllegalArgumentException if the ID is invalid, or there is no matching view in the hierarchy.


**Note:** In most cases -- depending on compiler support --
the resulting view is automatically cast to the target class type. If
the target class type is unconstrained, an explicit cast may be
necessary.

<br />

| Parameters ||
|---|---|
| `id` | `int`: the ID to search for <br /> |

| Returns ||
|---|---|
| `T` | a view with given ID. This value cannot be `null`. <br /> |

**See also:**

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

### restoreHierarchyState

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

```
public abstract void restoreHierarchyState (Bundle savedInstanceState)
```

<br />

<br />

| Parameters ||
|---|---|
| `savedInstanceState` | `Bundle` <br /> |

### saveHierarchyState

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

```
public abstract Bundle saveHierarchyState ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/os/Bundle` | <br /> |

### setAllowEnterTransitionOverlap

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

```
public void setAllowEnterTransitionOverlap (boolean allow)
```

Controls how the transition set in
`https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)` overlaps with the exit
transition of the calling Activity. When true, the transition will start as soon as possible.
When false, the transition will wait until the remote exiting transition completes before
starting. The default value is true.

<br />

**Related XML Attributes:**

- [android:windowAllowEnterTransitionOverlap](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowEnterTransitionOverlap)

| Parameters ||
|---|---|
| `allow` | `boolean`: true to start the enter transition when possible or false to wait until the exiting transition completes. <br /> |

### setAllowReturnTransitionOverlap

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

```
public void setAllowReturnTransitionOverlap (boolean allow)
```

Controls how the transition set in
`https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)` overlaps with the exit
transition of the called Activity when reentering after if finishes. When true,
the transition will start as soon as possible. When false, the transition will wait
until the called Activity's exiting transition completes before starting.
The default value is true.

<br />

**Related XML Attributes:**

- [android:windowAllowReturnTransitionOverlap](https://developer.android.com/reference/android/view/Window#attr_android:windowAllowReturnTransitionOverlap)

| Parameters ||
|---|---|
| `allow` | `boolean`: true to start the transition when possible or false to wait until the called Activity's exiting transition completes. <br /> |

### setAttributes

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

```
public void setAttributes (WindowManager.LayoutParams a)
```

Specify custom window attributes. **PLEASE NOTE:** the
layout params you give here should generally be from values previously
retrieved with `https://developer.android.com/reference/android/view/Window#getAttributes()`; you probably do not want to
blindly create and apply your own, since this will blow away any values
set by the framework that you are not interested in.

<br />

| Parameters ||
|---|---|
| `a` | `WindowManager.LayoutParams`: The new window attributes, which will completely override any current values. <br /> |

### setBackgroundBlurRadius

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

```
public void setBackgroundBlurRadius (int blurRadius)
```

<br />


Blurs the screen behind the window within the bounds of the window.


The density of the blur is set by the blur radius. The radius defines the size
of the neighbouring area, from which pixels will be averaged to form the final
color for each pixel. The operation approximates a Gaussian blur.
A radius of 0 means no blur. The higher the radius, the denser the blur.


The window background drawable is drawn on top of the blurred region. The blur
region bounds and rounded corners will mimic those of the background drawable.


For the blur region to be visible, the window has to be translucent
(see `https://developer.android.com/reference/android/R.attr#windowIsTranslucent`) and floating
(see `https://developer.android.com/reference/android/R.attr#windowIsFloating`).


Note the difference with `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setBlurBehindRadius(int)`,
which blurs the whole screen behind the window. Background blur blurs the screen behind
only within the bounds of the window.


Some devices might not support cross-window blur due to GPU limitations. It can also be
disabled at runtime, e.g. during battery saving mode, when multimedia tunneling is used or
when minimal post processing is requested. In such situations, no blur will be computed or
drawn, resulting in a transparent window background. To avoid this, the app might want to
change its theme to one that does not use blurs. To listen for cross-window blur
enabled/disabled events, use `https://developer.android.com/reference/android/view/WindowManager#addCrossWindowBlurEnabledListener(java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Boolean>)`.

<br />

<br />

| Parameters ||
|---|---|
| `blurRadius` | `int`: The blur radius to use for window background blur in pixels <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.styleable#Window_windowBackgroundBlurRadius`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setBlurBehindRadius(int)`
- `https://developer.android.com/reference/android/view/WindowManager#addCrossWindowBlurEnabledListener(java.util.concurrent.Executor,%20java.util.function.Consumer<java.lang.Boolean>)`

### setBackgroundDrawable

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

```
public abstract void setBackgroundDrawable (Drawable drawable)
```

Change the background of this window to a custom Drawable. Setting the
background to null will make the window be opaque. To make the window
transparent, you can use an empty drawable (for instance a ColorDrawable
with the color 0 or the system drawable android:drawable/empty.)

<br />

| Parameters ||
|---|---|
| `drawable` | `Drawable`: The new Drawable to use for this window's background. <br /> |

### setBackgroundDrawableResource

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

```
public void setBackgroundDrawableResource (int resId)
```

Change the background of this window to a Drawable resource. Setting the
background to null will make the window be opaque. To make the window
transparent, you can use an empty drawable (for instance a ColorDrawable
with the color 0 or the system drawable android:drawable/empty.)

<br />

| Parameters ||
|---|---|
| `resId` | `int`: The resource identifier of a drawable resource which will be installed as the new background. <br /> |

### setCallback

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

```
public void setCallback (Window.Callback callback)
```

Set the Callback interface for this window, used to intercept key
events and other dynamic operations in the window.

<br />

| Parameters ||
|---|---|
| `callback` | `Window.Callback`: The desired Callback interface. <br /> |

### setChildDrawable

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

```
public abstract void setChildDrawable (int featureId, 
                Drawable drawable)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `drawable` | `Drawable` <br /> |

### setChildInt

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

```
public abstract void setChildInt (int featureId, 
                int value)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `value` | `int` <br /> |

### setClipToOutline

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

```
public void setClipToOutline (boolean clipToOutline)
```

Sets whether window content should be clipped to the outline of the
window background.

<br />

| Parameters ||
|---|---|
| `clipToOutline` | `boolean`: Whether window content should be clipped to the outline of the window background. <br /> |

**See also:**

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

### setColorMode

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

```
public void setColorMode (int colorMode)
```

<br />

Sets the requested color mode of the window. The requested the color mode might
override the window's pixel `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#format`.

The requested color mode must be one of `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_DEFAULT`,
`https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT` or `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR`.

The requested color mode is not guaranteed to be honored. Please refer to
`https://developer.android.com/reference/android/view/Window#getColorMode()` for more information.

Note: This does not impact SurfaceViews or SurfaceControls, as those have their own
independent color mode and HDR parameters.

<br />

<br />

| Parameters ||
|---|---|
| `colorMode` | `int`: Value is one of the following: - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_DEFAULT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_WIDE_COLOR_GAMUT` - `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR` |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getColorMode()`
- `https://developer.android.com/reference/android/view/Display#isWideColorGamut()`
- `https://developer.android.com/reference/android/content/res/Configuration#isScreenWideColorGamut()`

### setContainer

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

```
public void setContainer (Window container)
```

Set the container for this window. If not set, the DecorWindow
operates as a top-level window; otherwise, it negotiates with the
container to display itself appropriately.

<br />

| Parameters ||
|---|---|
| `container` | `Window`: The desired containing Window. <br /> |

### setContentView

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

```
public abstract void setContentView (View view, 
                ViewGroup.LayoutParams params)
```

Set the screen content to an explicit view. This view is placed
directly into the screen's view hierarchy. It can itself be a complex
view hierarchy.

Note that calling this function "locks in" various characteristics
of the window that can not, from this point forward, be changed: the
features that have been requested with `https://developer.android.com/reference/android/view/Window#requestFeature(int)`,
and certain window flags as described in `https://developer.android.com/reference/android/view/Window#setFlags(int,%20int)`.

If `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS` is set, the window's
TransitionManager will be used to animate content from the current
content View to view.

<br />

<br />

| Parameters ||
|---|---|
| `view` | `View`: The desired content to display. <br /> |
| `params` | `ViewGroup.LayoutParams`: Layout parameters for the view. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getTransitionManager()`
- `https://developer.android.com/reference/android/view/Window#setTransitionManager(android.transition.TransitionManager)`

### setContentView

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

```
public abstract void setContentView (View view)
```

Convenience for
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`
set the screen content to an explicit view. This view is placed
directly into the screen's view hierarchy. It can itself be a complex
view hierarhcy.

<br />

| Parameters ||
|---|---|
| `view` | `View`: The desired content to display. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`

### setContentView

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

```
public abstract void setContentView (int layoutResID)
```

Convenience for
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`
to set the screen content from a layout resource. The resource will be
inflated, adding all top-level views to the screen.

<br />

| Parameters ||
|---|---|
| `layoutResID` | `int`: Resource ID to be inflated. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)`

### setDecorCaptionShade

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

```
public abstract void setDecorCaptionShade (int decorCaptionShade)
```

Set what color should the caption controls be. By default the system will try to determine
the color from the theme. You can overwrite this by using `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_DARK`,
`https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_LIGHT`, or `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_AUTO`.

<br />

| Parameters ||
|---|---|
| `decorCaptionShade` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_DARK`
- `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_LIGHT`
- `https://developer.android.com/reference/android/view/Window#DECOR_CAPTION_SHADE_AUTO`

### setDecorFitsSystemWindows

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

```
public void setDecorFitsSystemWindows (boolean decorFitsSystemWindows)
```


**This method was deprecated
in API level 35.**   

Make space in the container views to prevent the critical elements from getting
obscured by `https://developer.android.com/reference/android/view/WindowInsets.Type#systemBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#displayCutout()` instead.

Sets whether the decor view should fit root-level content views for `https://developer.android.com/reference/android/view/WindowInsets`.


If set to `true`, the framework will inspect the now deprecated
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_LAYOUT_FLAGS` as well the
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_RESIZE` flag and fits content according
to these flags.


If set to `false`, the framework will not fit the content view to the insets and will
just pass through the `https://developer.android.com/reference/android/view/WindowInsets` to the content view.


If the app targets
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
the behavior will be like setting this to `false`, and cannot be changed.

<br />

| Parameters ||
|---|---|
| `decorFitsSystemWindows` | `boolean`: Whether the decor view should fit root-level content views for insets. <br /> |

### setDesiredHdrHeadroom

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

```
public void setDesiredHdrHeadroom (float desiredHeadroom)
```

<br />

Sets the desired amount of HDR headroom to be used when rendering as a ratio of
targetHdrPeakBrightnessInNits / targetSdrWhitePointInNits. Only applies when
`https://developer.android.com/reference/android/view/Window#setColorMode(int)` is `https://developer.android.com/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR`

By default the system will choose an amount of HDR headroom that is appropriate
for the underlying device capabilities \& bit-depth of the panel. However, for some types
of content this can end up being more headroom than necessary or desired. An example
would be a messaging app or gallery thumbnail view where some amount of HDR pop is desired
without overly influencing the perceived brightness of the majority SDR content. This can
also be used to animate in/out of an HDR range for smoother transitions.

Note: The actual amount of HDR headroom that will be given is subject to a variety
of factors such as ambient conditions, display capabilities, or bit-depth limitations.
See `https://developer.android.com/reference/android/view/Display#getHdrSdrRatio()` for more information as well as how to query the
current value.

Note: This does not impact SurfaceViews or SurfaceControls, as those have their own
independent desired HDR headroom and HDR capabilities.

<br />

<br />

| Parameters ||
|---|---|
| `desiredHeadroom` | `float`: The amount of HDR headroom that is desired. Must be \>= 1.0 (no HDR) and \<= 10,000.0. Passing 0.0 will reset to the default, automatically chosen value. Value is between 0.0f and 10000.0f inclusive <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getDesiredHdrHeadroom()`
- `https://developer.android.com/reference/android/view/Display#getHdrSdrRatio()`

### setDimAmount

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

```
public void setDimAmount (float amount)
```

Set the amount of dim behind the window when using
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DIM_BEHIND`. This overrides
the default dim amount of that is selected by the Window based on
its theme.

<br />

| Parameters ||
|---|---|
| `amount` | `float`: The new dim amount, from 0 for no dim to 1 for full dim. <br /> |

### setDimColor

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

```
public void setDimColor (long color)
```

Set the color of the dim behind the window when using
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DIM_BEHIND`. This overrides
the default dim color that is selected by the Window based on
its theme.

<br />

| Parameters ||
|---|---|
| `color` | `long`: The new dim color. <br /> |

### setElevation

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

```
public void setElevation (float elevation)
```

Sets the window elevation.


Changes to this property take effect immediately and will cause the
window surface to be recreated. This is an expensive operation and as a
result, this property should not be animated.

<br />

| Parameters ||
|---|---|
| `elevation` | `float`: The window elevation. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/View#setElevation(float)`
- `https://developer.android.com/reference/android/R.styleable#Window_windowElevation`

### setEnterTransition

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

```
public void setEnterTransition (Transition transition)
```

Sets the Transition that will be used to move Views into the initial scene. The entering
Views will be those that are regular Views or ViewGroups that have
`https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as entering is governed by changing visibility from
`https://developer.android.com/reference/android/view/View#INVISIBLE` to `https://developer.android.com/reference/android/view/View#VISIBLE`. If `transition` is null,
entering Views will remain unaffected.

<br />

**Related XML Attributes:**

- [android:windowEnterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowEnterTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use to move Views into the initial Scene. <br /> |

### setExitTransition

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

```
public void setExitTransition (Transition transition)
```

Sets the Transition that will be used to move Views out of the scene when starting a
new Activity. The exiting Views will be those that are regular Views or ViewGroups that
have `https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as exiting is governed by changing visibility
from `https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`. If transition is null, the views will
remain unaffected. Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowExitTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowExitTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use to move Views out of the scene when calling a new Activity. <br /> |

### setFeatureDrawable

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

```
public abstract void setFeatureDrawable (int featureId, 
                Drawable drawable)
```

Set an explicit Drawable value for feature of this window. You must
have called requestFeature(featureId) before calling this function.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired drawable feature to change. Features are constants defined by Window. <br /> |
| `drawable` | `Drawable`: A Drawable object to display. <br /> |

### setFeatureDrawableAlpha

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

```
public abstract void setFeatureDrawableAlpha (int featureId, 
                int alpha)
```

Set a custom alpha value for the given drawable feature, controlling how
much the background is visible through it.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired drawable feature to change. Features are constants defined by Window. <br /> |
| `alpha` | `int`: The alpha amount, 0 is completely transparent and 255 is completely opaque. <br /> |

### setFeatureDrawableResource

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

```
public abstract void setFeatureDrawableResource (int featureId, 
                int resId)
```

Set the value for a drawable feature of this window, from a resource
identifier. You must have called requestFeature(featureId) before
calling this function.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired drawable feature to change, defined as a constant by Window. <br /> |
| `resId` | `int`: Resource identifier of the desired image. <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/res/Resources#getDrawable(int)`

### setFeatureDrawableUri

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

```
public abstract void setFeatureDrawableUri (int featureId, 
                Uri uri)
```

Set the value for a drawable feature of this window, from a URI. You
must have called requestFeature(featureId) before calling this
function.

The only URI currently supported is "content:", specifying an image
in a content provider.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired drawable feature to change. Features are constants defined by Window. <br /> |
| `uri` | `Uri`: The desired URI. <br /> |

**See also:**

- `https://developer.android.com/reference/android/widget/ImageView#setImageURI(android.net.Uri)`

### setFeatureInt

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

```
public abstract void setFeatureInt (int featureId, 
                int value)
```

Set the integer value for a feature. The range of the value depends on
the feature being set. For `https://developer.android.com/reference/android/view/Window#FEATURE_PROGRESS`, it should go from
0 to 10000. At 10000 the progress is complete and the indicator hidden.

<br />

| Parameters ||
|---|---|
| `featureId` | `int`: The desired feature to change. Features are constants defined by Window. <br /> |
| `value` | `int`: The value for the feature. The interpretation of this value is feature-specific. <br /> |

### setFlags

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

```
public void setFlags (int flags, 
                int mask)
```

Set the flags of the window, as per the
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams`
flags.

Note that some flags must be set before the window decoration is
created (by the first call to
`https://developer.android.com/reference/android/view/Window#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)` or
`https://developer.android.com/reference/android/view/Window#getDecorView()`:
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LAYOUT_IN_SCREEN` and
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LAYOUT_INSET_DECOR`. These
will be set for you based on the `https://developer.android.com/reference/android/R.attr#windowIsFloating`
attribute.

<br />

| Parameters ||
|---|---|
| `flags` | `int`: The new window flags (see WindowManager.LayoutParams). <br /> |
| `mask` | `int`: Which of the window flag bits to modify. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#addFlags(int)`
- `https://developer.android.com/reference/android/view/Window#clearFlags(int)`

### setFormat

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

```
public void setFormat (int format)
```

Set the format of window, as per the PixelFormat types. This overrides
the default format that is selected by the Window based on its
window decorations.

<br />

| Parameters ||
|---|---|
| `format` | `int`: The new window format (see PixelFormat). Use PixelFormat.UNKNOWN to allow the Window to select the format. <br /> |

**See also:**

- `https://developer.android.com/reference/android/graphics/PixelFormat`

### setFrameRateBoostOnTouchEnabled

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

```
public void setFrameRateBoostOnTouchEnabled (boolean enabled)
```

Sets whether the frame rate touch boost is enabled for this Window.
When enabled, the frame rate will be boosted when a user touches the Window.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: whether the frame rate touch boost is enabled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#getFrameRateBoostOnTouchEnabled()`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setFrameRateBoostOnTouchEnabled(boolean)`

### setFrameRatePowerSavingsBalanced

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

```
public void setFrameRatePowerSavingsBalanced (boolean enabled)
```

Set whether frameratepowersavingsbalance is enabled for this Window.
This allows device to adjust refresh rate
as needed and can be useful for power saving.

<br />

| Parameters ||
|---|---|
| `enabled` | `boolean`: whether the frameratepowersavingsbalance is enabled. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#isFrameRatePowerSavingsBalanced()`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setFrameRatePowerSavingsBalanced(boolean)`

### setGravity

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

```
public void setGravity (int gravity)
```

Set the gravity of the window, as per the Gravity constants. This
controls how the window manager is positioned in the overall window; it
is only useful when using WRAP_CONTENT for the layout width or height.

<br />

| Parameters ||
|---|---|
| `gravity` | `int`: The desired gravity constant. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Gravity`
- `https://developer.android.com/reference/android/view/Window#setLayout(int,%20int)`

### setHideOverlayWindows

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

```
public final void setHideOverlayWindows (boolean hide)
```

Prevent non-system overlay windows from being drawn on top of this window.


Requires `https://developer.android.com/reference/android/Manifest.permission#HIDE_OVERLAY_WINDOWS`

<br />

| Parameters ||
|---|---|
| `hide` | `boolean`: whether non-system overlay windows should be hidden. <br /> |

### setIcon

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

```
public void setIcon (int resId)
```

Set the primary icon for this window.

<br />

| Parameters ||
|---|---|
| `resId` | `int`: resource ID of a drawable to set <br /> |

### setLayout

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

```
public void setLayout (int width, 
                int height)
```

Set the width and height layout parameters of the window. The default
for both of these is MATCH_PARENT; you can change them to WRAP_CONTENT
or an absolute value to make a window that is not full-screen.

<br />

| Parameters ||
|---|---|
| `width` | `int`: The desired layout width of the window. <br /> |
| `height` | `int`: The desired layout height of the window. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#height`
- `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams#width`

### setLocalFocus

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

```
public void setLocalFocus (boolean hasFocus, 
                boolean inTouchMode)
```

Set focus locally. The window should have the
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LOCAL_FOCUS_MODE` flag set already.

<br />

| Parameters ||
|---|---|
| `hasFocus` | `boolean`: Whether this window has focus or not. <br /> |
| `inTouchMode` | `boolean`: Whether this window is in touch mode or not. <br /> |

### setLogo

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

```
public void setLogo (int resId)
```

Set the logo for this window. A logo is often shown in place of an
`https://developer.android.com/reference/android/view/Window#setIcon(int)` but is generally wider and communicates window title information
as well.

<br />

| Parameters ||
|---|---|
| `resId` | `int`: resource ID of a drawable to set <br /> |

### setMediaController

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

```
public void setMediaController (MediaController controller)
```

Sets a `https://developer.android.com/reference/android/media/session/MediaController` to send media keys and volume changes to.
If set, this should be preferred for all media keys and volume requests
sent to this window.

<br />

| Parameters ||
|---|---|
| `controller` | `MediaController`: The controller for the session which should receive media keys and volume changes. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/Activity#setMediaController(android.media.session.MediaController)`

### setNavigationBarColor

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

```
public abstract void setNavigationBarColor (int color)
```


**This method was deprecated
in API level 35.**   

Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.

Sets the color of the navigation bar to `color`.

For this to take effect,
the window must be drawing the system bar backgrounds with
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS` and
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION` must not be set.

If `color` is not opaque, consider setting
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE` and
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION`.


The transitionName for the view background will be "android:navigation:background".


If the color is transparent and the window enforces the navigation bar contrast, the system
will determine whether a scrim is necessary and draw one on behalf of the app to ensure that
the navigation bar has enough contrast with the contents of this app, and set an appropriate
effective bar background accordingly.


If the app targets
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
the color will be transparent and cannot be changed.

<br />

**Related XML Attributes:**

- [android:navigationBarColor](https://developer.android.com/reference/android/view/Window#attr_android:navigationBarColor)

| Parameters ||
|---|---|
| `color` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarContrastEnforced(boolean)`

### setNavigationBarContrastEnforced

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

```
public void setNavigationBarContrastEnforced (boolean enforceContrast)
```

Sets whether the system should ensure that the navigation bar has enough
contrast when a fully transparent background is requested.

If set to this value, the system will determine whether a scrim is necessary
to ensure that the navigation bar has enough contrast with the contents of
this app, and set an appropriate effective bar background color accordingly.

When the navigation bar color has a non-zero alpha value, the value of this
property has no effect.

<br />

| Parameters ||
|---|---|
| `enforceContrast` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.attr#enforceNavigationBarContrast`
- `https://developer.android.com/reference/android/view/Window#isNavigationBarContrastEnforced()`
- `https://developer.android.com/reference/android/view/Window#setNavigationBarColor(int)`

### setNavigationBarDividerColor

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

```
public void setNavigationBarDividerColor (int dividerColor)
```


**This method was deprecated
in API level 35.**   

Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#navigationBars()` or
`https://developer.android.com/reference/android/view/WindowInsets.Type#tappableElement()` instead.

Shows a thin line of the specified color between the navigation bar and the app
content.


For this to take effect,
the window must be drawing the system bar backgrounds with
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS` and
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_TRANSLUCENT_NAVIGATION` must not be set.


If the app targets
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
the color will be transparent and cannot be changed.

<br />

**Related XML Attributes:**

- [android:navigationBarDividerColor](https://developer.android.com/reference/android/view/Window#attr_android:navigationBarDividerColor)

| Parameters ||
|---|---|
| `dividerColor` | `int`: The color of the thin line. <br /> |

### setPreferMinimalPostProcessing

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

```
public void setPreferMinimalPostProcessing (boolean isPreferred)
```

If `isPreferred` is true, this method requests that the connected display does minimal
post processing when this window is visible on the screen. Otherwise, it requests that the
display switches back to standard image processing.

By default, the display does not do minimal post processing and if this is desired, this
method should not be used. It should be used with `isPreferred=true` when low
latency has a higher priority than image enhancement processing (e.g. for games or video
conferencing). The display will automatically go back into standard image processing mode
when no window requesting minimal posst processing is visible on screen anymore.
`setPreferMinimalPostProcessing(false)` can be used if
`setPreferMinimalPostProcessing(true)` was previously called for this window and
minimal post processing is no longer required.

If the Display sink is connected via HDMI, the device will begin to send infoframes with
Auto Low Latency Mode enabled and Game Content Type. This will switch the connected display
to a minimal image processing mode (if available), which reduces latency, improving the user
experience for gaming or video conferencing applications. For more information, see HDMI 2.1
specification.

If the Display sink has an internal connection or uses some other protocol than HDMI,
effects may be similar but implementation-defined.

The ability to switch to a mode with minimal post proessing may be disabled by a user
setting in the system settings menu. In that case, this method does nothing.

<br />

| Parameters ||
|---|---|
| `isPreferred` | `boolean`: Indicates whether minimal post processing is preferred for this window (`isPreferred=true`) or not (`isPreferred=false`). <br /> |

**See also:**

- `https://developer.android.com/reference/android/content/pm/ActivityInfo#FLAG_PREFER_MINIMAL_POST_PROCESSING`
- `https://developer.android.com/reference/android/view/Display#isMinimalPostProcessingSupported()`
- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#preferMinimalPostProcessing`

### setReenterTransition

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

```
public void setReenterTransition (Transition transition)
```

Sets the Transition that will be used to move Views in to the scene when returning from
a previously-started Activity. The entering Views will be those that are regular Views
or ViewGroups that have `https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions
will extend `https://developer.android.com/reference/android/transition/Visibility` as exiting is governed by changing
visibility from `https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`. If transition is null,
the views will remain unaffected. If nothing is set, the default will be to use the same
transition as `https://developer.android.com/reference/android/view/Window#setExitTransition(android.transition.Transition)`.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowReenterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowReenterTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use to move Views into the scene when reentering from a previously-started Activity. <br /> |

### setResizingCaptionDrawable

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

```
public abstract void setResizingCaptionDrawable (Drawable drawable)
```

Set the drawable that is drawn underneath the caption during the resizing.

During the resizing the caption might not be drawn fast enough to match the new dimensions.
There is a second caption drawn underneath it that will be fast enough. By default the
caption is constructed from the theme. You can provide a drawable, that will be drawn instead
to better match your application.

Starting in Android 15, this API is a no-op. New window decorations introduced in Android 14
are drawn in SystemUI process, and OEMs are responsible to make them responsive to resizing.
There is no need to set a background drawable to improve UX anymore since then. Additionally,
the foremost activity can draw in caption areas starting in Android 15. Check
`https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND`,
`https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_LIGHT_CAPTION_BARS`,
`https://developer.android.com/reference/android/view/WindowInsetsController#setSystemBarsAppearance(int,%20int)` and
`https://developer.android.com/reference/android/view/WindowInsets#getBoundingRects(int)`.

<br />

| Parameters ||
|---|---|
| `drawable` | `Drawable` <br /> |

### setRestrictedCaptionAreaListener

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

```
public final void setRestrictedCaptionAreaListener (Window.OnRestrictedCaptionAreaChangedListener listener)
```

Set a callback for changes of area where caption will draw its content.

<br />

| Parameters ||
|---|---|
| `listener` | `Window.OnRestrictedCaptionAreaChangedListener`: Callback that will be called when the area changes. <br /> |

### setReturnTransition

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

```
public void setReturnTransition (Transition transition)
```

Sets the Transition that will be used to move Views out of the scene when the Window is
preparing to close, for example after a call to
`https://developer.android.com/reference/android/app/Activity#finishAfterTransition()`. The exiting
Views will be those that are regular Views or ViewGroups that have
`https://developer.android.com/reference/android/view/ViewGroup#isTransitionGroup()` return true. Typical Transitions will extend
`https://developer.android.com/reference/android/transition/Visibility` as entering is governed by changing visibility from
`https://developer.android.com/reference/android/view/View#VISIBLE` to `https://developer.android.com/reference/android/view/View#INVISIBLE`. If `transition` is null,
entering Views will remain unaffected. If nothing is set, the default will be to
use the same value as set in `https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)`.

<br />

**Related XML Attributes:**

- [android:windowReturnTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowReturnTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use to move Views out of the Scene when the Window is preparing to close. <br /> |

### setSharedElementEnterTransition

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

```
public void setSharedElementEnterTransition (Transition transition)
```

Sets the Transition that will be used for shared elements transferred into the content
Scene. Typical Transitions will affect size and location, such as
`https://developer.android.com/reference/android/transition/ChangeBounds`. A null
value will cause transferred shared elements to blink to the final position.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementEnterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementEnterTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use for shared elements transferred into the content Scene. <br /> |

### setSharedElementExitTransition

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

```
public void setSharedElementExitTransition (Transition transition)
```

Sets the Transition that will be used for shared elements after starting a new Activity
before the shared elements are transferred to the called Activity. If the shared elements
must animate during the exit transition, this Transition should be used. Upon completion,
the shared elements may be transferred to the started Activity.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementExitTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementExitTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use for shared elements in the launching Window prior to transferring to the launched Activity's Window. <br /> |

### setSharedElementReenterTransition

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

```
public void setSharedElementReenterTransition (Transition transition)
```

Sets the Transition that will be used for shared elements reentering from a started
Activity after it has returned the shared element to it start location. If no value
is set, this will default to
`https://developer.android.com/reference/android/view/Window#setSharedElementExitTransition(android.transition.Transition)`.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementReenterTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReenterTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use for shared elements in the launching Window after the shared element has returned to the Window. <br /> |

### setSharedElementReturnTransition

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

```
public void setSharedElementReturnTransition (Transition transition)
```

Sets the Transition that will be used for shared elements transferred back to a
calling Activity. Typical Transitions will affect size and location, such as
`https://developer.android.com/reference/android/transition/ChangeBounds`. A null
value will cause transferred shared elements to blink to the final position.
If no value is set, the default will be to use the same value as
`https://developer.android.com/reference/android/view/Window#setSharedElementEnterTransition(android.transition.Transition)`.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowSharedElementReturnTransition](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementReturnTransition)

| Parameters ||
|---|---|
| `transition` | `Transition`: The Transition to use for shared elements transferred out of the content Scene. <br /> |

### setSharedElementsUseOverlay

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

```
public void setSharedElementsUseOverlay (boolean sharedElementsUseOverlay)
```

Sets whether or not shared elements should use an Overlay during shared element transitions.
The default value is true.

<br />

**Related XML Attributes:**

- [android:windowSharedElementsUseOverlay](https://developer.android.com/reference/android/view/Window#attr_android:windowSharedElementsUseOverlay)

| Parameters ||
|---|---|
| `sharedElementsUseOverlay` | `boolean`: `true` indicates that shared elements should be transitioned with an Overlay or `false` to transition within the normal View hierarchy. <br /> |

### setSoftInputMode

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

```
public void setSoftInputMode (int mode)
```

Specify an explicit soft input mode to use for the window, as per
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#softInputMode`. Providing anything besides
"unspecified" here will override the input mode the window would
normally retrieve from its theme.

<br />

| Parameters ||
|---|---|
| `mode` | `int` <br /> |

### setStatusBarColor

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

```
public abstract void setStatusBarColor (int color)
```


**This method was deprecated
in API level 35.**   

Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()`} instead.

Sets the color of the status bar to `color`.

For this to take effect,
the window must be drawing the system bar backgrounds with
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS` and
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS` must not be set.

If `color` is not opaque, consider setting
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_STABLE` and
`https://developer.android.com/reference/android/view/View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN`.


The transitionName for the view background will be "android:status:background".


If the color is transparent and the window enforces the status bar contrast, the system
will determine whether a scrim is necessary and draw one on behalf of the app to ensure
that the status bar has enough contrast with the contents of this app, and set an appropriate
effective bar background accordingly.


If the app targets
`https://developer.android.com/reference/android/os/Build.VERSION_CODES#VANILLA_ICE_CREAM` or above,
the color will be transparent and cannot be changed.

<br />

| Parameters ||
|---|---|
| `color` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setNavigationBarContrastEnforced(boolean)`

### setStatusBarContrastEnforced

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

```
public void setStatusBarContrastEnforced (boolean ensureContrast)
```


**This method was deprecated
in API level 35.**   

Draw proper background behind `https://developer.android.com/reference/android/view/WindowInsets.Type#statusBars()`} instead.

Sets whether the system should ensure that the status bar has enough
contrast when a fully transparent background is requested.

If set to this value, the system will determine whether a scrim is necessary
to ensure that the status bar has enough contrast with the contents of
this app, and set an appropriate effective bar background color accordingly.

When the status bar color has a non-zero alpha value, the value of this
property has no effect.

<br />

| Parameters ||
|---|---|
| `ensureContrast` | `boolean` <br /> |

**See also:**

- `https://developer.android.com/reference/android/R.attr#enforceStatusBarContrast`
- `https://developer.android.com/reference/android/view/Window#isStatusBarContrastEnforced()`
- `https://developer.android.com/reference/android/view/Window#setStatusBarColor(int)`

### setSustainedPerformanceMode

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

```
public void setSustainedPerformanceMode (boolean enable)
```

Sets the Sustained Performance requirement for the calling window.

<br />

| Parameters ||
|---|---|
| `enable` | `boolean`: disables or enables the mode. <br /> |

### setSystemGestureExclusionRects

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

```
public void setSystemGestureExclusionRects (List<Rect> rects)
```

Sets a list of areas within this window's coordinate space where the system should not
intercept touch or other pointing device gestures.

This method should be used by apps that make use of
`https://developer.android.com/reference/android/view/Window#takeSurface(android.view.SurfaceHolder.Callback2)` and do not have a view hierarchy available.
Apps that do have a view hierarchy should use
`https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)` instead. This method does not modify or
replace the gesture exclusion rects populated by individual views in this window's view
hierarchy using `https://developer.android.com/reference/android/view/View#setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>)`.

Use this to tell the system which specific sub-areas of a view need to receive gesture
input in order to function correctly in the presence of global system gestures that may
conflict. For example, if the system wishes to capture swipe-in-from-screen-edge gestures
to provide system-level navigation functionality, a view such as a navigation drawer
container can mark the left (or starting) edge of itself as requiring gesture capture
priority using this API. The system may then choose to relax its own gesture recognition
to allow the app to consume the user's gesture. It is not necessary for an app to register
exclusion rects for broadly spanning regions such as the entirety of a
`ScrollView` or for simple press and release click targets such as
`Button`. Mark an exclusion rect when interacting with a view requires
a precision touch gesture in a small area in either the X or Y dimension, such as
an edge swipe or dragging a `SeekBar` thumb.

Do not modify the provided list after this method is called.

<br />

<br />

| Parameters ||
|---|---|
| `rects` | `List`: A list of precision gesture regions that this window needs to function correctly. This value cannot be `null`. <br /> |

### setTitle

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

```
public abstract void setTitle (CharSequence title)
```

Sets a user-facing title for the window.


This title may be shown to the user in the window's title or action bar
if the `https://developer.android.com/reference/android/view/Window#requestFeature(int)` provide such a bar.
It is also exposed through `https://developer.android.com/reference/android/view/accessibility/AccessibilityWindowInfo#getTitle()`.

<br />

| Parameters ||
|---|---|
| `title` | `CharSequence` <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#setTitle(java.lang.CharSequence)`

### setTitleColor

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

```
public abstract void setTitleColor (int textColor)
```

<br />

<br />

| Parameters ||
|---|---|
| `textColor` | `int` <br /> |

### setTransitionBackgroundFadeDuration

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

```
public void setTransitionBackgroundFadeDuration (long fadeDurationMillis)
```

Sets the duration, in milliseconds, of the window background fade
when transitioning into or away from an Activity when called with an Activity Transition.

When executing the enter transition, the background starts transparent
and fades in. This requires `https://developer.android.com/reference/android/view/Window#FEATURE_ACTIVITY_TRANSITIONS`. The default is
300 milliseconds.

<br />

<br />

**Related XML Attributes:**

- [android:windowTransitionBackgroundFadeDuration](https://developer.android.com/reference/android/view/Window#attr_android:windowTransitionBackgroundFadeDuration)

| Parameters ||
|---|---|
| `fadeDurationMillis` | `long`: The duration of the window background fade to or from opaque during enter transition. <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setEnterTransition(android.transition.Transition)`

### setTransitionManager

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

```
public void setTransitionManager (TransitionManager tm)
```

Set the `https://developer.android.com/reference/android/transition/TransitionManager` to use for default transitions in this window.
Requires `https://developer.android.com/reference/android/view/Window#FEATURE_CONTENT_TRANSITIONS`.

<br />

**Related XML Attributes:**

- [android:windowContentTransitionManager](https://developer.android.com/reference/android/view/Window#attr_android:windowContentTransitionManager)

| Parameters ||
|---|---|
| `tm` | `TransitionManager`: The TransitionManager to use for scene changes. <br /> |

### setType

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

```
public void setType (int type)
```

Set the type of the window, as per the WindowManager.LayoutParams
types.

<br />

| Parameters ||
|---|---|
| `type` | `int`: The new window type (see WindowManager.LayoutParams). <br /> |

### setUiOptions

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

```
public void setUiOptions (int uiOptions)
```

Set extra options that will influence the UI for this window.

<br />

| Parameters ||
|---|---|
| `uiOptions` | `int`: Flags specifying extra options for this window. <br /> |

### setUiOptions

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

```
public void setUiOptions (int uiOptions, 
                int mask)
```

Set extra options that will influence the UI for this window.
Only the bits filtered by mask will be modified.

<br />

| Parameters ||
|---|---|
| `uiOptions` | `int`: Flags specifying extra options for this window. <br /> |
| `mask` | `int`: Flags specifying which options should be modified. Others will remain unchanged. <br /> |

### setVolumeControlStream

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

```
public abstract void setVolumeControlStream (int streamType)
```

<br />

<br />

| Parameters ||
|---|---|
| `streamType` | `int` <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/Activity#setVolumeControlStream(int)`

### setWindowAnimations

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

```
public void setWindowAnimations (int resId)
```

Specify custom animations to use for the window, as per
`https://developer.android.com/reference/android/view/WindowManager.LayoutParams#windowAnimations`. Providing anything besides
0 here will override the animations the window would
normally retrieve from its theme.

<br />

| Parameters ||
|---|---|
| `resId` | `int` <br /> |

### setWindowManager

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

```
public void setWindowManager (WindowManager wm, 
                IBinder appToken, 
                String appName)
```

Creates and sets the window manager for use by this Window to, for example,
display panels. This is *not* used for displaying the
Window itself -- that must be done by the client.


If `wm` is not `null`, this method will creates a new instance of
`https://developer.android.com/reference/android/view/WindowManager` with this window attached based on `wm`, or, otherwise,
based on `https://developer.android.com/reference/android/view/WindowManager` obtained from `https://developer.android.com/reference/android/view/Window#getContext()`.

<br />

| Parameters ||
|---|---|
| `wm` | `WindowManager`: the window manager for adding new windows. <br /> |
| `appToken` | `IBinder`: the token of the window, which applies to the `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#token` of `https://developer.android.com/reference/android/view/Window#getAttributes()` if specified. <br /> |
| `appName` | `String`: the name of the window, which applies to the `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#getTitle()` of `https://developer.android.com/reference/android/view/Window#getAttributes()` if specified. <br /> |

### setWindowManager

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

```
public void setWindowManager (WindowManager wm, 
                IBinder appToken, 
                String appName, 
                boolean hardwareAccelerated)
```

Creates and sets the window manager for use by this Window to, for example,
display panels. This is *not* used for displaying the
Window itself -- that must be done by the client.


If `wm` is not `null`, this method will creates a new instance of
`https://developer.android.com/reference/android/view/WindowManager` with this window attached based on `wm`, or, otherwise,
based on `https://developer.android.com/reference/android/view/WindowManager` obtained from `https://developer.android.com/reference/android/view/Window#getContext()`.

<br />

| Parameters ||
|---|---|
| `wm` | `WindowManager`: the window manager for adding new windows. <br /> |
| `appToken` | `IBinder`: the token of the window, which applies to the `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#token` of `https://developer.android.com/reference/android/view/Window#getAttributes()` if specified. <br /> |
| `appName` | `String`: the name of the window, which applies to the `https://developer.android.com/reference/android/view/WindowManager.LayoutParams#getTitle()` of `https://developer.android.com/reference/android/view/Window#getAttributes()` if specified. <br /> |
| `hardwareAccelerated` | `boolean`: indicate whether this window or its sub-windows should be hardware accelerated, which is default to `false`. <br /> |

### superDispatchGenericMotionEvent

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

```
public abstract boolean superDispatchGenericMotionEvent (MotionEvent event)
```

Used by custom windows, such as Dialog, to pass the generic motion event
further down the view hierarchy. Application developers should
not need to implement or call this.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### superDispatchKeyEvent

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

```
public abstract boolean superDispatchKeyEvent (KeyEvent event)
```

Used by custom windows, such as Dialog, to pass the key press event
further down the view hierarchy. Application developers should
not need to implement or call this.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### superDispatchKeyShortcutEvent

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

```
public abstract boolean superDispatchKeyShortcutEvent (KeyEvent event)
```

Used by custom windows, such as Dialog, to pass the key shortcut press event
further down the view hierarchy. Application developers should
not need to implement or call this.

<br />

| Parameters ||
|---|---|
| `event` | `KeyEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### superDispatchTouchEvent

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

```
public abstract boolean superDispatchTouchEvent (MotionEvent event)
```

Used by custom windows, such as Dialog, to pass the touch screen event
further down the view hierarchy. Application developers should
not need to implement or call this.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### superDispatchTrackballEvent

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

```
public abstract boolean superDispatchTrackballEvent (MotionEvent event)
```

Used by custom windows, such as Dialog, to pass the trackball event
further down the view hierarchy. Application developers should
not need to implement or call this.

<br />

| Parameters ||
|---|---|
| `event` | `MotionEvent` <br /> |

| Returns ||
|---|---|
| `boolean` | <br /> |

### takeInputQueue

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

```
public abstract void takeInputQueue (InputQueue.Callback callback)
```

Take ownership of this window's InputQueue. The window will no
longer read and dispatch input events from the queue; it is your
responsibility to do so.

<br />

| Parameters ||
|---|---|
| `callback` | `InputQueue.Callback` <br /> |

### takeKeyEvents

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

```
public abstract void takeKeyEvents (boolean get)
```

Request that key events come to this activity. Use this if your
activity has no views with focus, but the activity still wants
a chance to process key events.

<br />

| Parameters ||
|---|---|
| `get` | `boolean` <br /> |

### takeSurface

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

```
public abstract void takeSurface (SurfaceHolder.Callback2 callback)
```

Take ownership of this window's surface. The window's view hierarchy
will no longer draw into the surface, though it will otherwise continue
to operate (such as for receiving input events). The given SurfaceHolder
callback will be used to tell you about state changes to the surface.

<br />

| Parameters ||
|---|---|
| `callback` | `SurfaceHolder.Callback2` <br /> |

### togglePanel

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

```
public abstract void togglePanel (int featureId, 
                KeyEvent event)
```

<br />

<br />

| Parameters ||
|---|---|
| `featureId` | `int` <br /> |
| `event` | `KeyEvent` <br /> |

### unregisterScrollCaptureCallback

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

```
public void unregisterScrollCaptureCallback (ScrollCaptureCallback callback)
```

Unregisters a `https://developer.android.com/reference/android/view/ScrollCaptureCallback` previously registered with this window.

<br />

| Parameters ||
|---|---|
| `callback` | `ScrollCaptureCallback`: the callback to remove. This value cannot be `null`. <br /> |

## Protected methods

### getFeatures

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

```
protected final int getFeatures ()
```

Return the feature bits that are enabled. This is the set of features
that were given to requestFeature(), and are being handled by this
Window itself or its container. That is, it is the set of
requested features that you can actually use.

To do: add a public version of this API that allows you to check for
features by their feature ID.

<br />

| Returns ||
|---|---|
| `int` | int The feature bits. <br /> |

### getForcedWindowFlags

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

```
protected final int getForcedWindowFlags ()
```

Return the window flags that have been explicitly set by the client,
so will not be modified by `https://developer.android.com/reference/android/view/Window#getDecorView()`.

<br />

| Returns ||
|---|---|
| `int` | <br /> |

### getLocalFeatures

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

```
protected final int getLocalFeatures ()
```

Return the feature bits that are being implemented by this Window.
This is the set of features that were given to requestFeature(), and are
being handled by only this Window itself, not by its containers.

<br />

| Returns ||
|---|---|
| `int` | int The feature bits. <br /> |

### hasSoftInputMode

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

```
protected final boolean hasSoftInputMode ()
```

Has the app specified their own soft input mode?

<br />

| Returns ||
|---|---|
| `boolean` | <br /> |

### onActive

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

```
protected abstract void onActive ()
```

<br />

<br />

### setDefaultWindowFormat

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

```
protected void setDefaultWindowFormat (int format)
```

Set the default format of window, as per the PixelFormat types. This
is the format that will be used unless the client specifies in explicit
format with setFormat();

<br />

| Parameters ||
|---|---|
| `format` | `int`: The new window format (see PixelFormat). <br /> |

**See also:**

- `https://developer.android.com/reference/android/view/Window#setFormat(int)`
- `https://developer.android.com/reference/android/graphics/PixelFormat`