注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

民主与科学

独立之人格,自由之思想

 
 
 

日志

 
 

WindowManager.LayoutParams(下)  

2011-08-07 08:08:54|  分类: Android基础 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
本文参照自:http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html
BRIGHTNESS系列
该系列主要用于设置window的brightness(screenBrightness/buttonBrightness)我们可以通过WindowManager.LayoutParamsscreenBrightness/buttonBrightness变量直接进行设置。
其中screenBrightness表示屏幕的brightness,而buttonBrightness表示一般按键和键盘按键的brightness
floatBRIGHTNESS_OVERRIDE_FULLValue 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.
brightness(screenBrightness/buttonBrightness)设置到最高值。
floatBRIGHTNESS_OVERRIDE_NONEDefault value for screenBrightness and buttonBrightness indicating that the brightness value is not overridden for this window and normal brightness policy should be used.
不对brightness(screenBrightness/buttonBrightness)重新进行设置,采用默认的普通值。
floatBRIGHTNESS_OVERRIDE_OFFValue 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.
brightness(screenBrightness/buttonBrightness)设置到最低值。
changed系列
该系列主要用于 int copyFrom (WindowManager.LayoutParams o)函数中。
在函数中,首先将用参数中传入的WindowManager.LayoutParams的信息复制到本WindowManager.LayoutParams,然后返回一个整数,以bite形式表示调用该函数后WindowManager.LayoutParams的哪些信息发送了变化
intALPHA_CHANGED用于表示成员变量alpha是否被改变
intANIMATION_CHANGED用于表示成员变量windowAnimations是否被改变
intDIM_AMOUNT_CHANGED用于表示成员变量dimAmount是否被改变
intFLAGS_CHANGED用于表示成员变量flags是否被改变
intLAYOUT_CHANGED用于表示layout是否被改变.这里的layout是指以下变量所包含的信息:
width,height,x,y, verticalMargin,verticalWeight,horizontalMargin,horizontalWeight
intSCREEN_BRIGHTNESS_CHANGED用于表示brightness是否被改变.
这里的
brightness是指以下变量对应的信息:screenBrightness,buttonBrightness
intSCREEN_ORIENTATION_CHANGED用于表示成员变量screenOrientation是否被改变
intSOFT_INPUT_MODE_CHANGED用于表示成员变量softInputMode是否被改变
intTITLE_CHANGED用于表示成员变量title是否被改变
intTYPE_CHANGED用于表示成员变量type是否被改变
intFORMAT_CHANGEDConstant Value: 8 (0x00000008)
用于表示成员变量format是否被改变
成员变量
继承于ViewGroup.LayoutParams的成员变量
public intheightInformation about how tall the view wants to be.
public LayoutAnimationController.AnimationParameterslayoutAnimationParametersUsed to animate layouts.
public intwidthInformation about how wide the view wants to be.
自身的成员变量
public static final Creator<WindowManager.LayoutParams>CREATOR
public floatalphaAn alpha value to apply to this entire window.
public floatbuttonBrightnessThis can be used to override the standard behavior of the button and keyboard backlights.
public floatdimAmountWhen FLAG_DIM_BEHIND is set, this is the amount of dimming to apply.
public intflagsVarious behavioral options/flags.
public intformatThe desired bitmap format.
public intgravityPlacement of window within the screen as per Gravity.
public floathorizontalMarginThe horizontal margin, as a percentage of the container's width, between the container and the widget.
public floathorizontalWeightIndicates how much of the extra space will be allocated horizontally to the view associated with these LayoutParams.
public intmemoryTypeThis field is deprecated. this is ignored
public StringpackageNameName of the package owning this window.
public floatscreenBrightnessThis can be used to override the user's preferred brightness of the screen.
public intscreenOrientationSpecific orientation value for a window.
public intsoftInputModeDesired operating mode for any soft input area.
public intsystemUiVisibilityControl the visibility of the status bar.
public IBindertokenIdentifier for this window.
public inttypeThe general type of window.
public floatverticalMarginThe vertical margin, as a percentage of the container's height, between the container and the widget.
public floatverticalWeightIndicates how much of the extra space will be allocated vertically to the view associated with these LayoutParams.
public intwindowAnimationsA style resource defining the animations to use for this window.
public intxX position for this window.
public intyY position for this window.
成员函数
ublic Methods
final intcopyFrom(WindowManager.LayoutParams o)
Stringdebug(String output)
Returns a String representation of this set of layout parameters.
intdescribeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
final CharSequencegetTitle()
static booleanmayUseInputMethod(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 voidsetTitle(CharSequence title)
StringtoString()
Returns a string containing a concise, human-readable description of this object.
voidwriteToParcel(Parcel out, int parcelableFlags)
Flatten this object in to a Parcel.
结束!
  评论这张
 
阅读(5917)| 评论(1)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017