What's the difference between windowBackground and background for activities style?

android:background is the background color (drawable to be precise) of a view component where as android:windowBackground is the background color of the window (activity or dialog) in which your view resides.


By default view's are transparent i.e no background color so visually it looks like they are taking the color from the underlying window.

Notice how the article you linked to mentions setting the windowBackground to null and not the background for fullscreen views.This is a common technique to avoid overdraws.

But the same principle can be applied to views if you have one view completely hide the other view.

自定义Theme中将android:windowBackground置为null,能小幅提升界面的绘制效率

更多相关文章

  1. [Android UI界面] android中仿iphone实现listview的反弹效果
  2. android中跳转系统自带的界面
  3. Android控件笔记——在界面中显示图片
  4. ktolin在Android中布局界面拼接
  5. android之简单的计算器样式界面
  6. Android 界面的横竖屏监听
  7. Android简单计算器界面实现
  8. Android Studio设置界面风格和字体大小
  9. android仿QQ的UI界面

随机推荐

  1. Android ANR 分析
  2. Android中可自由移动悬浮窗口的Demo
  3. Android(安卓)机型适配之百分比适配 Cons
  4. android 开发 简单的页面布局
  5. Android下按扭的使用方法
  6. Android获取statusBar和navigationBar高
  7. Android官方教程翻译(2)——运行第一个程序
  8. Android 关于显示键盘,布局错乱网上顶的问
  9. android登录简单窗口
  10. Android UISegmentedControl Fragment切