安卓代码修改shape颜色

android:topLeftRadius="8dp"

android:topRightRadius="8dp"

android:bottomLeftRadius="8dp"

android:bottomRightRadius="8dp"/>


android:color="#00000000"/>

用下面的方式修改shape的color的颜色值

GradientDrawable myGrad = (GradientDrawable)view.getBackground();

myGrad.setColor(color);

你可能感兴趣的:(安卓代码修改shape颜色)