Most visited

Recently visited

Added in API level 1

WindowManager.LayoutParams

public static class WindowManager.LayoutParams
extends ViewGroup.LayoutParams implements Parcelable

java.lang.Object
   ↳ android.view.ViewGroup.LayoutParams
     ↳ android.view.WindowManager.LayoutParams


Summary

Inherited XML attributes

From class android.view.ViewGroup.LayoutParams

Constants

int ALPHA_CHANGED

int ANIMATION_CHANGED

float BRIGHTNESS_OVERRIDE_FULL

Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the hightest value when this window is in front.

float BRIGHTNESS_OVERRIDE_NONE

Default value for screenBrightness and buttonBrightness indicating that the brightness value is not overridden for this window and normal brightness policy should be used.

float BRIGHTNESS_OVERRIDE_OFF

Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the lowest value when this window is in front.

int DIM_AMOUNT_CHANGED

int FIRST_APPLICATION_WINDOW

Start of window types that represent normal application windows.

int FIRST_SUB_WINDOW

Start of types of sub-windows.

int FIRST_SYSTEM_WINDOW

Start of system-specific window types.

int FLAGS_CHANGED

int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON

Window flag: as long as this window is visible to the user, allow the lock screen to activate while the screen is on.

int FLAG_ALT_FOCUSABLE_IM

Window flag: invert the state of FLAG_NOT_FOCUSABLE with respect to how this window interacts with the current method.

int FLAG_BLUR_BEHIND

This constant was deprecated in API level 14. Blurring is no longer supported.

int FLAG_DIM_BEHIND

Window flag: everything behind this window will be dimmed.

int FLAG_DISMISS_KEYGUARD

Window flag: when set the window will cause the keyguard to be dismissed, only if it is not a secure lock keyguard.

int FLAG_DITHER

This constant was deprecated in API level 17. This flag is no longer used.

int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS

Flag indicating that this Window is responsible for drawing the background for the system bars.

int FLAG_FORCE_NOT_FULLSCREEN

Window flag: override FLAG_FULLSCREEN and force the screen decorations (such as the status bar) to be shown.

int FLAG_FULLSCREEN

Window flag: hide all screen decorations (such as the status bar) while this window is displayed.

int FLAG_HARDWARE_ACCELERATED

Indicates whether this window should be hardware accelerated.

int FLAG_IGNORE_CHEEK_PRESSES

Window flag: intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a CANCEL motion event to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released.

int FLAG_KEEP_SCREEN_ON

Window flag: as long as this window is visible to the user, keep the device's screen turned on and bright.

int FLAG_LAYOUT_ATTACHED_IN_DECOR

Window flag: When requesting layout with an attached window, the attached window may overlap with the screen decorations of the parent window such as the navigation bar.

int FLAG_LAYOUT_INSET_DECOR

Window flag: a special option only for use in combination with FLAG_LAYOUT_IN_SCREEN.

int FLAG_LAYOUT_IN_OVERSCAN

Window flag: allow window contents to extend in to the screen's overscan area, if there is one.

int FLAG_LAYOUT_IN_SCREEN

Window flag: place the window within the entire screen, ignoring decorations around the border (such as the status bar).

int FLAG_LAYOUT_NO_LIMITS

Window flag: allow window to extend outside of the screen.

int FLAG_LOCAL_FOCUS_MODE

Flag for a window in local focus mode.

int FLAG_NOT_FOCUSABLE

Window flag: this window won't ever get key input focus, so the user can not send key or other button events to it.

int FLAG_NOT_TOUCHABLE

Window flag: this window can never receive touch events.

int FLAG_NOT_TOUCH_MODAL

Window flag: even when this window is focusable (its FLAG_NOT_FOCUSABLE is not set), allow any pointer events outside of the window to be sent to the windows behind it.

int FLAG_SCALED

Window flag: a special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen.

int FLAG_SECURE

Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

int FLAG_SHOW_WALLPAPER

Window flag: ask that the system wallpaper be shown behind your window.

int FLAG_SHOW_WHEN_LOCKED

Window flag: special flag to let windows be shown when the screen is locked.

int FLAG_SPLIT_TOUCH

Window flag: when set the window will accept for touch events outside of its bounds to be sent to other windows that also support split touch.

int FLAG_TOUCHABLE_WHEN_WAKING

This constant was deprecated in API level 20. This flag has no effect.

int FLAG_TRANSLUCENT_NAVIGATION

Window flag: request a translucent navigation bar with minimal system-provided background protection.

int FLAG_TRANSLUCENT_STATUS

Window flag: request a translucent status bar with minimal system-provided background protection.

int FLAG_TURN_SCREEN_ON

Window flag: when set as a window is being added or made visible, once the window has been shown then the system will poke the power manager's user activity (as if the user had woken up the device) to turn the screen on.

int FLAG_WATCH_OUTSIDE_TOUCH

Window flag: if you have set FLAG_NOT_TOUCH_MODAL, you can set this flag to receive a single special MotionEvent with the action MotionEvent.ACTION_OUTSIDE for touches that occur outside of your window.

int FORMAT_CHANGED

int LAST_APPLICATION_WINDOW

End of types of application windows.

int LAST_SUB_WINDOW

End of types of sub-windows.

int LAST_SYSTEM_WINDOW

End of types of system windows.

int LAYOUT_CHANGED

int MEMORY_TYPE_CHANGED

int MEMORY_TYPE_GPU

This constant was deprecated in API level 5. this is ignored, this value is set automatically when needed.

int MEMORY_TYPE_HARDWARE

This constant was deprecated in API level 5. this is ignored, this value is set automatically when needed.

int MEMORY_TYPE_NORMAL

This constant was deprecated in API level 11. this is ignored, this value is set automatically when needed.

int MEMORY_TYPE_PUSH_BUFFERS

This constant was deprecated in API level 11. this is ignored, this value is set automatically when needed.

int ROTATION_ANIMATION_CHANGED

int ROTATION_ANIMATION_CROSSFADE

Value for rotationAnimation to define the animation used to specify that this window will fade in or out following a rotation.

int ROTATION_ANIMATION_JUMPCUT

Value for rotationAnimation to define the animation used to specify that this window will immediately disappear or appear following a rotation.

int ROTATION_ANIMATION_ROTATE

Value for rotationAnimation to define the animation used to specify that this window will rotate in or out following a rotation.

int SCREEN_BRIGHTNESS_CHANGED

int SCREEN_ORIENTATION_CHANGED

int SOFT_INPUT_ADJUST_NOTHING

Adjustment option for softInputMode: set to have a window not adjust for a shown input method.

int SOFT_INPUT_ADJUST_PAN

