这个是看知乎的时候发现的一个问题,感觉挺有意思,就将自己遇到的坑记录下来。
1、Andorid L theme colorPrimary 不能使用带有alpha的颜色值,否则会有异常抛出, 直接判断了是否alpha是否等于0或者255,其他都会异常
@Override
protected void onApplyThemeResource(Resources.Theme theme, int resid,
boolean first) {
if (mParent == null) {
super.onApplyThemeResource(theme, resid, first);
} el