((ShapeDrawable) getBackground()).getPaint().setColor(getResources().getColor(colorRes));
今天遇见一个问题.在studio2.3编译时,colorRes报红,有错误的代码,如下@SuppressWarnings("deprecation")publicvoidsetBackgroundColor(intcolorRes){if(getBackground()instanceofShapeDrawable){finalResourcesres=getResources();((Shape