android:windowBackground 和 Android:background 的区别

通过问别人,我知道了android:windowBackground 和 Android:background的区别

android:windowBackground 一般用于activity启动的时候,默认的那个背景图。
如果你不设置这个属性,那么你的应用启动的时候,会白屏一段时间。看名称也知道,window的背景。

android:background 就是这个控件的背景。就像你的textView… 等等

注意:
如果你在某个activity里面设置了theme,theme里面包含android:background那么,他就会影响你的dialog的背景。你会发现,你的dialog 的title,message,button都有了背景。坑了我两天。

这里写图片描述

原文地址:https://www.cnblogs.com/caoxinyu/p/10568584.html