public static class WindowManager.LayoutParams extends ViewGroup.LayoutParams implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static int |
ACCESSIBILITY_ANCHOR_CHANGED |
static int |
ACCESSIBILITY_TITLE_CHANGED |
int |
accessibilityIdOfAnchor
For windows with an anchor (e.g.
|
CharSequence |
accessibilityTitle
The window title isn't kept in sync with what is displayed in the title bar, so we
separately track the currently shown title to provide to accessibility.
|
float |
alpha
An alpha value to apply to this entire window.
|
static int |
ALPHA_CHANGED |
static int |
ANIMATION_CHANGED |
static 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. |
static 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. |
static 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. |
static int |
BUTTON_BRIGHTNESS_CHANGED |
float |
buttonBrightness
This can be used to override the standard behavior of the button and
keyboard backlights.
|
static Parcelable.Creator<WindowManager.LayoutParams> |
CREATOR |
static int |
DIM_AMOUNT_CHANGED |
float |
dimAmount
When
FLAG_DIM_BEHIND is set, this is the amount of dimming
to apply. |
static int |
EVERYTHING_CHANGED |
static int |
FIRST_APPLICATION_WINDOW
Start of window types that represent normal application windows.
|
static int |
FIRST_SUB_WINDOW
Start of types of sub-windows.
|
static int |
FIRST_SYSTEM_WINDOW
Start of system-specific window types.
|
static 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.
|
static 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. |
static int |
FLAG_BLUR_BEHIND
Deprecated.
Blurring is no longer supported.
|
static int |
FLAG_DIM_BEHIND
Window flag: everything behind this window will be dimmed.
|
static 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.
|
static int |
FLAG_DITHER
Deprecated.
This flag is no longer used.
|
static int |
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
Flag indicating that this Window is responsible for drawing the background for the
system bars.
|
static int |
FLAG_FORCE_NOT_FULLSCREEN
Window flag: override
FLAG_FULLSCREEN and force the
screen decorations (such as the status bar) to be shown. |
static int |
FLAG_FULLSCREEN
Window flag: hide all screen decorations (such as the status bar) while
this window is displayed.
|
static int |
FLAG_HARDWARE_ACCELERATED
Indicates whether this window should be hardware accelerated.
|
static 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.
|
static 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.
|
static 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.
|
static int |
FLAG_LAYOUT_IN_OVERSCAN
Window flag: allow window contents to extend in to the screen's
overscan area, if there is one.
|
static int |
FLAG_LAYOUT_IN_SCREEN
Window flag: place the window within the entire screen, ignoring
decorations around the border (such as the status bar).
|
static int |
FLAG_LAYOUT_INSET_DECOR
Window flag: a special option only for use in combination with
FLAG_LAYOUT_IN_SCREEN . |
static int |
FLAG_LAYOUT_NO_LIMITS
Window flag: allow window to extend outside of the screen.
|
static int |
FLAG_LOCAL_FOCUS_MODE
Flag for a window in local focus mode.
|
static 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.
|
static 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. |
static int |
FLAG_NOT_TOUCHABLE
Window flag: this window can never receive touch events.
|
static 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.
|
static 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.
|
static int |
FLAG_SHOW_WALLPAPER
Window flag: ask that the system wallpaper be shown behind
your window.
|
static int |
FLAG_SHOW_WHEN_LOCKED
Window flag: special flag to let windows be shown when the screen
is locked.
|
static int |
FLAG_SLIPPERY
Window flag: Enable touches to slide out of a window into neighboring
windows in mid-gesture instead of being captured for the duration of
the gesture.
|
static 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.
|
static int |
FLAG_TOUCHABLE_WHEN_WAKING
Deprecated.
This flag has no effect.
|
static int |
FLAG_TRANSLUCENT_NAVIGATION
Window flag: request a translucent navigation bar with minimal system-provided
background protection.
|
static int |
FLAG_TRANSLUCENT_STATUS
Window flag: request a translucent status bar with minimal system-provided
background protection.
|
static 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.
|
static 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 |
flags
Various behavioral options/flags.
|
static int |
FLAGS_CHANGED |
int |
format
The desired bitmap format.
|
static int |
FORMAT_CHANGED |
int |
gravity
Placement of window within the screen as per
Gravity . |
boolean |
hasManualSurfaceInsets
Whether the surface insets have been manually set.
|
boolean |
hasSystemUiListeners
Get callbacks about the system ui visibility changing.
|
long |
hideTimeoutMilliseconds
Sets a timeout in milliseconds before which the window will be hidden
by the window manager.
|
float |
horizontalMargin
The horizontal margin, as a percentage of the container's width,
between the container and the widget.
|
float |
horizontalWeight
Indicates how much of the extra space will be allocated horizontally
to the view associated with these LayoutParams.
|
static int |
INPUT_FEATURE_DISABLE_POINTER_GESTURES
When this window has focus, disable touch pad pointer gesture processing.
|
static int |
INPUT_FEATURE_DISABLE_USER_ACTIVITY
When this window has focus, does not call user activity for all input events so
the application will have to do it itself.
|
static int |
INPUT_FEATURE_NO_INPUT_CHANNEL
Does not construct an input channel for this window.
|
static int |
INPUT_FEATURES_CHANGED |
int |
inputFeatures
Control special features of the input subsystem.
|
static int |
LAST_APPLICATION_WINDOW
End of types of application windows.
|
static int |
LAST_SUB_WINDOW
End of types of sub-windows.
|
static int |
LAST_SYSTEM_WINDOW
End of types of system windows.
|
static int |
LAYOUT_CHANGED |
static int |
MEMORY_TYPE_CHANGED |
static int |
MEMORY_TYPE_GPU
Deprecated.
this is ignored, this value is set automatically when needed.
|
static int |
MEMORY_TYPE_HARDWARE
Deprecated.
this is ignored, this value is set automatically when needed.
|
static int |
MEMORY_TYPE_NORMAL
Deprecated.
this is ignored, this value is set automatically when needed.
|
static int |
MEMORY_TYPE_PUSH_BUFFERS
Deprecated.
this is ignored, this value is set automatically when needed.
|
int |
memoryType
Deprecated.
this is ignored
|
static int |
NEEDS_MENU_KEY_CHANGED |
static int |
NEEDS_MENU_SET_FALSE
Value for
needsMenuKey for a window that has explicitly specified it doesn't
needs a menu key. |
static int |
NEEDS_MENU_SET_TRUE
Value for
needsMenuKey for a window that has explicitly specified it needs a
menu key. |
static int |
NEEDS_MENU_UNSET
Value for
needsMenuKey for a window that has not explicitly specified if it
needs NEEDS_MENU_SET_TRUE or doesn't need NEEDS_MENU_SET_FALSE a menu
key. |
int |
needsMenuKey
State variable for a window belonging to an activity that responds to
KeyEvent.KEYCODE_MENU and therefore needs a Menu key. |
String |
packageName
Name of the package owning this window.
|
static int |
PREFERRED_DISPLAY_MODE_ID |
static int |
PREFERRED_REFRESH_RATE_CHANGED |
int |
preferredDisplayModeId
Id of the preferred display mode for the window.
|
float |
preferredRefreshRate
Deprecated.
use
preferredDisplayModeId instead |
boolean |
preservePreviousSurfaceInsets
Whether the previous surface insets should be used vs. what is currently set.
|
static int |
PRIVATE_FLAG_COMPATIBLE_WINDOW
Window flag: special flag to limit the size of the window to be
original size ([320x480] x density).
|
static int |
PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS
Flag that prevents the wallpaper behind the current window from receiving touch events.
|
static int |
PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED
If the window has requested hardware acceleration, but this is not
allowed in the process it is in, then still render it as if it is
hardware accelerated.
|
static int |
PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY
Flag that will make window ignore app visibility and instead depend purely on the decor
view visibility for determining window visibility.
|
static int |
PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND
Flag to indicate that this window is always drawing the status bar background, no matter
what the other flags are.
|
static int |
PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED
In the system process, we globally do not use hardware acceleration
because there are many threads doing UI there and they conflict.
|
static int |
PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT
Flag to force the status bar window to be visible all the time.
|
static int |
PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR
Window flag: maintain the previous translucent decor state when this window
becomes top-most.
|
static int |
PRIVATE_FLAG_KEYGUARD
Flag whether the current window is a keyguard window, meaning that it will hide all other
windows behind it except for windows with flag
FLAG_SHOW_WHEN_LOCKED set. |
static int |
PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
Flag to indicate that this child window should always be laid-out in the parent
frame regardless of the current windowing mode configuration.
|
static int |
PRIVATE_FLAG_NO_MOVE_ANIMATION
Never animate position changes of the window.
|
static int |
PRIVATE_FLAG_PRESERVE_GEOMETRY
Flag indicating that the x, y, width, and height members should be
ignored (and thus their previous value preserved).
|
static int |
PRIVATE_FLAG_SHOW_FOR_ALL_USERS
In a multiuser system if this flag is set and the owner is a system process then this
window will appear on all user screens.
|
static int |
PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE
Flag to indicate that this window needs Sustained Performance Mode if
the device supports it.
|
static int |
PRIVATE_FLAG_SYSTEM_ERROR
Window flag: a special option intended for system dialogs.
|
static int |
PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS
By default, wallpapers are sent new offsets when the wallpaper is scrolled.
|
static int |
PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH
Flag to indicate that this window is not expected to be replaced across
configuration change triggered activity relaunches.
|
static int |
PRIVATE_FLAGS_CHANGED |
int |
privateFlags
Control flags that are private to the platform.
|
static int |
ROTATION_ANIMATION_CHANGED |
static 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. |
static 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. |
static 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. |
static int |
ROTATION_ANIMATION_SEAMLESS
Value for
rotationAnimation to specify seamless rotation mode. |
int |
rotationAnimation
Define the exit and entry animations used on this window when the device is rotated.
|
static int |
SCREEN_BRIGHTNESS_CHANGED |
static int |
SCREEN_ORIENTATION_CHANGED |
float |
screenBrightness
This can be used to override the user's preferred brightness of
the screen.
|
int |
screenOrientation
Specific orientation value for a window.
|
static int |
SOFT_INPUT_ADJUST_NOTHING
Adjustment option for
softInputMode : set to have a window
not adjust for a shown input method. |
static 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. |
static 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. |
static int |
SOFT_INPUT_ADJUST_UNSPECIFIED
Adjustment option for
softInputMode : nothing specified. |
static int |
SOFT_INPUT_IS_FORWARD_NAVIGATION
Bit for
softInputMode : set when the user has navigated
forward to the window. |
static 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. |
static 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. |
static int |
SOFT_INPUT_MODE_CHANGED |
static int |
SOFT_INPUT_STATE_ALWAYS_HIDDEN
Visibility state for
softInputMode : please always hide any
soft input area when this window receives focus. |
static int |
SOFT_INPUT_STATE_ALWAYS_VISIBLE
Visibility state for
softInputMode : please always make the
soft input area visible when this window receives input focus. |
static 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). |
static int |
SOFT_INPUT_STATE_UNCHANGED
Visibility state for
softInputMode : please don't change the state of
the soft input area. |
static int |
SOFT_INPUT_STATE_UNSPECIFIED
Visibility state for
softInputMode : no state has been specified. |
static 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 |
softInputMode
Desired operating mode for any soft input area.
|
int |
subtreeSystemUiVisibility |
static int |
SURFACE_INSETS_CHANGED |
Rect |
surfaceInsets
Positive insets between the drawing surface and window content.
|
static int |
SYSTEM_UI_LISTENER_CHANGED |
static int |
SYSTEM_UI_VISIBILITY_CHANGED |
int |
systemUiVisibility
Control the visibility of the status bar.
|
static int |
TITLE_CHANGED |
IBinder |
token
Identifier for this window.
|
static int |
TRANSLUCENT_FLAGS_CHANGED |
int |
type
The general type of window.
|
static 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. |
static int |
TYPE_APPLICATION
Window type: a normal application window.
|
static int |
TYPE_APPLICATION_ABOVE_SUB_PANEL
Window type: a above sub-panel on top of an application window and it's
sub-panel windows.
|
static 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. |
static int |
TYPE_APPLICATION_MEDIA
Window type: window for showing media (such as video).
|
static int |
TYPE_APPLICATION_MEDIA_OVERLAY
Window type: window for showing overlays on top of media windows.
|
static int |
TYPE_APPLICATION_PANEL
Window type: a panel on top of an application window.
|
static int |
TYPE_APPLICATION_STARTING
Window type: special application window that is displayed while the
application is starting.
|
static int |
TYPE_APPLICATION_SUB_PANEL
Window type: a sub-panel on top of an application window.
|
static 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.
|
static int |
TYPE_BOOT_PROGRESS
Window type: The boot progress dialog, goes on top of everything
in the world.
|
static int |
TYPE_CHANGED |
static int |
TYPE_DISPLAY_OVERLAY
Window type: Display overlay window.
|
static int |
TYPE_DOCK_DIVIDER
Window for displaying a handle used for resizing docked stacks.
|
static int |
TYPE_DRAG
Window type: the drag-and-drop pseudowindow.
|
static int |
TYPE_DRAWN_APPLICATION
Window type: a variation on TYPE_APPLICATION that ensures the window
manager will wait for this window to be drawn before the app is shown.
|
static int |
TYPE_DREAM
Window type: Dreams (screen saver) window, just above keyguard.
|
static int |
TYPE_INPUT_CONSUMER
Window type to consume input events when the systemUI bars are hidden.
|
static int |
TYPE_INPUT_METHOD
Window type: internal input methods windows, which appear above
the normal UI.
|
static int |
TYPE_INPUT_METHOD_DIALOG
Window type: internal input methods dialog windows, which appear above
the current input method window.
|
static int |
TYPE_KEYGUARD
Window type: keyguard window.
|
static int |
TYPE_KEYGUARD_DIALOG
Window type: dialogs that the keyguard shows
In multiuser systems shows on all users' windows.
|
static int |
TYPE_KEYGUARD_SCRIM
Window type: keyguard scrim window.
|
static int |
TYPE_MAGNIFICATION_OVERLAY
Window type: Magnification overlay window.
|
static int |
TYPE_NAVIGATION_BAR
Window type: Navigation bar (when distinct from status bar)
In multiuser systems shows on all users' windows.
|
static int |
TYPE_NAVIGATION_BAR_PANEL
Window type: Navigation bar panel (when navigation bar is distinct from status bar)
In multiuser systems shows on all users' windows.
|
static int |
TYPE_PHONE
Window type: phone.
|
static int |
TYPE_POINTER
Window type: (mouse) pointer
In multiuser systems shows on all users' windows.
|
static int |
TYPE_PRIORITY_PHONE
Window type: priority phone UI, which needs to be displayed even if
the keyguard is active.
|
static int |
TYPE_PRIVATE_PRESENTATION
Window type: Window for Presentation on top of private
virtual display.
|
static int |
TYPE_QS_DIALOG
Window type: like
TYPE_APPLICATION_ATTACHED_DIALOG , but used
by Quick Settings Tiles. |
static int |
TYPE_SCREENSHOT
Window type: shares similar characteristics with
TYPE_DREAM . |
static int |
TYPE_SEARCH_BAR
Window type: the search bar.
|
static int |
TYPE_SECURE_SYSTEM_OVERLAY
Window type: secure system overlay windows, which need to be displayed
on top of everything else.
|
static int |
TYPE_STATUS_BAR
Window type: the status bar.
|
static int |
TYPE_STATUS_BAR_PANEL
Window type: panel that slides out from over the status bar
In multiuser systems shows on all users' windows.
|
static int |
TYPE_STATUS_BAR_SUB_PANEL
Window type: panel that slides out from under the status bar
In multiuser systems shows on all users' windows.
|
static int |
TYPE_SYSTEM_ALERT
Window type: system window, such as low power alert.
|
static int |
TYPE_SYSTEM_DIALOG
Window type: panel that slides out from the status bar
In multiuser systems shows on all users' windows.
|
static int |
TYPE_SYSTEM_ERROR
Window type: internal system error windows, appear on top of
everything they can.
|
static int |
TYPE_SYSTEM_OVERLAY
Window type: system overlay windows, which need to be displayed
on top of everything else.
|
static int |
TYPE_TOAST
Window type: transient notifications.
|
static int |
TYPE_VOICE_INTERACTION
Window type: Windows in the voice interaction layer.
|
static int |
TYPE_VOICE_INTERACTION_STARTING
Window type: Starting window for voice interaction layer.
|
static int |
TYPE_VOLUME_OVERLAY
Window type: The volume level overlay/dialog shown when the user
changes the system volume.
|
static int |
TYPE_WALLPAPER
Window type: wallpaper window, placed behind any window that wants
to sit on top of the wallpaper.
|
static int |
USER_ACTIVITY_TIMEOUT_CHANGED |
long |
userActivityTimeout
Sets the number of milliseconds before the user activity timeout occurs
when this window has focus.
|
float |
verticalMargin
The vertical margin, as a percentage of the container's height,
between the container and the widget.
|
float |
verticalWeight
Indicates how much of the extra space will be allocated vertically
to the view associated with these LayoutParams.
|
int |
windowAnimations
A style resource defining the animations to use for this window.
|
int |
x
X position for this window.
|
int |
y
Y position for this window.
|
FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
LayoutParams() |
LayoutParams(int _type) |
LayoutParams(int _type,
int _flags) |
LayoutParams(int _type,
int _flags,
int _format) |
LayoutParams(int w,
int h,
int _type,
int _flags,
int _format) |
LayoutParams(int w,
int h,
int xpos,
int ypos,
int _type,
int _flags,
int _format) |
LayoutParams(Parcel in) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected void |
encodeProperties(ViewHierarchyEncoder encoder) |
CharSequence |
getTitle() |
long |
getUserActivityTimeout() |
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.
|
void |
scale(float scale)
Scale the layout params' coordinates and size.
|
void |
setSurfaceInsets(View view,
boolean manual,
boolean preservePrevious)
Sets the surface insets based on the elevation (visual z position) of the input view.
|
void |
setTitle(CharSequence title) |
void |
setUserActivityTimeout(long timeout) |
String |
toString()
Returns a string representation of the object.
|
void |
writeToParcel(Parcel out,
int parcelableFlags)
Flatten this object in to a Parcel.
|
onDebugDraw, resolveLayoutDirection, setBaseAttributes, sizeToString
public int x
Gravity.LEFT
or Gravity.START
or Gravity.RIGHT
or
Gravity.END
it provides an offset from the given edge.public int y
Gravity.TOP
or Gravity.BOTTOM
it provides
an offset from the given edge.public float horizontalWeight
public float verticalWeight
public int type
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).
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.
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.
TYPE_BASE_APPLICATION
,
TYPE_APPLICATION
,
TYPE_APPLICATION_STARTING
,
TYPE_DRAWN_APPLICATION
,
TYPE_APPLICATION_PANEL
,
TYPE_APPLICATION_MEDIA
,
TYPE_APPLICATION_SUB_PANEL
,
TYPE_APPLICATION_ABOVE_SUB_PANEL
,
TYPE_APPLICATION_ATTACHED_DIALOG
,
TYPE_STATUS_BAR
,
TYPE_SEARCH_BAR
,
TYPE_PHONE
,
TYPE_SYSTEM_ALERT
,
TYPE_TOAST
,
TYPE_SYSTEM_OVERLAY
,
TYPE_PRIORITY_PHONE
,
TYPE_STATUS_BAR_PANEL
,
TYPE_SYSTEM_DIALOG
,
TYPE_KEYGUARD_DIALOG
,
TYPE_SYSTEM_ERROR
,
TYPE_INPUT_METHOD
,
TYPE_INPUT_METHOD_DIALOG
public static final int FIRST_APPLICATION_WINDOW
public static final int TYPE_BASE_APPLICATION
public static final int TYPE_APPLICATION
token
must be
an Activity token identifying who the window belongs to.
In multiuser systems shows only on the owning user's window.public static final int TYPE_APPLICATION_STARTING
public static final int TYPE_DRAWN_APPLICATION
public static final int LAST_APPLICATION_WINDOW
public static final int FIRST_SUB_WINDOW
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.public static final int TYPE_APPLICATION_PANEL
public static final int TYPE_APPLICATION_MEDIA
public static final int TYPE_APPLICATION_SUB_PANEL
TYPE_APPLICATION_PANEL
panels.public static final int TYPE_APPLICATION_ATTACHED_DIALOG
TYPE_APPLICATION_PANEL
, but layout
of the window happens as that of a top-level window, not
as a child of its container.public static final int TYPE_APPLICATION_MEDIA_OVERLAY
public static final int TYPE_APPLICATION_ABOVE_SUB_PANEL
TYPE_APPLICATION_SUB_PANEL
panels.public static final int LAST_SUB_WINDOW
public static final int FIRST_SYSTEM_WINDOW
public static final int TYPE_STATUS_BAR
public static final int TYPE_SEARCH_BAR
public static final int TYPE_PHONE
public static final int TYPE_SYSTEM_ALERT
public static final int TYPE_KEYGUARD
public static final int TYPE_TOAST
public static final int TYPE_SYSTEM_OVERLAY
public static final int TYPE_PRIORITY_PHONE
public static final int TYPE_SYSTEM_DIALOG
public static final int TYPE_KEYGUARD_DIALOG
public static final int TYPE_SYSTEM_ERROR
public static final int TYPE_INPUT_METHOD
public static final int TYPE_INPUT_METHOD_DIALOG
public static final int TYPE_WALLPAPER
public static final int TYPE_STATUS_BAR_PANEL
public static final int TYPE_SECURE_SYSTEM_OVERLAY
TYPE_SYSTEM_OVERLAY
except that only the
system itself is allowed to create these overlays. Applications cannot
obtain permission to create secure system overlays.
In multiuser systems shows only on the owning user's window.public static final int TYPE_DRAG
public static final int TYPE_STATUS_BAR_SUB_PANEL
public static final int TYPE_POINTER
public static final int TYPE_NAVIGATION_BAR
public static final int TYPE_VOLUME_OVERLAY
public static final int TYPE_BOOT_PROGRESS
public static final int TYPE_INPUT_CONSUMER
public static final int TYPE_DREAM
public static final int TYPE_NAVIGATION_BAR_PANEL
public static final int TYPE_DISPLAY_OVERLAY
public static final int TYPE_MAGNIFICATION_OVERLAY
public static final int TYPE_KEYGUARD_SCRIM
public static final int TYPE_PRIVATE_PRESENTATION
public static final int TYPE_VOICE_INTERACTION
public static final int TYPE_ACCESSIBILITY_OVERLAY
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.public static final int TYPE_VOICE_INTERACTION_STARTING
public static final int TYPE_DOCK_DIVIDER
public static final int TYPE_QS_DIALOG
TYPE_APPLICATION_ATTACHED_DIALOG
, but used
by Quick Settings Tiles.public static final int TYPE_SCREENSHOT
TYPE_DREAM
. The layer is
reserved for screenshot region selection. These windows must not take input focus.public static final int LAST_SYSTEM_WINDOW
@Deprecated public static final int MEMORY_TYPE_NORMAL
@Deprecated public static final int MEMORY_TYPE_HARDWARE
@Deprecated public static final int MEMORY_TYPE_GPU
@Deprecated public static final int MEMORY_TYPE_PUSH_BUFFERS
@Deprecated public int memoryType
public static final int FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
FLAG_KEEP_SCREEN_ON
and/or FLAG_SHOW_WHEN_LOCKED
public static final int FLAG_DIM_BEHIND
dimAmount
to control the amount of dim.@Deprecated public static final int FLAG_BLUR_BEHIND
public static final int FLAG_NOT_FOCUSABLE
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.
public static final int FLAG_NOT_TOUCHABLE
public static final int FLAG_NOT_TOUCH_MODAL
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.@Deprecated public static final int FLAG_TOUCHABLE_WHEN_WAKING
public static final int FLAG_KEEP_SCREEN_ON
public static final int FLAG_LAYOUT_IN_SCREEN
Window.setFlags(int, int)
.public static final int FLAG_LAYOUT_NO_LIMITS
public static final int FLAG_FULLSCREEN
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
android.R.attr#windowFullscreen
attribute; this attribute
is automatically set for you in the standard fullscreen themes
such as android.R.style#Theme_NoTitleBar_Fullscreen
,
android.R.style#Theme_Black_NoTitleBar_Fullscreen
,
android.R.style#Theme_Light_NoTitleBar_Fullscreen
,
android.R.style#Theme_Holo_NoActionBar_Fullscreen
,
android.R.style#Theme_Holo_Light_NoActionBar_Fullscreen
,
android.R.style#Theme_DeviceDefault_NoActionBar_Fullscreen
, and
android.R.style#Theme_DeviceDefault_Light_NoActionBar_Fullscreen
.
public static final int FLAG_FORCE_NOT_FULLSCREEN
FLAG_FULLSCREEN
and force the
screen decorations (such as the status bar) to be shown.@Deprecated public static final int FLAG_DITHER
public static final int FLAG_SECURE
See Display.FLAG_SECURE
for more details about
secure surfaces and secure displays.
public static final int FLAG_SCALED
public static final int FLAG_IGNORE_CHEEK_PRESSES
public static final int FLAG_LAYOUT_INSET_DECOR
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 Window.setFlags(int, int)
.public static final int FLAG_ALT_FOCUSABLE_IM
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.public static final int FLAG_WATCH_OUTSIDE_TOUCH
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.public static final int FLAG_SHOW_WHEN_LOCKED
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.public static final int FLAG_SHOW_WALLPAPER
This flag can be controlled in your theme through the
android.R.attr#windowShowWallpaper
attribute; this attribute
is automatically set for you in the standard wallpaper themes
such as android.R.style#Theme_Wallpaper
,
android.R.style#Theme_Wallpaper_NoTitleBar
,
android.R.style#Theme_Wallpaper_NoTitleBar_Fullscreen
,
android.R.style#Theme_Holo_Wallpaper
,
android.R.style#Theme_Holo_Wallpaper_NoTitleBar
,
android.R.style#Theme_DeviceDefault_Wallpaper
, and
android.R.style#Theme_DeviceDefault_Wallpaper_NoTitleBar
.
public static final int FLAG_TURN_SCREEN_ON
public static final int FLAG_DISMISS_KEYGUARD
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.public static final int FLAG_SPLIT_TOUCH
public static final 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
android.R.attr#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.
public static final int FLAG_LAYOUT_IN_OVERSCAN
This flag can be controlled in your theme through the
android.R.attr#windowOverscan
attribute; this attribute
is automatically set for you in the standard overscan themes
such as
android.R.style#Theme_Holo_NoActionBar_Overscan
,
android.R.style#Theme_Holo_Light_NoActionBar_Overscan
,
android.R.style#Theme_DeviceDefault_NoActionBar_Overscan
, and
android.R.style#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 android.R.attr#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:
public static final int FLAG_TRANSLUCENT_STATUS
This flag can be controlled in your theme through the
android.R.attr#windowTranslucentStatus
attribute; this attribute
is automatically set for you in the standard translucent decor themes
such as
android.R.style#Theme_Holo_NoActionBar_TranslucentDecor
,
android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor
,
android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor
, and
android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor
.
When this flag is enabled for a window, it automatically sets
the system UI visibility flags View.SYSTEM_UI_FLAG_LAYOUT_STABLE
and
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
.
public static final int FLAG_TRANSLUCENT_NAVIGATION
This flag can be controlled in your theme through the
android.R.attr#windowTranslucentNavigation
attribute; this attribute
is automatically set for you in the standard translucent decor themes
such as
android.R.style#Theme_Holo_NoActionBar_TranslucentDecor
,
android.R.style#Theme_Holo_Light_NoActionBar_TranslucentDecor
,
android.R.style#Theme_DeviceDefault_NoActionBar_TranslucentDecor
, and
android.R.style#Theme_DeviceDefault_Light_NoActionBar_TranslucentDecor
.
When this flag is enabled for a window, it automatically sets
the system UI visibility flags View.SYSTEM_UI_FLAG_LAYOUT_STABLE
and
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
.
public static final int FLAG_LOCAL_FOCUS_MODE
Window.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 Window.injectInputEvent(InputEvent)
.public static final int FLAG_SLIPPERY
public static final int FLAG_LAYOUT_ATTACHED_IN_DECOR
public static final int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
Window.getStatusBarColor()
and Window.getNavigationBarColor()
.public int flags
FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
,
FLAG_DIM_BEHIND
,
FLAG_NOT_FOCUSABLE
,
FLAG_NOT_TOUCHABLE
,
FLAG_NOT_TOUCH_MODAL
,
FLAG_TOUCHABLE_WHEN_WAKING
,
FLAG_KEEP_SCREEN_ON
,
FLAG_LAYOUT_IN_SCREEN
,
FLAG_LAYOUT_NO_LIMITS
,
FLAG_FULLSCREEN
,
FLAG_FORCE_NOT_FULLSCREEN
,
FLAG_SECURE
,
FLAG_SCALED
,
FLAG_IGNORE_CHEEK_PRESSES
,
FLAG_LAYOUT_INSET_DECOR
,
FLAG_ALT_FOCUSABLE_IM
,
FLAG_WATCH_OUTSIDE_TOUCH
,
FLAG_SHOW_WHEN_LOCKED
,
FLAG_SHOW_WALLPAPER
,
FLAG_TURN_SCREEN_ON
,
FLAG_DISMISS_KEYGUARD
,
FLAG_SPLIT_TOUCH
,
FLAG_HARDWARE_ACCELERATED
,
FLAG_LOCAL_FOCUS_MODE
,
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
public static final int PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED
FLAG_HARDWARE_ACCELERATED
except for trusted system windows
that need hardware acceleration (e.g. LockScreen), where hardware acceleration
is generally disabled. This flag must be specified in addition to
FLAG_HARDWARE_ACCELERATED
to enable hardware acceleration for system
windows.public static final int PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED
public static final int PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS
WallpaperService.Engine.setOffsetNotificationsEnabled(boolean)
.public static final int PRIVATE_FLAG_SHOW_FOR_ALL_USERS
public static final int PRIVATE_FLAG_NO_MOVE_ANIMATION
public static final int PRIVATE_FLAG_COMPATIBLE_WINDOW
public static final int PRIVATE_FLAG_SYSTEM_ERROR
public static final int PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR
public static final int PRIVATE_FLAG_KEYGUARD
FLAG_SHOW_WHEN_LOCKED
set.
Further, this can only be set by TYPE_STATUS_BAR
.
public static final int PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS
public static final int PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT
TYPE_STATUS_BAR
.
public static final int PRIVATE_FLAG_PRESERVE_GEOMETRY
public static final int PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY
public static final int PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH
public static final int PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME
public static final int PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND
public static final int PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE
public int privateFlags
public static final int NEEDS_MENU_UNSET
needsMenuKey
for a window that has not explicitly specified if it
needs NEEDS_MENU_SET_TRUE
or doesn't need NEEDS_MENU_SET_FALSE
a menu
key. For this case, we should look at windows behind it to determine the appropriate
value.public static final int NEEDS_MENU_SET_TRUE
needsMenuKey
for a window that has explicitly specified it needs a
menu key.public static final int NEEDS_MENU_SET_FALSE
needsMenuKey
for a window that has explicitly specified it doesn't
needs a menu key.public int needsMenuKey
KeyEvent.KEYCODE_MENU
and therefore needs a Menu key. For devices where Menu is a
physical button this variable is ignored, but on devices where the Menu key is drawn in
software it may be hidden unless this variable is set to NEEDS_MENU_SET_TRUE
.
(Note that Action Bars, when available, are the preferred way to offer additional
functions otherwise accessed via an options menu.)
public static final int SOFT_INPUT_MASK_STATE
softInputMode
of the bits that determine the
desired visibility state of the soft input area for this window.public static final int SOFT_INPUT_STATE_UNSPECIFIED
softInputMode
: no state has been specified.public static final int SOFT_INPUT_STATE_UNCHANGED
softInputMode
: please don't change the state of
the soft input area.public static final int SOFT_INPUT_STATE_HIDDEN
softInputMode
: please hide any soft input
area when normally appropriate (when the user is navigating
forward to your window).public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN
softInputMode
: please always hide any
soft input area when this window receives focus.public static final int SOFT_INPUT_STATE_VISIBLE
softInputMode
: please show the soft
input area when normally appropriate (when the user is navigating
forward to your window).public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE
softInputMode
: please always make the
soft input area visible when this window receives input focus.public static final int SOFT_INPUT_MASK_ADJUST
softInputMode
of the bits that determine the
way that the window should be adjusted to accommodate the soft
input window.public static final int SOFT_INPUT_ADJUST_UNSPECIFIED
softInputMode
: nothing specified.
The system will try to pick one or
the other depending on the contents of the window.public static final int SOFT_INPUT_ADJUST_RESIZE
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.public static final int SOFT_INPUT_ADJUST_PAN
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.public static final int SOFT_INPUT_ADJUST_NOTHING
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.public static final int SOFT_INPUT_IS_FORWARD_NAVIGATION
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.public int softInputMode
SOFT_INPUT_STATE_UNSPECIFIED
, SOFT_INPUT_STATE_UNCHANGED
,
SOFT_INPUT_STATE_HIDDEN
, SOFT_INPUT_STATE_ALWAYS_VISIBLE
, or
SOFT_INPUT_STATE_VISIBLE
.
SOFT_INPUT_ADJUST_UNSPECIFIED
,
SOFT_INPUT_ADJUST_RESIZE
, or
SOFT_INPUT_ADJUST_PAN
.
This flag can be controlled in your theme through the
android.R.attr#windowSoftInputMode
attribute.
public int gravity
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
.Gravity
public float horizontalMargin
Gravity.apply
for how this is used. This
field is added with x
to supply the xAdj parameter.public float verticalMargin
Gravity.apply
for how this is used. This
field is added with y
to supply the yAdj parameter.public final Rect surfaceInsets
public boolean hasManualSurfaceInsets
false
, the view root will automatically determine the
appropriate surface insets.surfaceInsets
public boolean preservePreviousSurfaceInsets
true
, the view root will ignore surfaces insets in this object and use what
it currently has.surfaceInsets
public int format
PixelFormat
. Default is OPAQUE.public int windowAnimations
public float alpha
public float dimAmount
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.public static final float BRIGHTNESS_OVERRIDE_NONE
screenBrightness
and buttonBrightness
indicating that the brightness value is not overridden for this window
and normal brightness policy should be used.public static final float BRIGHTNESS_OVERRIDE_OFF
screenBrightness
and buttonBrightness
indicating that the screen or button backlight brightness should be set
to the lowest value when this window is in front.public static final float BRIGHTNESS_OVERRIDE_FULL
screenBrightness
and buttonBrightness
indicating that the screen or button backlight brightness should be set
to the hightest value when this window is in front.public float screenBrightness
public float buttonBrightness
public static final int ROTATION_ANIMATION_ROTATE
rotationAnimation
to define the animation used to
specify that this window will rotate in or out following a rotation.public static final int ROTATION_ANIMATION_CROSSFADE
rotationAnimation
to define the animation used to
specify that this window will fade in or out following a rotation.public static final int ROTATION_ANIMATION_JUMPCUT
rotationAnimation
to define the animation used to
specify that this window will immediately disappear or appear following
a rotation.public static final int ROTATION_ANIMATION_SEAMLESS
rotationAnimation
to specify seamless rotation mode.
This works like JUMPCUT but will fall back to CROSSFADE if rotation
can't be applied without pausing the screen.public int rotationAnimation
ROTATION_ANIMATION_ROTATE
behavior.public IBinder token
public String packageName
public int screenOrientation
ActivityInfo.screenOrientation
.
If not set, a default value of
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
will be used.@Deprecated public float preferredRefreshRate
preferredDisplayModeId
insteadpreferredDisplayModeId
is set.Display.getSupportedRefreshRates()
public int preferredDisplayModeId
This must be one of the supported modes obtained for the display(s) the window is on.
A value of 0
means no preference.
public int systemUiVisibility
View.STATUS_BAR_VISIBLE
,
View.STATUS_BAR_HIDDEN
public int subtreeSystemUiVisibility
public boolean hasSystemUiListeners
public static final int INPUT_FEATURE_DISABLE_POINTER_GESTURES
public static final int INPUT_FEATURE_NO_INPUT_CHANNEL
public static final int INPUT_FEATURE_DISABLE_USER_ACTIVITY
Should only be used by the keyguard and phone app.
public int inputFeatures
public long userActivityTimeout
This property can only be used to reduce the user specified display timeout; it can never make the timeout longer than it normally would be.
Should only be used by the keyguard and phone app.
public int accessibilityIdOfAnchor
public CharSequence accessibilityTitle
public long hideTimeoutMilliseconds
public static final Parcelable.Creator<WindowManager.LayoutParams> CREATOR
public static final int LAYOUT_CHANGED
public static final int TYPE_CHANGED
public static final int FLAGS_CHANGED
public static final int FORMAT_CHANGED
public static final int ANIMATION_CHANGED
public static final int DIM_AMOUNT_CHANGED
public static final int TITLE_CHANGED
public static final int ALPHA_CHANGED
public static final int MEMORY_TYPE_CHANGED
public static final int SOFT_INPUT_MODE_CHANGED
public static final int SCREEN_ORIENTATION_CHANGED
public static final int SCREEN_BRIGHTNESS_CHANGED
public static final int ROTATION_ANIMATION_CHANGED
public static final int BUTTON_BRIGHTNESS_CHANGED
public static final int SYSTEM_UI_VISIBILITY_CHANGED
public static final int SYSTEM_UI_LISTENER_CHANGED
public static final int INPUT_FEATURES_CHANGED
public static final int PRIVATE_FLAGS_CHANGED
public static final int USER_ACTIVITY_TIMEOUT_CHANGED
public static final int TRANSLUCENT_FLAGS_CHANGED
public static final int SURFACE_INSETS_CHANGED
public static final int PREFERRED_REFRESH_RATE_CHANGED
public static final int NEEDS_MENU_KEY_CHANGED
public static final int PREFERRED_DISPLAY_MODE_ID
public static final int ACCESSIBILITY_ANCHOR_CHANGED
public static final int ACCESSIBILITY_TITLE_CHANGED
public static final int EVERYTHING_CHANGED
public LayoutParams()
public LayoutParams(int _type)
public LayoutParams(int _type, int _flags)
public LayoutParams(int _type, int _flags, int _format)
public LayoutParams(int w, int h, int _type, int _flags, int _format)
public LayoutParams(int w, int h, int xpos, int ypos, int _type, int _flags, int _format)
public LayoutParams(Parcel in)
public static boolean mayUseInputMethod(int flags)
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.flags
- The current window manager flags.public final void setTitle(CharSequence title)
public final CharSequence getTitle()
public final void setSurfaceInsets(View view, boolean manual, boolean preservePrevious)
public final void setUserActivityTimeout(long timeout)
public final long getUserActivityTimeout()
public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel out, int parcelableFlags)
Parcelable
writeToParcel
in interface Parcelable
out
- The Parcel in which the object should be written.parcelableFlags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public final int copyFrom(WindowManager.LayoutParams o)
public String debug(String output)
ViewGroup.LayoutParams
debug
in class ViewGroup.LayoutParams
output
- the String to prepend to the internal representationpublic String toString()
Object
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())
public void scale(float scale)
protected void encodeProperties(ViewHierarchyEncoder encoder)
encodeProperties
in class ViewGroup.LayoutParams