Build 1.0_r1(from source)

android.view
Class WindowManager.LayoutParams

java.lang.Object
  extended by android.view.ViewGroup.LayoutParams
      extended by android.view.WindowManager.LayoutParams
All Implemented Interfaces:
Parcelable
Enclosing interface:
WindowManager

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


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.Creator<T>
 
Field Summary
 float alpha
          An alpha value to apply to this entire window.
static int ALPHA_CHANGED
           
static int ANIMATION_CHANGED
           
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 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_BLUR_BEHIND
          Window flag: blur everything behind this window.
static int FLAG_DIM_BEHIND
          Window flag: everything behind this window will be dimmed.
static int FLAG_DITHER
          Window flag: turn on dithering when compositing this window to the screen.
static int FLAG_FORCE_NOT_FULLSCREEN
          Window flag: Override {@link #FLAG_FULLSCREEN and force the screen decorations (such as status bar) to be shown.
static int FLAG_FULLSCREEN
          Window flag: Hide all screen decorations (e.g.
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_IN_SCREEN
          Window flag: place the window within the entire screen, ignoring decorations around the border (a.k.a.
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_NOT_FOCUSABLE
          Window flag: this window won't ever get focus.
static 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.
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: don't allow screen shots while this window is displayed.
static int FLAG_SYSTEM_ERROR
          Window flag: a special option intended for system dialogs.
static 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.
 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
 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 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
          Memory type: The window's surface is configured to be accessible by graphics accelerators.
static int MEMORY_TYPE_HARDWARE
          Memory type: The window's surface is configured to be accessible by DMA engines and hardware accelerators.
static int MEMORY_TYPE_NORMAL
          Memory type: The window's surface is allocated in main memory.
static int MEMORY_TYPE_PUSH_BUFFERS
          Memory type: The window's surface doesn't own its buffers and therefore cannot be locked.
 int memoryType
          Specifies what type of memory buffers should be used by this window.
 String packageName
          Name of the package owning this window.
static int TITLE_CHANGED
           
 IBinder token
          Identifier for this window.
 int type
          The general type of window.
static int TYPE_APPLICATION
          Window type: a normal application window.
static int TYPE_APPLICATION_MEDIA
          Window type: window for showing media (e.g.
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_CHANGED
           
static int TYPE_KEYGUARD
          Window type: keyguard window.
static int TYPE_KEYGUARD_DIALOG
          Window type: dialogs that the keyguard shows
static int TYPE_PHONE
          Window type: phone.
static int TYPE_PRIORITY_PHONE
          Window type: priority phone UI, which needs to be displayed even if the keyguard is active.
static int TYPE_SEARCH_BAR
          Window type: the search bar.
static int TYPE_STATUS_BAR
          Window type: the status bar.
static int TYPE_STATUS_BAR_PANEL
          Window type: panel that slides out from the status bar
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
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.
 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.
 
Fields inherited from class android.view.ViewGroup.LayoutParams
FILL_PARENT, height, layoutAnimationParameters, width, WRAP_CONTENT
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
WindowManager.LayoutParams()
           
WindowManager.LayoutParams(int _type)
           
WindowManager.LayoutParams(int _type, int _flags)
           
WindowManager.LayoutParams(int _type, int _flags, int _format)
           
WindowManager.LayoutParams(int w, int h, int _type, int _flags, int _format)
           
WindowManager.LayoutParams(int w, int h, int xpos, int ypos, int _type, int _flags, int _format)
           
WindowManager.LayoutParams(Parcel in)
           
 
Method Summary
 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's marshalled representation.
 CharSequence getTitle()
           
 void setTitle(CharSequence title)
           
 String toString()
          Returns a string containing a concise, human-readable description of the receiver.
 void writeToParcel(Parcel out, int parcelableFlags)
          Flatten this object in to a Parcel.
 
Methods inherited from class android.view.ViewGroup.LayoutParams
setBaseAttributes, sizeToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

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


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.


type

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

See Also:
TYPE_BASE_APPLICATION, TYPE_APPLICATION, TYPE_APPLICATION_STARTING, TYPE_APPLICATION_PANEL, TYPE_APPLICATION_MEDIA, TYPE_APPLICATION_SUB_PANEL, TYPE_STATUS_BAR, TYPE_SEARCH_BAR, TYPE_PHONE, TYPE_SYSTEM_ALERT, TYPE_KEYGUARD, TYPE_TOAST, TYPE_SYSTEM_OVERLAY, TYPE_PRIORITY_PHONE

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.

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.

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.

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

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.

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.

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.

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.

See Also:
Constant Field Values

TYPE_KEYGUARD

public static final int TYPE_KEYGUARD
Window type: keyguard window.

See Also:
Constant Field Values

TYPE_TOAST

public static final int TYPE_TOAST
Window type: transient notifications.

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.

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.

See Also:
Constant Field Values

TYPE_STATUS_BAR_PANEL

public static final int TYPE_STATUS_BAR_PANEL
Window type: panel that slides out from the status bar

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

See Also:
Constant Field Values

TYPE_KEYGUARD_DIALOG

public static final int TYPE_KEYGUARD_DIALOG
Window type: dialogs that the keyguard shows

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.

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

memoryType

public int memoryType
Specifies what type of memory buffers should be used by this window. Default is normal.

See Also:
MEMORY_TYPE_NORMAL, MEMORY_TYPE_HARDWARE, MEMORY_TYPE_GPU, MEMORY_TYPE_PUSH_BUFFERS

MEMORY_TYPE_NORMAL

public static final int MEMORY_TYPE_NORMAL
Memory type: The window's surface is allocated in main memory.

See Also:
Constant Field Values

MEMORY_TYPE_HARDWARE

public static final int MEMORY_TYPE_HARDWARE
Memory type: The window's surface is configured to be accessible by DMA engines and hardware accelerators.

See Also:
Constant Field Values

MEMORY_TYPE_GPU

public static final int MEMORY_TYPE_GPU
Memory type: The window's surface is configured to be accessible by graphics accelerators.

See Also:
Constant Field Values

MEMORY_TYPE_PUSH_BUFFERS

public static final int MEMORY_TYPE_PUSH_BUFFERS
Memory type: The window's surface doesn't own its buffers and therefore cannot be locked. Instead the buffers are pushed to it through native binder calls.

See Also:
Constant Field Values

flags

public int flags
Various behavioral options/flags. Default is none.

See Also:
FLAG_BLUR_BEHIND, FLAG_DIM_BEHIND, FLAG_NOT_FOCUSABLE, FLAG_NOT_TOUCHABLE, FLAG_NOT_TOUCH_MODAL, FLAG_LAYOUT_IN_SCREEN, FLAG_DITHER, FLAG_KEEP_SCREEN_ON, FLAG_FULLSCREEN, FLAG_FORCE_NOT_FULLSCREEN, FLAG_IGNORE_CHEEK_PRESSES

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

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

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

public static final int FLAG_DITHER
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: don't allow screen shots while this window is displayed.

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_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

gravity

public int gravity
Placement of window within the screen as per Gravity

See Also:
Gravity

horizontalMargin

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


verticalMargin

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


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.


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.


CREATOR

public static final Parcelable.Creator<WindowManager.LayoutParams> CREATOR

LAYOUT_CHANGED

public static final int LAYOUT_CHANGED
See Also:
Constant Field Values

TYPE_CHANGED

public static final int TYPE_CHANGED
See Also:
Constant Field Values

FLAGS_CHANGED

public static final int FLAGS_CHANGED
See Also:
Constant Field Values

FORMAT_CHANGED

public static final int FORMAT_CHANGED
See Also:
Constant Field Values

ANIMATION_CHANGED

public static final int ANIMATION_CHANGED
See Also:
Constant Field Values

DIM_AMOUNT_CHANGED

public static final int DIM_AMOUNT_CHANGED
See Also:
Constant Field Values

TITLE_CHANGED

public static final int TITLE_CHANGED
See Also:
Constant Field Values

ALPHA_CHANGED

public static final int ALPHA_CHANGED
See Also:
Constant Field Values

MEMORY_TYPE_CHANGED

public static final int MEMORY_TYPE_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

setTitle

public final void setTitle(CharSequence title)

getTitle

public final CharSequence getTitle()

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.

copyFrom

public final int copyFrom(WindowManager.LayoutParams o)

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 the receiver.

Overrides:
toString in class Object
Returns:
String a printable representation for the receiver.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature