Android--WindowManager.LayoutParams(下)
2013-12-09 10:40
134 查看
本文参照自:http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html
BRIGHTNESS系列
该系列主要用于设置window的brightness(screenBrightness/buttonBrightness)。我们可以通过WindowManager.LayoutParams的screenBrightness/buttonBrightness变量直接进行设置。
其中screenBrightness表示屏幕的brightness,而buttonBrightness表示一般按键和键盘按键的brightness
changed系列
该系列主要用于 int copyFrom (WindowManager.LayoutParams o)函数中。
在函数中,首先将用参数中传入的WindowManager.LayoutParams的信息复制到本WindowManager.LayoutParams中,然后返回一个整数,以bite形式表示调用该函数后WindowManager.LayoutParams的哪些信息发送了变化
成员变量
继承于ViewGroup.LayoutParams的成员变量
自身的成员变量
成员函数
结束!
BRIGHTNESS系列
该系列主要用于设置window的brightness(screenBrightness/buttonBrightness)。我们可以通过WindowManager.LayoutParams的screenBrightness/buttonBrightness变量直接进行设置。
其中screenBrightness表示屏幕的brightness,而buttonBrightness表示一般按键和键盘按键的brightness
float | BRIGHTNESS_OVERRIDE_FULL | Value for screenBrightnessand buttonBrightness indicating that the screen or button backlight brightness should be set to the hightest value when this window is in front. 把brightness(screenBrightness/buttonBrightness)设置到最高值。 |
float | BRIGHTNESS_OVERRIDE_NONE | Default value for screenBrightnessand buttonBrightnessindicating that the brightness value is not overridden for this window and normal brightness policy should be used. 不对brightness(screenBrightness/buttonBrightness)重新进行设置,采用默认的普通值。 |
float | BRIGHTNESS_OVERRIDE_OFF | Value for screenBrightnessand buttonBrightnessindicating that the screen or button backlight brightness should be set to the lowest value when this window is in front. 把brightness(screenBrightness/buttonBrightness)设置到最低值。 |
该系列主要用于 int copyFrom (WindowManager.LayoutParams o)函数中。
在函数中,首先将用参数中传入的WindowManager.LayoutParams的信息复制到本WindowManager.LayoutParams中,然后返回一个整数,以bite形式表示调用该函数后WindowManager.LayoutParams的哪些信息发送了变化
int | ALPHA_CHANGED | 用于表示成员变量alpha是否被改变 |
int | ANIMATION_CHANGED | 用于表示成员变量windowAnimations是否被改变 |
int | DIM_AMOUNT_CHANGED | 用于表示成员变量dimAmount是否被改变 |
int | FLAGS_CHANGED | 用于表示成员变量flags是否被改变 |
int | LAYOUT_CHANGED | 用于表示layout是否被改变.这里的layout是指以下变量所包含的信息: width,height,x,y, verticalMargin,verticalWeight,horizontalMargin,horizontalWeight |
int | SCREEN_BRIGHTNESS_CHANGED | 用于表示brightness是否被改变. 这里的brightness是指以下变量对应的信息:screenBrightness,buttonBrightness |
int | SCREEN_ORIENTATION_CHANGED | 用于表示成员变量screenOrientation是否被改变 |
int | SOFT_INPUT_MODE_CHANGED | 用于表示成员变量softInputMode是否被改变 |
int | TITLE_CHANGED | 用于表示成员变量title是否被改变 |
int | TYPE_CHANGED | 用于表示成员变量type是否被改变 |
int | FORMAT_CHANGED | Constant Value: 8 (0x00000008) 用于表示成员变量format是否被改变 |
继承于ViewGroup.LayoutParams的成员变量
public int | height | Information about how tall the view wants to be. |
public LayoutAnimationController.AnimationParameters | layoutAnimationParameters | Used to animate layouts. |
public int | width | Information about how wide the view wants to be. |
public static final Creator<WindowManager.LayoutParams> | CREATOR | |
public float | alpha | An alpha value to apply to this entire window. |
public float | buttonBrightness | This can be used to override the standard behavior of the button and keyboard backlights. |
public float | dimAmount | When FLAG_DIM_BEHINDis set, this is the amount of dimming to apply. |
public int | flags | Various behavioral options/flags. |
public int | format | The desired bitmap format. |
public int | gravity | Placement of window within the screen as per Gravity. |
public float | horizontalMargin | The horizontal margin, as a percentage of the container's width, between the container and the widget. |
public float | horizontalWeight | Indicates how much of the extra space will be allocated horizontally to the view associated with these LayoutParams. |
public int | memoryType | This field is deprecated. this is ignored |
public String | packageName | Name of the package owning this window. |
public float | screenBrightness | This can be used to override the user's preferred brightness of the screen. |
public int | screenOrientation | Specific orientation value for a window. |
public int | softInputMode | Desired operating mode for any soft input area. |
public int | systemUiVisibility | Control the visibility of the status bar. |
public IBinder | token | Identifier for this window. |
public int | type | The general type of window. |
public float | verticalMargin | The vertical margin, as a percentage of the container's height, between the container and the widget. |
public float | verticalWeight | Indicates how much of the extra space will be allocated vertically to the view associated with these LayoutParams. |
public int | windowAnimations | A style resource defining the animations to use for this window. |
public int | x | X position for this window. |
public int | y | Y position for this window. |
ublic Methods | |
---|---|
final int | copyFrom(WindowManager.LayoutParams o) |
String | debug(String output) Returns a String representation of this set of layout parameters. |
int | describeContents() Describe the kinds of special objects contained in this Parcelable's marshalled representation. |
final CharSequence | getTitle() |
static boolean | mayUseInputMethod(int flags) Given a particular set of window manager flags, determine whether such a window may be a target for an input method when it has focus. |
final void | setTitle(CharSequence title) |
String | toString() Returns a string containing a concise, human-readable description of this object. |
void | writeToParcel(Parcel out, int parcelableFlags) Flatten this object in to a Parcel. |
相关文章推荐
- Android中 Window 、WindowManager、WindowManager.LayoutParams 相关内容
- android学习----WindowManager.LayoutParams
- Android源码分析之WindowManager.LayoutParams属性更新过程
- android学习---- WindowManager.LayoutParams
- Android窗口机制(五)最终章:WindowManager.LayoutParams和Token以及其他窗口Dialog,Toast
- WindowManager.LayoutParams//android.view
- android.view.WindowManager.LayoutParams(上)
- android学习---- WindowManager.LayoutParams
- android学习---- WindowManager.LayoutParams
- Android 结合WindowManager和WindowManager.LayoutParams显示窗口及BACK/HOME按键监听
- Android--WindowManager.LayoutParams(上)
- Android 在窗口的最前端添加TextView--windowManager.addView(textView, layoutParams)
- Android的WindowManager.LayoutParams的多view和Toast的层布局
- 【转自Sina Blog】 android学习---- WindowManager.LayoutParams
- Android自定义可移动悬浮窗,WindowManager.LayoutParams一些属性介绍
- android学习----WindowManager.LayoutParams
- Android--WindowManager.LayoutParams(下)
- Android--WindowManager.LayoutParams(上)
- android学习---- WindowManager.LayoutParams
- Android WindowManager.LayoutParams知多少