fitsSystemWindow作用

来源:互联网 发布:win32多线程编程实例 编辑:程序博客网 时间:2024/05/16 23:59

layout属性

 

英文文档注释为:
Boolean internal attribute to adjust view layout based on system windows such as the status bar. If true, adjusts the padding of this >view to leave space for the system windows. Will only take effect if this view is in a non-embedded activity.

 

经过具体实验,具体的作用就是你的contentview是否忽略actionbar,title,屏幕的底部虚拟按键,将整个屏幕当作可用的空间。
正常情况,contentview可用的空间是去除了actionbar,title,底部按键的空间后剩余的可用区域;这个属性设置为true,则忽略,false则不忽略

效果如下:

设置为true

设置为false

0 0