IT. Expert System.

Android Reference

WindowManager.LayoutParams


android.view

Class WindowManager.LayoutParams

    • Field Detail

      • y

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

        public 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.
      • verticalWeight

        public 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.
      • FIRST_APPLICATION_WINDOW

        public static final int FIRST_APPLICATION_WINDOW
        Start of window types that represent normal application windows.
        See Also:
        Constant Field Values
      • TYPE_BASE_APPLICATION

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_STARTING

        public static final 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.
        See Also:
        Constant Field Values
      • LAST_APPLICATION_WINDOW

        public static final int LAST_APPLICATION_WINDOW
        End of types of application windows.
        See Also:
        Constant Field Values
      • FIRST_SUB_WINDOW

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_PANEL

        public static final int TYPE_APPLICATION_PANEL
        Window type: a panel on top of an application window. These windows appear on top of their attached window.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_MEDIA

        public static final int TYPE_APPLICATION_MEDIA
        Window type: window for showing media (e.g. video). These windows are displayed behind their attached window.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_SUB_PANEL

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_ATTACHED_DIALOG

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_APPLICATION_MEDIA_OVERLAY

        public static final int TYPE_APPLICATION_MEDIA_OVERLAY
        Window type: window for showing overlays on top of media windows. These windows are displayed between TYPE_APPLICATION_MEDIA and the application window. They should be translucent to be useful. This is a big ugly hack so:
        See Also:
        Constant Field Values
      • LAST_SUB_WINDOW

        public static final int LAST_SUB_WINDOW
        End of types of sub-windows.
        See Also:
        Constant Field Values
      • FIRST_SYSTEM_WINDOW

        public static final int FIRST_SYSTEM_WINDOW
        Start of system-specific window types. These are not normally created by applications.
        See Also:
        Constant Field Values
      • TYPE_STATUS_BAR

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_SEARCH_BAR

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_PHONE

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_SYSTEM_ALERT

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_KEYGUARD

        public static final int TYPE_KEYGUARD
        Window type: keyguard window. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_TOAST

        public static final int TYPE_TOAST
        Window type: transient notifications. In multiuser systems shows only on the owning user's window.
        See Also:
        Constant Field Values
      • TYPE_SYSTEM_OVERLAY

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_PRIORITY_PHONE

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_SYSTEM_DIALOG

        public static final int TYPE_SYSTEM_DIALOG
        Window type: panel that slides out from the status bar In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_KEYGUARD_DIALOG

        public static final int TYPE_KEYGUARD_DIALOG
        Window type: dialogs that the keyguard shows In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_SYSTEM_ERROR

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_INPUT_METHOD

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_INPUT_METHOD_DIALOG

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_WALLPAPER

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_STATUS_BAR_PANEL

        public static final int TYPE_STATUS_BAR_PANEL
        Window type: panel that slides out from over the status bar In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_SECURE_SYSTEM_OVERLAY

        public static final int TYPE_SECURE_SYSTEM_OVERLAY
        Window type: secure 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. This is exactly like 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.
        See Also:
        Constant Field Values
      • TYPE_DRAG

        public static final int TYPE_DRAG
        Window type: the drag-and-drop pseudowindow. There is only one drag layer (at most), and it is placed on top of all other windows. In multiuser systems shows only on the owning user's window.
        See Also:
        Constant Field Values
      • TYPE_STATUS_BAR_SUB_PANEL

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_POINTER

        public static final int TYPE_POINTER
        Window type: (mouse) pointer In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_NAVIGATION_BAR

        public static final int TYPE_NAVIGATION_BAR
        Window type: Navigation bar (when distinct from status bar) In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_VOLUME_OVERLAY

        public static final int TYPE_VOLUME_OVERLAY
        Window type: The volume level overlay/dialog shown when the user changes the system volume. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_BOOT_PROGRESS

        public static final int TYPE_BOOT_PROGRESS
        Window type: The boot progress dialog, goes on top of everything in the world. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_HIDDEN_NAV_CONSUMER

        public static final int TYPE_HIDDEN_NAV_CONSUMER
        Window type: Fake window to consume touch events when the navigation bar is hidden. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_DREAM

        public static final int TYPE_DREAM
        Window type: Dreams (screen saver) window, just above keyguard. In multiuser systems shows only on the owning user's window.
        See Also:
        Constant Field Values
      • TYPE_NAVIGATION_BAR_PANEL

        public static final 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.
        See Also:
        Constant Field Values
      • TYPE_UNIVERSE_BACKGROUND

        public static final int TYPE_UNIVERSE_BACKGROUND
        Window type: Behind the universe of the real windows. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_DISPLAY_OVERLAY

        public static final int TYPE_DISPLAY_OVERLAY
        Window type: Display overlay window. Used to simulate secondary display devices. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_MAGNIFICATION_OVERLAY

        public static final int TYPE_MAGNIFICATION_OVERLAY
        Window type: Magnification overlay window. Used to highlight the magnified portion of a display when accessibility magnification is enabled. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • TYPE_RECENTS_OVERLAY

        public static final int TYPE_RECENTS_OVERLAY
        Window type: Recents. Same layer as TYPE_SYSTEM_DIALOG but only appears on one user's screen. In multiuser systems shows on all users' windows.
        See Also:
        Constant Field Values
      • LAST_SYSTEM_WINDOW

        public static final int LAST_SYSTEM_WINDOW
        End of types of system windows.
        See Also:
        Constant Field Values
      • MEMORY_TYPE_NORMAL

        @Deprecated
        public static final int MEMORY_TYPE_NORMAL
        Deprecated. this is ignored, this value is set automatically when needed.
        See Also:
        Constant Field Values
      • MEMORY_TYPE_HARDWARE

        @Deprecated
        public static final int MEMORY_TYPE_HARDWARE
        Deprecated. this is ignored, this value is set automatically when needed.
        See Also:
        Constant Field Values
      • MEMORY_TYPE_GPU

        @Deprecated
        public static final int MEMORY_TYPE_GPU
        Deprecated. this is ignored, this value is set automatically when needed.
        See Also:
        Constant Field Values
      • MEMORY_TYPE_PUSH_BUFFERS

        @Deprecated
        public static final int MEMORY_TYPE_PUSH_BUFFERS
        Deprecated. this is ignored, this value is set automatically when needed.
        See Also:
        Constant Field Values
      • memoryType

        @Deprecated
        public int memoryType
        Deprecated. this is ignored
      • FLAG_ALLOW_LOCK_WHILE_SCREEN_ON

        public static final 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
        See Also:
        Constant Field Values
      • FLAG_DIM_BEHIND

        public static final int FLAG_DIM_BEHIND
        Window flag: everything behind this window will be dimmed. Use dimAmount to control the amount of dim.
        See Also:
        Constant Field Values
      • FLAG_BLUR_BEHIND

        @Deprecated
        public static final int FLAG_BLUR_BEHIND
        Deprecated. Blurring is no longer supported.
        Window flag: blur everything behind this window.
        See Also:
        Constant Field Values
      • FLAG_NOT_FOCUSABLE

        public static final 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.

        See Also:
        Constant Field Values
      • FLAG_NOT_TOUCHABLE

        public static final int FLAG_NOT_TOUCHABLE
        Window flag: this window can never receive touch events.
        See Also:
        Constant Field Values
      • FLAG_NOT_TOUCH_MODAL

        public static final int FLAG_NOT_TOUCH_MODAL
        Window flag: Even when this window is focusable (its {@link #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.
        See Also:
        Constant Field Values
      • FLAG_TOUCHABLE_WHEN_WAKING

        public static final int FLAG_TOUCHABLE_WHEN_WAKING
        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.
        See Also:
        Constant Field Values
      • FLAG_KEEP_SCREEN_ON

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_LAYOUT_IN_SCREEN

        public static final int FLAG_LAYOUT_IN_SCREEN
        Window flag: place the window within the entire screen, ignoring decorations around the border (a.k.a. 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 Window.setFlags(int, int).
        See Also:
        Constant Field Values
      • FLAG_LAYOUT_NO_LIMITS

        public static final int FLAG_LAYOUT_NO_LIMITS
        Window flag: allow window to extend outside of the screen.
        See Also:
        Constant Field Values
      • FLAG_FULLSCREEN

        public static final int FLAG_FULLSCREEN
        Window flag: Hide all screen decorations (e.g. 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.
        See Also:
        Constant Field Values
      • FLAG_FORCE_NOT_FULLSCREEN

        public static final int FLAG_FORCE_NOT_FULLSCREEN
        Window flag: Override {@link #FLAG_FULLSCREEN and force the screen decorations (such as status bar) to be shown.
        See Also:
        Constant Field Values
      • FLAG_DITHER

        @Deprecated
        public static final int FLAG_DITHER
        Deprecated. This flag is no longer used.
        Window flag: turn on dithering when compositing this window to the screen.
        See Also:
        Constant Field Values
      • FLAG_SECURE

        public static final 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 Display.FLAG_SECURE for more details about secure surfaces and secure displays.

        See Also:
        Constant Field Values
      • FLAG_SCALED

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_IGNORE_CHEEK_PRESSES

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_LAYOUT_INSET_DECOR

        public static final 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 Window.setFlags(int, int).
        See Also:
        Constant Field Values
      • FLAG_ALT_FOCUSABLE_IM

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_WATCH_OUTSIDE_TOUCH

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_SHOW_WHEN_LOCKED

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_SHOW_WALLPAPER

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_TURN_SCREEN_ON

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_DISMISS_KEYGUARD

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_SPLIT_TOUCH

        public static final 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.
        See Also:
        Constant Field Values
      • FLAG_HARDWARE_ACCELERATED

        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.

        See Also:
        Constant Field Values
      • FLAG_SLIPPERY

        public static final 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. This flag changes the behavior of touch focus for this window only. Touches can slide out of the window but they cannot necessarily slide back in (unless the other window with touch focus permits it).
        See Also:
        Constant Field Values
      • FLAG_NEEDS_MENU_KEY

        public static final int FLAG_NEEDS_MENU_KEY
        Flag for a window belonging to an activity that responds to KeyEvent.KEYCODE_MENU and therefore needs a Menu key. For devices where Menu is a physical button this flag is ignored, but on devices where the Menu key is drawn in software it may be hidden unless this flag is set. (Note that Action Bars, when available, are the preferred way to offer additional functions otherwise accessed via an options menu.)
        See Also:
        Constant Field Values
      • FLAG_COMPATIBLE_WINDOW

        public static final int FLAG_COMPATIBLE_WINDOW
        Window flag: special flag to limit the size of the window to be original size ([320x480] x density). Used to create window for applications running under compatibility mode.
        See Also:
        Constant Field Values
      • FLAG_SYSTEM_ERROR

        public static final int FLAG_SYSTEM_ERROR
        Window flag: a special option intended for system dialogs. When this flag is set, the window will demand focus unconditionally when it is created.
        See Also:
        Constant Field Values
      • PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED

        public static final 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. This is used for the starting preview windows in the system process, which don't need to have the overhead of hardware acceleration (they are just a static rendering), but should be rendered as such to match the actual window of the app even if it is hardware accelerated. Even if the window isn't hardware accelerated, still do its rendering as if it was. Like 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.
        See Also:
        Constant Field Values
      • PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED

        public static final 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. If certain parts of the UI that really do want to use hardware acceleration, this flag can be set to force it. This is basically for the lock screen. Anyone else using it, you are probably wrong.
        See Also:
        Constant Field Values
      • PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS

        public static final int PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS
        By default, wallpapers are sent new offsets when the wallpaper is scrolled. Wallpapers may elect to skip these notifications if they are not doing anything productive with them (they do not affect the wallpaper scrolling operation) by calling WallpaperService.Engine.setOffsetNotificationsEnabled(boolean).
        See Also:
        Constant Field Values
      • PRIVATE_FLAG_SET_NEEDS_MENU_KEY

        public static final int PRIVATE_FLAG_SET_NEEDS_MENU_KEY
        This is set for a window that has explicitly specified its FLAG_NEEDS_MENU_KEY, so we know the value on this window is the appropriate one to use. If this is not set, we should look at windows behind it to determine the appropriate value.
        See Also:
        Constant Field Values
      • PRIVATE_FLAG_SHOW_FOR_ALL_USERS

        public static final 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. This overrides the default behavior of window types that normally only appear on the owning user's screen. Refer to each window type to determine its default behavior.
        See Also:
        Constant Field Values
      • privateFlags

        public int privateFlags
        Control flags that are private to the platform.
      • SOFT_INPUT_MASK_STATE

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_UNSPECIFIED

        public static final int SOFT_INPUT_STATE_UNSPECIFIED
        Visibility state for softInputMode: no state has been specified.
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_UNCHANGED

        public static final int SOFT_INPUT_STATE_UNCHANGED
        Visibility state for softInputMode: please don't change the state of the soft input area.
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_HIDDEN

        public static final 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).
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_ALWAYS_HIDDEN

        public static final int SOFT_INPUT_STATE_ALWAYS_HIDDEN
        Visibility state for softInputMode: please always hide any soft input area when this window receives focus.
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_VISIBLE

        public static final 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).
        See Also:
        Constant Field Values
      • SOFT_INPUT_STATE_ALWAYS_VISIBLE

        public static final int SOFT_INPUT_STATE_ALWAYS_VISIBLE
        Visibility state for softInputMode: please always make the soft input area visible when this window receives input focus.
        See Also:
        Constant Field Values
      • SOFT_INPUT_MASK_ADJUST

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_ADJUST_UNSPECIFIED

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_ADJUST_RESIZE

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_ADJUST_PAN

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_ADJUST_NOTHING

        public static final 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.
        See Also:
        Constant Field Values
      • SOFT_INPUT_IS_FORWARD_NAVIGATION

        public static final 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.
        See Also:
        Constant Field Values
      • horizontalMargin

        public 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.
      • verticalMargin

        public 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.
      • format

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

        public 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.
      • alpha

        public 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
      • dimAmount

        public 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.
      • BRIGHTNESS_OVERRIDE_NONE

        public static final 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.
        See Also:
        Constant Field Values
      • BRIGHTNESS_OVERRIDE_OFF

        public static final 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.
        See Also:
        Constant Field Values
      • BRIGHTNESS_OVERRIDE_FULL

        public static final 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.
        See Also:
        Constant Field Values
      • screenBrightness

        public 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.
      • buttonBrightness

        public 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.
      • token

        public IBinder token
        Identifier for this window. This will usually be filled in for you.
      • packageName

        public String packageName
        Name of the package owning this window.
      • subtreeSystemUiVisibility

        public int subtreeSystemUiVisibility
      • hasSystemUiListeners

        public boolean hasSystemUiListeners
        Get callbacks about the system ui visibility changing. TODO: Maybe there should be a bitfield of optional callbacks that we need.
      • INPUT_FEATURE_DISABLE_POINTER_GESTURES

        public static final int INPUT_FEATURE_DISABLE_POINTER_GESTURES
        When this window has focus, disable touch pad pointer gesture processing. The window will receive raw position updates from the touch pad instead of pointer movements and synthetic touch events.
        See Also:
        Constant Field Values
      • INPUT_FEATURE_NO_INPUT_CHANNEL

        public static final int INPUT_FEATURE_NO_INPUT_CHANNEL
        Does not construct an input channel for this window. The channel will therefore be incapable of receiving input.
        See Also:
        Constant Field Values
      • INPUT_FEATURE_DISABLE_USER_ACTIVITY

        public static final 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. Should only be used by the keyguard and phone app.

        Should only be used by the keyguard and phone app.

        See Also:
        Constant Field Values
      • userActivityTimeout

        public long userActivityTimeout
        Sets the number of milliseconds before the user activity timeout occurs when this window has focus. A value of -1 uses the standard timeout. A value of 0 uses the minimum support display timeout.

        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.

      • SCREEN_ORIENTATION_CHANGED

        public static final int SCREEN_ORIENTATION_CHANGED
        See Also:
        Constant Field Values
      • SCREEN_BRIGHTNESS_CHANGED

        public static final int SCREEN_BRIGHTNESS_CHANGED
        See Also:
        Constant Field Values
      • BUTTON_BRIGHTNESS_CHANGED

        public static final int BUTTON_BRIGHTNESS_CHANGED
        See Also:
        Constant Field Values
      • SYSTEM_UI_VISIBILITY_CHANGED

        public static final int SYSTEM_UI_VISIBILITY_CHANGED
        See Also:
        Constant Field Values
      • SYSTEM_UI_LISTENER_CHANGED

        public static final int SYSTEM_UI_LISTENER_CHANGED
        See Also:
        Constant Field Values
      • USER_ACTIVITY_TIMEOUT_CHANGED

        public static final int USER_ACTIVITY_TIMEOUT_CHANGED
        See Also:
        Constant Field Values
    • Constructor Detail

      • WindowManager.LayoutParams

        public WindowManager.LayoutParams()
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(int _type)
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(int _type,
                                  int _flags)
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(int _type,
                                  int _flags,
                                  int _format)
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(int w,
                                  int h,
                                  int _type,
                                  int _flags,
                                  int _format)
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(int w,
                                  int h,
                                  int xpos,
                                  int ypos,
                                  int _type,
                                  int _flags,
                                  int _format)
      • WindowManager.LayoutParams

        public WindowManager.LayoutParams(Parcel in)
    • Method Detail

      • mayUseInputMethod

        public 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. 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 - The current window manager flags.
        Returns:
        Returns true if such a window should be behind/interact with an input method, false if not.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.
      • writeToParcel

        public void writeToParcel(Parcel out,
                         int parcelableFlags)
        Description copied from interface: Parcelable
        Flatten this object in to a Parcel.
        Specified by:
        writeToParcel in interface Parcelable
        Parameters:
        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.
      • debug

        public String debug(String output)
        Description copied from class: ViewGroup.LayoutParams
        Returns a String representation of this set of layout parameters.
        Overrides:
        debug in class ViewGroup.LayoutParams
        Parameters:
        output - the String to prepend to the internal representation
        Returns:
        a String with the following format: output + "ViewGroup.LayoutParams={ width=WIDTH, height=HEIGHT }"
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • scale

        public void scale(float scale)
        Scale the layout params' coordinates and size.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1487 / . Delta: 0.13236 с