WindowManager.LayoutParams(五:changed)

来源:互联网 发布:class c语言 编辑:程序博客网 时间:2024/06/18 06:54

该系列主要用于 int copyFrom (WindowManager.LayoutParams o)函数中。
在函数中,首先将用参数中传入的WindowManager.LayoutParams的信息复制到本WindowManager.LayoutParams中,然后返回一个整数,以bite形式表示调用该函数后WindowManager.LayoutParams的哪些信息发送了变化

  1. ALPHA_CHANGED
    用于表示成员变量alpha是否被改变
  2. ANIMATION_CHANGED
    用于表示成员变量windowAnimations是否被改变
  3. DIM_AMOUNT_CHANGED
    用于表示成员变量dimAmount是否被改变
  4. FLAGS_CHANGED
    用于表示成员变量flags是否被改变
  5. LAYOUT_CHANGED
    用于表示layout是否被改变.这里的layout是指以下变量所包含的信息:
    width,height,x,y, verticalMargin,verticalWeight,horizontalMargin,horizontalWeight
  6. SCREEN_BRIGHTNESS_CHANGED
    用于表示brightness是否被改变.
    这里的brightness是指以下变量对应的信息:screenBrightness,buttonBrightness
  7. SCREEN_ORIENTATION_CHANGED
    用于表示成员变量screenOrientation是否被改变
  8. SOFT_INPUT_MODE_CHANGED
    用于表示成员变量softInputMode是否被改变
  9. TITLE_CHANGED
    用于表示成员变量title是否被改变
  10. TYPE_CHANGED
    用于表示成员变量type是否被改变
  11. FORMAT_CHANGED
    Constant Value: 8 (0x00000008)
    用于表示成员变量format是否被改变

成员变量
继承于ViewGroup.LayoutParams的成员变量
1. public int height:window的高
2. public int width:window的宽
自身的成员变量
3. public float alpha
An alpha value to apply to this entire window.
4. public float buttonBrightness
This can be used to override the standard behavior of the button and keyboard backlights.
5. public float dimAmount
When FLAG_DIM_BEHIND is set, this is the amount of dimming to apply.
6. public int flags
Various behavioral options/flags.
7. public int format
The desired bitmap format.
8. public int gravity
Placement of window within the screen as per Gravity.
9. public float horizontalMargin
The horizontal margin, as a percentage of the container’s width, between the container and the widget.
10. public float horizontalWeight
Indicates how much of the extra space will be allocated horizontally to the view associated with these LayoutParams.
11. public int memoryType
This field is deprecated. this is ignored
12. public String packageName
Name of the package owning this window.
13. public float screenBrightness
This can be used to override the user’s preferred brightness of the screen.
14. public int screenOrientation
Specific orientation value for a window.
15. public int softInputMode
Desired operating mode for any soft input area.
16. public int systemUiVisibility
Control the visibility of the status bar.
17. public IBinder token
Identifier for this window.
18. public int type
The general type of window.
19. public float verticalMargin
The vertical margin, as a percentage of the container’s height, between the container and the widget.
20. public float verticalWeight
Indicates how much of the extra space will be allocated vertically to the view associated with these LayoutParams.
21. public int windowAnimations
A style resource defining the animations to use for this window.
22. public int x
X position for this window.
23. public int y
Y position for this window.

成员函数

  1. final int copyFrom(WindowManager.LayoutParams o)
  2. String debug(String output)
    Returns a String representation of this set of layout parameters.
  3. int describeContents()
    Describe the kinds of special objects contained in this Parcelable’s marshalled representation.
  4. final CharSequence getTitle()
  5. 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.
  6. final void setTitle(CharSequence title)
  7. String toString()
    Returns a string containing a concise, human-readable description of this object.
  8. void writeToParcel(Parcel out, int parcelableFlags)
    Flatten this object in to a Parcel.
0 0
原创粉丝点击