Adjustment option for softInputMode: set to have a window pan when an input method is shown, so it doesn't need to deal with resizing but just panned by the framework to ensure the current input focus is visible.

int SOFT_INPUT_ADJUST_RESIZE

Adjustment option for softInputMode: set to allow the window to be resized when an input method is shown, so that its contents are not covered by the input method.

int SOFT_INPUT_ADJUST_UNSPECIFIED

Adjustment option for softInputMode: nothing specified.

int SOFT_INPUT_IS_FORWARD_NAVIGATION

Bit for softInputMode: set when the user has navigated forward to the window.

int SOFT_INPUT_MASK_ADJUST

Mask for softInputMode of the bits that determine the way that the window should be adjusted to accommodate the soft input window.

int SOFT_INPUT_MASK_STATE

Mask for softInputMode of the bits that determine the desired visibility state of the soft input area for this window.

int SOFT_INPUT_MODE_CHANGED

int SOFT_INPUT_STATE_ALWAYS_HIDDEN

Visibility state for softInputMode: please always hide any soft input area when this window receives focus.

int SOFT_INPUT_STATE_ALWAYS_VISIBLE

Visibility state for softInputMode: please always make the soft input area visible when this window receives input focus.

int SOFT_INPUT_STATE_HIDDEN

Visibility state for softInputMode: please hide any soft input area when normally appropriate (when the user is navigating forward to your window).

int SOFT_INPUT_STATE_UNCHANGED

Visibility state for softInputMode: please don't change the state of the soft input area.

int SOFT_INPUT_STATE_UNSPECIFIED

Visibility state for softInputMode: no state has been specified.

int SOFT_INPUT_STATE_VISIBLE

Visibility state for softInputMode: please show the soft input area when normally appropriate (when the user is navigating forward to your window).

int TITLE_CHANGED

int TYPE_ACCESSIBILITY_OVERLAY

Window type: Windows that are overlaid only by a connected AccessibilityService for interception of user interactions without changing the windows an accessibility service can introspect.

int TYPE_APPLICATION

Window type: a normal application window.

int TYPE_APPLICATION_ATTACHED_DIALOG

Window type: like TYPE_APPLICATION_PANEL, but layout of the window happens as that of a top-level window, not as a child of its container.

int TYPE_APPLICATION_MEDIA

Window type: window for showing media (such as video).

int TYPE_APPLICATION_PANEL

Window type: a panel on top of an application window.

int TYPE_APPLICATION_STARTING

Window type: special application window that is displayed while the application is starting.

int TYPE_APPLICATION_SUB_PANEL

Window type: a sub-panel on top of an application window.

int TYPE_BASE_APPLICATION

Window type: an application window that serves as the "base" window of the overall application; all other application windows will appear on top of it.

int TYPE_CHANGED

int TYPE_INPUT_METHOD

Window type: internal input methods windows, which appear above the normal UI.

int TYPE_INPUT_METHOD_DIALOG

Window type: internal input methods dialog windows, which appear above the current input method window.

int TYPE_KEYGUARD_DIALOG

Window type: dialogs that the keyguard shows In multiuser systems shows on all users' windows.

int TYPE_PHONE

Window type: phone.

int TYPE_PRIORITY_PHONE

Window type: priority phone UI, which needs to be displayed even if the keyguard is active.

int TYPE_PRIVATE_PRESENTATION

Window type: Window for Presentation on top of private virtual display.

int TYPE_SEARCH_BAR

Window type: the search bar.

int TYPE_STATUS_BAR

Window type: the status bar.

int TYPE_STATUS_BAR_PANEL

Window type: panel that slides out from over the status bar In multiuser systems shows on all users' windows.

int TYPE_SYSTEM_ALERT

Window type: system window, such as low power alert.

int TYPE_SYSTEM_DIALOG

Window type: panel that slides out from the status bar In multiuser systems shows on all users' windows.

int TYPE_SYSTEM_ERROR

Window type: internal system error windows, appear on top of everything they can.

int TYPE_SYSTEM_OVERLAY

Window type: system overlay windows, which need to be displayed on top of everything else.

int TYPE_TOAST

Window type: transient notifications.

int TYPE_WALLPAPER

Window type: wallpaper window, placed behind any window that wants to sit on top of the wallpaper.

Inherited constants

From class android.view.ViewGroup.LayoutParams
From interface android.os.Parcelable

Fields

public static final Creator<WindowManager.LayoutParams> CREATOR

public float alpha

An alpha value to apply to this entire window.

public float buttonBrightness

This can be used to override the standard behavior of the button and keyboard backlights.

public float dimAmount

When FLAG_DIM_BEHIND is set, this is the amount of dimming to apply.

public int flags

Various behavioral options/flags.

public int format

The desired bitmap format.

public int gravity

Placement of window within the screen as per Gravity.

public float horizontalMargin

The horizontal margin, as a percentage of the container's width, between the container and the widget.

public float horizontalWeight

Indicates how much of the extra space will be allocated horizontally to the view associated with these LayoutParams.

public int memoryType

This field was deprecated in API level 11. this is ignored

public String packageName

Name of the package owning this window.

public int preferredDisplayModeId

Id of the preferred display mode for the window.

public float preferredRefreshRate

This field was deprecated in API level 23. use preferredDisplayModeId instead

public int rotationAnimation

Define the exit and entry animations used on this window when the device is rotated.

public float screenBrightness

This can be used to override the user's preferred brightness of the screen.

public int screenOrientation

Specific orientation value for a window.

public int softInputMode

Desired operating mode for any soft input area.

public int systemUiVisibility

Control the visibility of the status bar.

public IBinder token

Identifier for this window.

public int type

The general type of window.

public float verticalMargin

The vertical margin, as a percentage of the container's height, between the container and the widget.

public float verticalWeight

Indicates how much of the extra space will be allocated vertically to the view associated with these LayoutParams.

public int windowAnimations

A style resource defining the animations to use for this window.

public int x

X position for this window.

public int y

Y position for this window.

Inherited fields

From class android.view.ViewGroup.LayoutParams

Public constructors

WindowManager.LayoutParams()
WindowManager.LayoutParams(int _type)
WindowManager.LayoutParams(int _type, int _flags)
WindowManager.LayoutParams(int _type, int _flags, int _format)
WindowManager.LayoutParams(int w, int h, int _type, int _flags, int _format)
WindowManager.LayoutParams(int w, int h, int xpos, int ypos, int _type, int _flags, int _format)
WindowManager.LayoutParams(Parcel in)

Public methods

final int copyFrom(WindowManager.LayoutParams o)
String debug(String output)

Returns a String representation of this set of layout parameters.

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

final CharSequence getTitle()
static boolean mayUseInputMethod(int flags)

