版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013474104/article/details/79002974
GradientDrawable myGrad = (GradientDrawable)view.getBackground();
myGrad.setColor(color);
http://stackoverflow.com/questions/16775891/how-to-change-solid-color-from-the-code