You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
发现问题了 Color.WHITE public static final int WHITE = 0xFFFFFFFF; 好像就是-1;
BACKGROUD("background") { @OverRide
public void apply(View view, String resName) {
Drawable drawable = getResourceManager().getDrawableByName(resName);
if (null!=drawable){
view.setBackgroundDrawable(drawable);
}else{
int color = getResourceManager().getColor(resName);
if(color==-1){
return ;
}
view.setBackgroundColor(color);
}
}
Activity
yilylong commentedon Dec 29, 2017
同上 遇见这个bug了只要颜色设置成了白色 ResourceManager. getColor() 就会返回-1 Resources.NotFoundException 郁闷了好久
yilylong commentedon Dec 29, 2017
发现问题了 Color.WHITE public static final int WHITE = 0xFFFFFFFF; 好像就是-1;
BACKGROUD("background") {
@OverRide
public void apply(View view, String resName) {
Drawable drawable = getResourceManager().getDrawableByName(resName);
if (null!=drawable){
view.setBackgroundDrawable(drawable);
}else{
int color = getResourceManager().getColor(resName);
if(color==-1){
return ;
}
view.setBackgroundColor(color);
}
}