Given a particular set of window manager flags, determine whether such a window may be a target for an input method when it has focus.

final void setTitle(CharSequence title)
String toString()

Returns a string representation of the object.

void writeToParcel(Parcel out, int parcelableFlags)

Flatten this object in to a Parcel.

Inherited methods

From class android.view.ViewGroup.LayoutParams
From class java.lang.Object
From interface android.os.Parcelable

Constants

ALPHA_CHANGED

Added in API level 1
int ALPHA_CHANGED

Constant Value: 128 (0x00000080)

ANIMATION_CHANGED

Added in API level 1
int ANIMATION_CHANGED

Constant Value: 16 (0x00000010)

BRIGHTNESS_OVERRIDE_FULL

Added in API level 8
float BRIGHTNESS_OVERRIDE_FULL

Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the hightest value when this window is in front.

Constant Value: 1.0

BRIGHTNESS_OVERRIDE_NONE

Added in API level 8
float BRIGHTNESS_OVERRIDE_NONE

Default value for screenBrightness and buttonBrightness indicating that the brightness value is not overridden for this window and normal brightness policy should be used.

Constant Value: -1.0

BRIGHTNESS_OVERRIDE_OFF

Added in API level 8
float BRIGHTNESS_OVERRIDE_OFF

Value for screenBrightness and buttonBrightness indicating that the screen or button backlight brightness should be set to the lowest value when this window is in front.

Constant Value: 0.0

DIM_AMOUNT_CHANGED

Added in API level 1
int DIM_AMOUNT_CHANGED

Constant Value: 32 (0x00000020)

FIRST_APPLICATION_WINDOW

Added in API level 1
int FIRST_APPLICATION_WINDOW

Start of window types that represent normal application windows.

Constant Value: 1 (0x00000001)

FIRST_SUB_WINDOW

Added in API level 1
int FIRST_SUB_WINDOW

Start of types of sub-windows. The token of these windows must be set to the window they are attached to. These types of windows are kept next to their attached window in Z-order, and their coordinate space is relative to their attached window.

Constant Value: 1000 (0x000003e8)

FIRST_SYSTEM_WINDOW

Added in API level 1
int FIRST_SYSTEM_WINDOW

Start of system-specific window types. These are not normally created by applications.

Constant Value: 2000 (0x000007d0)

FLAGS_CHANGED

Added in API level 1
int FLAGS_CHANGED

Constant Value: 4 (0x00000004)

FLAG_ALLOW_LOCK_WHILE_SCREEN_ON

Added in API level 8
int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON

Window flag: as long as this window is visible to the user, allow the lock screen to activate while the screen is on. This can be used independently, or in combination with FLAG_KEEP_SCREEN_ON and/or FLAG_SHOW_WHEN_LOCKED

Constant Value: 1 (0x00000001)

FLAG_ALT_FOCUSABLE_IM

Added in API level 3
int FLAG_ALT_FOCUSABLE_IM

Window flag: invert the state of FLAG_NOT_FOCUSABLE with respect to how this window interacts with the current method. That is, if FLAG_NOT_FOCUSABLE is set and this flag is set, then the window will behave as if it needs to interact with the input method and thus be placed behind/away from it; if FLAG_NOT_FOCUSABLE is not set and this flag is set, then the window will behave as if it doesn't need to interact with the input method and can be placed to use more space and cover the input method.

Constant Value: 131072 (0x00020000)

FLAG_BLUR_BEHIND

Added in API level 1
int FLAG_BLUR_BEHIND

This constant was deprecated in API level 14.
Blurring is no longer supported.

Window flag: blur everything behind this window.

Constant Value: 4 (0x00000004)

FLAG_DIM_BEHIND

Added in API level 1
int FLAG_DIM_BEHIND

Window flag: everything behind this window will be dimmed. Use dimAmount to control the amount of dim.

Constant Value: 2 (0x00000002)

FLAG_DISMISS_KEYGUARD

Added in API level 5
int FLAG_DISMISS_KEYGUARD

Window flag: when set the window will cause the keyguard to be dismissed, only if it is not a secure lock keyguard. Because such a keyguard is not needed for security, it will never re-appear if the user navigates to another window (in contrast to FLAG_SHOW_WHEN_LOCKED, which will only temporarily hide both secure and non-secure keyguards but ensure they reappear when the user moves to another UI that doesn't hide them). If the keyguard is currently active and is secure (requires an unlock pattern) than the user will still need to confirm it before seeing this window, unless FLAG_SHOW_WHEN_LOCKED has also been set.

Constant Value: 4194304 (0x00400000)

FLAG_DITHER

Added in API level 1
int FLAG_DITHER

This constant was deprecated in API level 17.
This flag is no longer used.

Window flag: turn on dithering when compositing this window to the screen.

Constant Value: 4096 (0x00001000)

FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS

Added in API level 21
int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS

Flag indicating that this Window is responsible for drawing the background for the system bars. If set, the system bars are drawn with a transparent background and the corresponding areas in this window are filled with the colors specified in getStatusBarColor() and getNavigationBarColor().

Constant Value: -2147483648 (0x80000000)

FLAG_FORCE_NOT_FULLSCREEN

Added in API level 1
int FLAG_FORCE_NOT_FULLSCREEN

Window flag: override FLAG_FULLSCREEN and force the screen decorations (such as the status bar) to be shown.

Constant Value: 2048 (0x00000800)

FLAG_FULLSCREEN

Added in API level 1
int FLAG_FULLSCREEN

Window flag: hide all screen decorations (such as the status bar) while this window is displayed. This allows the window to use the entire display space for itself -- the status bar will be hidden when an app window with this flag set is on the top layer. A fullscreen window will ignore a value of SOFT_INPUT_ADJUST_RESIZE for the window's softInputMode field; the window will stay fullscreen and will not resize.

This flag can be controlled in your theme through the windowFullscreen attribute; this attribute is automatically set for you in the standard fullscreen themes such as Theme_NoTitleBar_Fullscreen, Theme_Black_NoTitleBar_Fullscreen, Theme_Light_NoTitleBar_Fullscreen, Theme_Holo_NoActionBar_Fullscreen, Theme_Holo_Light_NoActionBar_Fullscreen, Theme_DeviceDefault_NoActionBar_Fullscreen, and Theme_DeviceDefault_Light_NoActionBar_Fullscreen.

Constant Value: 1024 (0x00000400)

FLAG_HARDWARE_ACCELERATED

Added in API level 11
int FLAG_HARDWARE_ACCELERATED

Indicates whether this window should be hardware accelerated. Requesting hardware acceleration does not guarantee it will happen.

This flag can be controlled programmatically only to enable hardware acceleration. To enable hardware acceleration for a given window programmatically, do the following:

 Window w = activity.getWindow(); // in Activity's onCreate() for instance
 w.setFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
         WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
 

It is important to remember that this flag must be set before setting the content view of your activity or dialog.

This flag cannot be used to disable hardware acceleration after it was enabled in your manifest using hardwareAccelerated. If you need to selectively and programmatically disable hardware acceleration (for automated testing for instance), make sure it is turned off in your manifest and enable it on your activity or dialog when you need it instead, using the method described above.

This flag is automatically set by the system if the android:hardwareAccelerated XML attribute is set to true on an activity or on the application.

Constant Value: 16777216 (0x01000000)

FLAG_IGNORE_CHEEK_PRESSES

Added in API level 1
int FLAG_IGNORE_CHEEK_PRESSES

Window flag: intended for windows that will often be used when the user is holding the screen against their face, it will aggressively filter the event stream to prevent unintended presses in this situation that may not be desired for a particular window, when such an event stream is detected, the application will receive a CANCEL motion event to indicate this so applications can handle this accordingly by taking no action on the event until the finger is released.

Constant Value: 32768 (0x00008000)

FLAG_KEEP_SCREEN_ON

Added in API level 1
int FLAG_KEEP_SCREEN_ON

Window flag: as long as this window is visible to the user, keep the device's screen turned on and bright.

Constant Value: 128 (0x00000080)

FLAG_LAYOUT_ATTACHED_IN_DECOR

Added in API level 22
int FLAG_LAYOUT_ATTACHED_IN_DECOR

Window flag: When requesting layout with an attached window, the attached window may overlap with the screen decorations of the parent window such as the navigation bar. By including this flag, the window manager will layout the attached window within the decor frame of the parent window such that it doesn't overlap with screen decorations.

Constant Value: 1073741824 (0x40000000)

FLAG_LAYOUT_INSET_DECOR

Added in API level 1
int FLAG_LAYOUT_INSET_DECOR

Window flag: a special option only for use in combination with FLAG_LAYOUT_IN_SCREEN. When requesting layout in the screen your window may appear on top of or behind screen decorations such as the status bar. By also including this flag, the window manager will report the inset rectangle needed to ensure your content is not covered by screen decorations. This flag is normally set for you by Window as described in setFlags(int, int).

Constant Value: 65536 (0x00010000)

FLAG_LAYOUT_IN_OVERSCAN

Added in API level 18
int FLAG_LAYOUT_IN_OVERSCAN

Window flag: allow window contents to extend in to the screen's overscan area, if there is one. The window should still correctly position its contents to take the overscan area into account.

This flag can be controlled in your theme through the windowOverscan attribute; this attribute is automatically set for you in the standard overscan themes such as Theme_Holo_NoActionBar_Overscan, Theme_Holo_Light_NoActionBar_Overscan, Theme_DeviceDefault_NoActionBar_Overscan, and Theme_DeviceDefault_Light_NoActionBar_Overscan.

When this flag is enabled for a window, its normal content may be obscured to some degree by the overscan region of the display. To ensure key parts of that content are visible to the user, you can use View.setFitsSystemWindows(boolean) to set the point in the view hierarchy where the appropriate offsets should be applied. (This can be done either by directly calling this function, using the fitsSystemWindows attribute in your view hierarchy, or implementing you own View.fitSystemWindows(Rect) method).

This mechanism for positioning content elements is identical to its equivalent use with layout and View.setSystemUiVisibility(int); here is an example layout that will correctly position its UI elements with this overscan flag is set:

<!-- This layout is designed for use with FLAG_LAYOUT_IN_OVERSCAN, so its window will
     be placed into the overscan region of the display (if there is one).  Thus the contents
     of the top-level view may be obscured around the edges by the display, leaving the
     edge of the box background used here invisible. -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/box_white">

    <!-- This is still in the same position as the top-level FrameLayout, so the contentx
        of this TextView may also be obscured. -->
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="3dp"
        android:layout_marginLeft="3dp"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="Overscan" />

    <!-- This FrameLayout uses android:fitsSystemWindows to have its padding adjusted so
         that within that space its content is offset to not be obscured by the overscan
         region (or also system decors that are covering its UI. -->
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <!-- Now that we are within the padding region of the parent FrameLayout, we can
             safely place content that will be visible to the user. -->
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:src="@drawable/frantic"
            android:scaleType="fitXY" />
        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/box_white" />
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="3dp"
            android:layout_marginLeft="3dp"
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:text="Content" />

    </FrameLayout>

</FrameLayout>

Constant Value: 33554432 (0x02000000)

FLAG_LAYOUT_IN_SCREEN

Added in API level 1
int FLAG_LAYOUT_IN_SCREEN

Window flag: place the window within the entire screen, ignoring decorations around the border (such as the status bar). The window must correctly position its contents to take the screen decoration into account. This flag is normally set for you by Window as described in setFlags(int, int).

Constant Value: 256 (0x00000100)

FLAG_LAYOUT_NO_LIMITS

Added in API level 1
int FLAG_LAYOUT_NO_LIMITS

Window flag: allow window to extend outside of the screen.

Constant Value: 512 (0x00000200)

FLAG_LOCAL_FOCUS_MODE

Added in API level 19
int FLAG_LOCAL_FOCUS_MODE

Flag for a window in local focus mode. Window in local focus mode can control focus independent of window manager using setLocalFocus(boolean, boolean). Usually window in this mode will not get touch/key events from window manager, but will get events only via local injection using injectInputEvent(InputEvent).

Constant Value: 268435456 (0x10000000)

FLAG_NOT_FOCUSABLE

Added in API level 1
int FLAG_NOT_FOCUSABLE

Window flag: this window won't ever get key input focus, so the user can not send key or other button events to it. Those will instead go to whatever focusable window is behind it. This flag will also enable FLAG_NOT_TOUCH_MODAL whether or not that is explicitly set.

Setting this flag also implies that the window will not need to interact with a soft input method, so it will be Z-ordered and positioned independently of any active input method (typically this means it gets Z-ordered on top of the input method, so it can use the full screen for its content and cover the input method if needed. You can use FLAG_ALT_FOCUSABLE_IM to modify this behavior.

Constant Value: 8 (0x00000008)

FLAG_NOT_TOUCHABLE

Added in API level 1
int FLAG_NOT_TOUCHABLE

Window flag: this window can never receive touch events.

Constant Value: 16 (0x00000010)

FLAG_NOT_TOUCH_MODAL

Added in API level 1
int FLAG_NOT_TOUCH_MODAL

Window flag: even when this window is focusable (its FLAG_NOT_FOCUSABLE is not set), allow any pointer events outside of the window to be sent to the windows behind it. Otherwise it will consume all pointer events itself, regardless of whether they are inside of the window.

Constant Value: 32 (0x00000020)

FLAG_SCALED

Added in API level 1
int FLAG_SCALED

Window flag: a special mode where the layout parameters are used to perform scaling of the surface when it is composited to the screen.

Constant Value: 16384 (0x00004000)

FLAG_SECURE

Added in API level 1
int FLAG_SECURE

Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

See FLAG_SECURE for more details about secure surfaces and secure displays.

Constant Value: 8192 (0x00002000)

FLAG_SHOW_WALLPAPER

Added in API level 5
int FLAG_SHOW_WALLPAPER

Window flag: ask that the system wallpaper be shown behind your window. The window surface must be translucent to be able to actually see the wallpaper behind it; this flag just ensures that the wallpaper surface will be there if this window actually has translucent regions.

This flag can be controlled in your theme through the windowShowWallpaper attribute; this attribute is automatically set for you in the standard wallpaper themes such as Theme_Wallpaper, Theme_Wallpaper_NoTitleBar, Theme_Wallpaper_NoTitleBar_Fullscreen, Theme_Holo_Wallpaper, Theme_Holo_Wallpaper_NoTitleBar, Theme_DeviceDefault_Wallpaper, and Theme_DeviceDefault_Wallpaper_NoTitleBar.

Constant Value: 1048576 (0x00100000)

FLAG_SHOW_WHEN_LOCKED

Added in API level 5
int FLAG_SHOW_WHEN_LOCKED

Window flag: special flag to let windows be shown when the screen is locked. This will let application windows take precedence over key guard or any other lock screens. Can be used with FLAG_KEEP_SCREEN_ON to turn screen on and display windows directly before showing the key guard window. Can be used with FLAG_DISMISS_KEYGUARD to automatically fully dismisss non-secure keyguards. This flag only applies to the top-most full-screen window.

Constant Value: 524288 (0x00080000)

FLAG_SPLIT_TOUCH

Added in API level 11
int FLAG_SPLIT_TOUCH

Window flag: when set the window will accept for touch events outside of its bounds to be sent to other windows that also support split touch. When this flag is not set, the first pointer that goes down determines the window to which all subsequent touches go until all pointers go up. When this flag is set, each pointer (not necessarily the first) that goes down determines the window to which all subsequent touches of that pointer will go until that pointer goes up thereby enabling touches with multiple pointers to be split across multiple windows.

Constant Value: 8388608 (0x00800000)

FLAG_TOUCHABLE_WHEN_WAKING

Added in API level 1
int FLAG_TOUCHABLE_WHEN_WAKING

This constant was deprecated in API level 20.
This flag has no effect.

Window flag: when set, if the device is asleep when the touch screen is pressed, you will receive this first touch event. Usually the first touch event is consumed by the system since the user can not see what they are pressing on.

Constant Value: 64 (0x00000040)

FLAG_TRANSLUCENT_NAVIGATION

Added in API level 19
int FLAG_TRANSLUCENT_NAVIGATION

Window flag: request a translucent navigation bar with minimal system-provided background protection.

This flag can be controlled in your theme through the windowTranslucentNavigation attribute; this attribute is automatically set for you in the standard translucent decor themes such as Theme_Holo_NoActionBar_TranslucentDecor, Theme_Holo_Light_NoActionBar_TranslucentDecor, Theme_DeviceDefault_NoActionBar_TranslucentDecor, and Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor.

When this flag is enabled for a window, it automatically sets the system UI visibility flags SYSTEM_UI_FLAG_LAYOUT_STABLE and SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION.

Constant Value: 134217728 (0x08000000)

FLAG_TRANSLUCENT_STATUS

Added in API level 19
int FLAG_TRANSLUCENT_STATUS

Window flag: request a translucent status bar with minimal system-provided background protection.

This flag can be controlled in your theme through the windowTranslucentStatus attribute; this attribute is automatically set for you in the standard translucent decor themes such as Theme_Holo_NoActionBar_TranslucentDecor, Theme_Holo_Light_NoActionBar_TranslucentDecor, Theme_DeviceDefault_NoActionBar_TranslucentDecor, and Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor.

When this flag is enabled for a window, it automatically sets the system UI visibility flags SYSTEM_UI_FLAG_LAYOUT_STABLE and SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN.

Constant Value: 67108864 (0x04000000)

FLAG_TURN_SCREEN_ON

Added in API level 5
int FLAG_TURN_SCREEN_ON

Window flag: when set as a window is being added or made visible, once the window has been shown then the system will poke the power manager's user activity (as if the user had woken up the device) to turn the screen on.

Constant Value: 2097152 (0x00200000)

FLAG_WATCH_OUTSIDE_TOUCH

Added in API level 3
int FLAG_WATCH_OUTSIDE_TOUCH

Window flag: if you have set FLAG_NOT_TOUCH_MODAL, you can set this flag to receive a single special MotionEvent with the action MotionEvent.ACTION_OUTSIDE for touches that occur outside of your window. Note that you will not receive the full down/move/up gesture, only the location of the first down as an ACTION_OUTSIDE.

Constant Value: 262144 (0x00040000)

FORMAT_CHANGED

Added in API level 1
int FORMAT_CHANGED

Constant Value: 8 (0x00000008)

LAST_APPLICATION_WINDOW

Added in API level 1
int LAST_APPLICATION_WINDOW

End of types of application windows.

Constant Value: 99 (0x00000063)

LAST_SUB_WINDOW

Added in API level 1
int LAST_SUB_WINDOW

End of types of sub-windows.

Constant Value: 1999 (0x000007cf)

LAST_SYSTEM_WINDOW

Added in API level 1
int LAST_SYSTEM_WINDOW

End of types of system windows.

Constant Value: 2999 (0x00000bb7)

LAYOUT_CHANGED

Added in API level 1
int LAYOUT_CHANGED

Constant Value: 1 (0x00000001)

MEMORY_TYPE_CHANGED

Added in API level 1
int MEMORY_TYPE_CHANGED

Constant Value: 256 (0x00000100)

MEMORY_TYPE_GPU

Added in API level 1
int MEMORY_TYPE_GPU

This constant was deprecated in API level 5.
this is ignored, this value is set automatically when needed.

Constant Value: 2 (0x00000002)

MEMORY_TYPE_HARDWARE

Added in API level 1
int MEMORY_TYPE_HARDWARE

This constant was deprecated in API level 5.
this is ignored, this value is set automatically when needed.

Constant Value: 1 (0x00000001)

MEMORY_TYPE_NORMAL

Added in API level 1
int MEMORY_TYPE_NORMAL

This constant was deprecated in API level 11.
this is ignored, this value is set automatically when needed.

Constant Value: 0 (0x00000000)

MEMORY_TYPE_PUSH_BUFFERS

Added in API level 1
int MEMORY_TYPE_PUSH_BUFFERS

This constant was deprecated in API level 11.
this is ignored, this value is set automatically when needed.

Constant Value: 3 (0x00000003)

ROTATION_ANIMATION_CHANGED

Added in API level 18
int ROTATION_ANIMATION_CHANGED

Constant Value: 4096 (0x00001000)

ROTATION_ANIMATION_CROSSFADE

Added in API level 18
int ROTATION_ANIMATION_CROSSFADE

Value for rotationAnimation to define the animation used to specify that this window will fade in or out following a rotation.

Constant Value: 1 (0x00000001)

ROTATION_ANIMATION_JUMPCUT

Added in API level 18
int ROTATION_ANIMATION_JUMPCUT

Value for rotationAnimation to define the animation used to specify that this window will immediately disappear or appear following a rotation.

Constant Value: 2 (0x00000002)

ROTATION_ANIMATION_ROTATE

Added in API level 18
int ROTATION_ANIMATION_ROTATE

Value for rotationAnimation to define the animation used to specify that this window will rotate in or out following a rotation.

Constant Value: 0 (0x00000000)

SCREEN_BRIGHTNESS_CHANGED

Added in API level 3
int SCREEN_BRIGHTNESS_CHANGED

Constant Value: 2048 (0x00000800)

SCREEN_ORIENTATION_CHANGED

Added in API level 3
int SCREEN_ORIENTATION_CHANGED

Constant Value: 1024 (0x00000400)

SOFT_INPUT_ADJUST_NOTHING

Added in API level 11
int SOFT_INPUT_ADJUST_NOTHING

Adjustment option for softInputMode: set to have a window not adjust for a shown input method. The window will not be resized, and it will not be panned to make its focus visible.

Constant Value: 48 (0x00000030)

SOFT_INPUT_ADJUST_PAN

Added in API level 3
int SOFT_INPUT_ADJUST_PAN

Adjustment option for softInputMode: set to have a window pan when an input method is shown, so it doesn't need to deal with resizing but just panned by the framework to ensure the current input focus is visible. This can not be combined with SOFT_INPUT_ADJUST_RESIZE; if neither of these are set, then the system will try to pick one or the other depending on the contents of the window.

Constant Value: 32 (0x00000020)

SOFT_INPUT_ADJUST_RESIZE

Added in API level 3
int SOFT_INPUT_ADJUST_RESIZE

Adjustment option for softInputMode: set to allow the window to be resized when an input method is shown, so that its contents are not covered by the input method. This can not be combined with SOFT_INPUT_ADJUST_PAN; if neither of these are set, then the system will try to pick one or the other depending on the contents of the window. If the window's layout parameter flags include FLAG_FULLSCREEN, this value for softInputMode will be ignored; the window will not resize, but will stay fullscreen.

Constant Value: 16 (0x00000010)

SOFT_INPUT_ADJUST_UNSPECIFIED

Added in API level 3
int SOFT_INPUT_ADJUST_UNSPECIFIED

Adjustment option for softInputMode: nothing specified. The system will try to pick one or the other depending on the contents of the window.

Constant Value: 0 (0x00000000)

SOFT_INPUT_IS_FORWARD_NAVIGATION

Added in API level 3
int SOFT_INPUT_IS_FORWARD_NAVIGATION

Bit for softInputMode: set when the user has navigated forward to the window. This is normally set automatically for you by the system, though you may want to set it in certain cases when you are displaying a window yourself. This flag will always be cleared automatically after the window is displayed.

Constant Value: 256 (0x00000100)

SOFT_INPUT_MASK_ADJUST

Added in API level 3
int SOFT_INPUT_MASK_ADJUST

Mask for softInputMode of the bits that determine the way that the window should be adjusted to accommodate the soft input window.

Constant Value: 240 (0x000000f0)

SOFT_INPUT_MASK_STATE

Added in API level 3
int SOFT_INPUT_MASK_STATE

Mask for softInputMode of the bits that determine the desired visibility state of the soft input area for this window.

Constant Value: 15 (0x0000000f)

SOFT_INPUT_MODE_CHANGED

Added in API level 3
int SOFT_INPUT_MODE_CHANGED

Constant Value: 512 (0x00000200)

SOFT_INPUT_STATE_ALWAYS_HIDDEN

Added in API level 3
int SOFT_INPUT_STATE_ALWAYS_HIDDEN

Visibility state for softInputMode: please always hide any soft input area when this window receives focus.

Constant Value: 3 (0x00000003)

SOFT_INPUT_STATE_ALWAYS_VISIBLE

Added in API level 3
int SOFT_INPUT_STATE_ALWAYS_VISIBLE

Visibility state for softInputMode: please always make the soft input area visible when this window receives input focus.

Constant Value: 5 (0x00000005)

SOFT_INPUT_STATE_HIDDEN

Added in API level 3
int SOFT_INPUT_STATE_HIDDEN

Visibility state for softInputMode: please hide any soft input area when normally appropriate (when the user is navigating forward to your window).

Constant Value: 2 (0x00000002)

SOFT_INPUT_STATE_UNCHANGED

Added in API level 3
int SOFT_INPUT_STATE_UNCHANGED

Visibility state for softInputMode: please don't change the state of the soft input area.

Constant Value: 1 (0x00000001)

SOFT_INPUT_STATE_UNSPECIFIED

Added in API level 3
int SOFT_INPUT_STATE_UNSPECIFIED

Visibility state for softInputMode: no state has been specified.

Constant Value: 0 (0x00000000)

SOFT_INPUT_STATE_VISIBLE

Added in API level 3
int SOFT_INPUT_STATE_VISIBLE

Visibility state for softInputMode: please show the soft input area when normally appropriate (when the user is navigating forward to your window).

Constant Value: 4 (0x00000004)

TITLE_CHANGED

Added in API level 1
int TITLE_CHANGED

Constant Value: 64 (0x00000040)

TYPE_ACCESSIBILITY_OVERLAY

Added in API level 22
int TYPE_ACCESSIBILITY_OVERLAY

Window type: Windows that are overlaid only by a connected AccessibilityService for interception of user interactions without changing the windows an accessibility service can introspect. In particular, an accessibility service can introspect only windows that a sighted user can interact with which is they can touch these windows or can type into these windows. For example, if there is a full screen accessibility overlay that is touchable, the windows below it will be introspectable by an accessibility service even though they are covered by a touchable window.

Constant Value: 2032 (0x000007f0)

TYPE_APPLICATION

Added in API level 1
int TYPE_APPLICATION

Window type: a normal application window. The token must be an Activity token identifying who the window belongs to. In multiuser systems shows only on the owning user's window.

Constant Value: 2 (0x00000002)

TYPE_APPLICATION_ATTACHED_DIALOG

Added in API level 3
int TYPE_APPLICATION_ATTACHED_DIALOG

Window type: like TYPE_APPLICATION_PANEL, but layout of the window happens as that of a top-level window, not as a child of its container.

Constant Value: 1003 (0x000003eb)

TYPE_APPLICATION_MEDIA

Added in API level 1
int TYPE_APPLICATION_MEDIA

Window type: window for showing media (such as video). These windows are displayed behind their attached window.

Constant Value: 1001 (0x000003e9)

TYPE_APPLICATION_PANEL

Added in API level 1
int TYPE_APPLICATION_PANEL

Window type: a panel on top of an application window. These windows appear on top of their attached window.

Constant Value: 1000 (0x000003e8)

TYPE_APPLICATION_STARTING

Added in API level 1
int TYPE_APPLICATION_STARTING

Window type: special application window that is displayed while the application is starting. Not for use by applications themselves; this is used by the system to display something until the application can show its own windows. In multiuser systems shows on all users' windows.

Constant Value: 3 (0x00000003)

TYPE_APPLICATION_SUB_PANEL

Added in API level 1
int TYPE_APPLICATION_SUB_PANEL

Window type: a sub-panel on top of an application window. These windows are displayed on top their attached window and any TYPE_APPLICATION_PANEL panels.

Constant Value: 1002 (0x000003ea)

TYPE_BASE_APPLICATION

Added in API level 1
int TYPE_BASE_APPLICATION

Window type: an application window that serves as the "base" window of the overall application; all other application windows will appear on top of it. In multiuser systems shows only on the owning user's window.

Constant Value: 1 (0x00000001)

TYPE_CHANGED

Added in API level 1
int TYPE_CHANGED

Constant Value: 2 (0x00000002)

TYPE_INPUT_METHOD

Added in API level 3
int TYPE_INPUT_METHOD

Window type: internal input methods windows, which appear above the normal UI. Application windows may be resized or panned to keep the input focus visible while this window is displayed. In multiuser systems shows only on the owning user's window.

Constant Value: 2011 (0x000007db)

TYPE_INPUT_METHOD_DIALOG

Added in API level 3
int TYPE_INPUT_METHOD_DIALOG

Window type: internal input methods dialog windows, which appear above the current input method window. In multiuser systems shows only on the owning user's window.

Constant Value: 2012 (0x000007dc)

TYPE_KEYGUARD_DIALOG

Added in API level 1
int TYPE_KEYGUARD_DIALOG

Window type: dialogs that the keyguard shows In multiuser systems shows on all users' windows.

Constant Value: 2009 (0x000007d9)

TYPE_PHONE

Added in API level 1
int TYPE_PHONE

Window type: phone. These are non-application windows providing user interaction with the phone (in particular incoming calls). These windows are normally placed above all applications, but behind the status bar. In multiuser systems shows on all users' windows.

Constant Value: 2002 (0x000007d2)

TYPE_PRIORITY_PHONE

Added in API level 1
int TYPE_PRIORITY_PHONE

Window type: priority phone UI, which needs to be displayed even if the keyguard is active. These windows must not take input focus, or they will interfere with the keyguard. In multiuser systems shows on all users' windows.

Constant Value: 2007 (0x000007d7)

TYPE_PRIVATE_PRESENTATION

Added in API level 19
int TYPE_PRIVATE_PRESENTATION

Window type: Window for Presentation on top of private virtual display.

Constant Value: 2030 (0x000007ee)

TYPE_SEARCH_BAR

Added in API level 1
int TYPE_SEARCH_BAR

Window type: the search bar. There can be only one search bar window; it is placed at the top of the screen. In multiuser systems shows on all users' windows.

Constant Value: 2001 (0x000007d1)

TYPE_STATUS_BAR

Added in API level 1
int TYPE_STATUS_BAR

Window type: the status bar. There can be only one status bar window; it is placed at the top of the screen, and all other windows are shifted down so they are below it. In multiuser systems shows on all users' windows.

Constant Value: 2000 (0x000007d0)

TYPE_STATUS_BAR_PANEL

Added in API level 1
int TYPE_STATUS_BAR_PANEL

Window type: panel that slides out from over the status bar In multiuser systems shows on all users' windows.

Constant Value: 2014 (0x000007de)

TYPE_SYSTEM_ALERT

Added in API level 1
int TYPE_SYSTEM_ALERT

Window type: system window, such as low power alert. These windows are always on top of application windows. In multiuser systems shows only on the owning user's window.

Constant Value: 2003 (0x000007d3)

TYPE_SYSTEM_DIALOG

Added in API level 1
int TYPE_SYSTEM_DIALOG

Window type: panel that slides out from the status bar In multiuser systems shows on all users' windows.

Constant Value: 2008 (0x000007d8)

TYPE_SYSTEM_ERROR

Added in API level 1
int TYPE_SYSTEM_ERROR

Window type: internal system error windows, appear on top of everything they can. In multiuser systems shows only on the owning user's window.

Constant Value: 2010 (0x000007da)

TYPE_SYSTEM_OVERLAY

Added in API level 1
int TYPE_SYSTEM_OVERLAY

Window type: system overlay windows, which need to be displayed on top of everything else. These windows must not take input focus, or they will interfere with the keyguard. In multiuser systems shows only on the owning user's window.

Constant Value: 2006 (0x000007d6)

TYPE_TOAST

Added in API level 1
int TYPE_TOAST

Window type: transient notifications. In multiuser systems shows only on the owning user's window.

Constant Value: 2005 (0x000007d5)

TYPE_WALLPAPER

Added in API level 5
int TYPE_WALLPAPER

Window type: wallpaper window, placed behind any window that wants to sit on top of the wallpaper. In multiuser systems shows only on the owning user's window.

Constant Value: 2013 (0x000007dd)

Fields

CREATOR

Added in API level 1
Creator<WindowManager.LayoutParams> CREATOR

alpha

Added in API level 1
float alpha

An alpha value to apply to this entire window. An alpha of 1.0 means fully opaque and 0.0 means fully transparent

buttonBrightness

Added in API level 8
float buttonBrightness

This can be used to override the standard behavior of the button and keyboard backlights. A value of less than 0, the default, means to use the standard backlight behavior. 0 to 1 adjusts the brightness from dark to full bright.

dimAmount

Added in API level 1
float dimAmount

When FLAG_DIM_BEHIND is set, this is the amount of dimming to apply. Range is from 1.0 for completely opaque to 0.0 for no dim.

format

Added in API level 1
int format

The desired bitmap format. May be one of the constants in PixelFormat. Default is OPAQUE.

gravity

Added in API level 1
int gravity

Placement of window within the screen as per Gravity. Both Gravity.apply and Gravity.applyDisplay are used during window layout, with this value given as the desired gravity. For example you can specify Gravity.DISPLAY_CLIP_HORIZONTAL and Gravity.DISPLAY_CLIP_VERTICAL here to control the behavior of Gravity.applyDisplay.

See also:

horizontalMargin

Added in API level 1
float horizontalMargin

The horizontal margin, as a percentage of the container's width, between the container and the widget. See Gravity.apply for how this is used. This field is added with x to supply the xAdj parameter.

horizontalWeight

Added in API level 1
float horizontalWeight

Indicates how much of the extra space will be allocated horizontally to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0.

memoryType

Added in API level 1
int memoryType

This field was deprecated in API level 11.
this is ignored

packageName

Added in API level 1
String packageName

Name of the package owning this window.

preferredDisplayModeId

Added in API level 23
int preferredDisplayModeId

Id of the preferred display mode for the window.

This must be one of the supported modes obtained for the display(s) the window is on. A value of 0 means no preference.

See also:

preferredRefreshRate

Added in API level 21
float preferredRefreshRate

This field was deprecated in API level 23.
use preferredDisplayModeId instead

The preferred refresh rate for the window. This must be one of the supported refresh rates obtained for the display(s) the window is on. The selected refresh rate will be applied to the display's default mode. This value is ignored if preferredDisplayModeId is set.

See also:

rotationAnimation

Added in API level 18
int rotationAnimation

Define the exit and entry animations used on this window when the device is rotated. This only has an affect if the incoming and outgoing topmost opaque windows have the #FLAG_FULLSCREEN bit set and are not covered by other windows. All other situations default to the ROTATION_ANIMATION_ROTATE behavior.

See also:

screenBrightness

Added in API level 3
float screenBrightness

This can be used to override the user's preferred brightness of the screen. A value of less than 0, the default, means to use the preferred screen brightness. 0 to 1 adjusts the brightness from dark to full bright.

screenOrientation

Added in API level 3
int screenOrientation

Specific orientation value for a window. May be any of the same values allowed for screenOrientation. If not set, a default value of SCREEN_ORIENTATION_UNSPECIFIED will be used.

softInputMode

Added in API level 3
int softInputMode

Desired operating mode for any soft input area. May be any combination of:

This flag can be controlled in your theme through the windowSoftInputMode attribute.

systemUiVisibility

Added in API level 11
int systemUiVisibility

Control the visibility of the status bar.

See also:

token

Added in API level 1
IBinder token

Identifier for this window. This will usually be filled in for you.

type

Added in API level 1
int type

The general type of window. There are three main classes of window types:

  • Application windows (ranging from FIRST_APPLICATION_WINDOW to LAST_APPLICATION_WINDOW) are normal top-level application windows. For these types of windows, the token must be set to the token of the activity they are a part of (this will normally be done for you if token is null).
  • Sub-windows (ranging from FIRST_SUB_WINDOW to LAST_SUB_WINDOW) are associated with another top-level window. For these types of windows, the token must be the token of the window it is attached to.
  • System windows (ranging from FIRST_SYSTEM_WINDOW to LAST_SYSTEM_WINDOW) are special types of windows for use by the system for specific purposes. They should not normally be used by applications, and a special permission is required to use them.

See also:

verticalMargin

Added in API level 1
float verticalMargin

The vertical margin, as a percentage of the container's height, between the container and the widget. See Gravity.apply for how this is used. This field is added with y to supply the yAdj parameter.

verticalWeight

Added in API level 1
float verticalWeight

Indicates how much of the extra space will be allocated vertically to the view associated with these LayoutParams. Specify 0 if the view should not be stretched. Otherwise the extra pixels will be pro-rated among all views whose weight is greater than 0.

windowAnimations

Added in API level 1
int windowAnimations

A style resource defining the animations to use for this window. This must be a system resource; it can not be an application resource because the window manager does not have access to applications.

x

Added in API level 1
int x

X position for this window. With the default gravity it is ignored. When using LEFT or START or RIGHT or END it provides an offset from the given edge.

y

Added in API level 1
int y

Y position for this window. With the default gravity it is ignored. When using TOP or BOTTOM it provides an offset from the given edge.

Public constructors

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams ()

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (int _type)

Parameters
_type int

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (int _type, 
                int _flags)

Parameters
_type int
_flags int

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (int _type, 
                int _flags, 
                int _format)

Parameters
_type int
_flags int
_format int

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (int w, 
                int h, 
                int _type, 
                int _flags, 
                int _format)

Parameters
w int
h int
_type int
_flags int
_format int

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (int w, 
                int h, 
                int xpos, 
                int ypos, 
                int _type, 
                int _flags, 
                int _format)

Parameters
w int
h int
xpos int
ypos int
_type int
_flags int
_format int

WindowManager.LayoutParams

Added in API level 1
WindowManager.LayoutParams (Parcel in)

Parameters
in Parcel

Public methods

copyFrom

Added in API level 1
int copyFrom (WindowManager.LayoutParams o)

Parameters
o WindowManager.LayoutParams
Returns
int

debug

Added in API level 1
String debug (String output)

Returns a String representation of this set of layout parameters.

Parameters
output String: the String to prepend to the internal representation
Returns
String a String with the following format: output + "ViewGroup.LayoutParams={ width=WIDTH, height=HEIGHT }"

describeContents

Added in API level 1
int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getTitle

Added in API level 1
CharSequence getTitle ()

Returns
CharSequence

mayUseInputMethod

Added in API level 3
boolean mayUseInputMethod (int flags)

Given a particular set of window manager flags, determine whether such a window may be a target for an input method when it has focus. In particular, this checks the FLAG_NOT_FOCUSABLE and FLAG_ALT_FOCUSABLE_IM flags and returns true if the combination of the two corresponds to a window that needs to be behind the input method so that the user can type into it.

Parameters
flags int: The current window manager flags.
Returns
boolean Returns true if such a window should be behind/interact with an input method, false if not.

setTitle

Added in API level 1
void setTitle (CharSequence title)

Parameters
title CharSequence

toString

Added in API level 1
String toString ()

Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Returns
String a string representation of the object.

writeToParcel

Added in API level 1
void writeToParcel (Parcel out, 
                int parcelableFlags)

Flatten this object in to a Parcel.

Parameters
out Parcel: The Parcel in which the object should be written.
parcelableFlags int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.

Hooray!