代码中改变shape的颜色
2016-05-03 本文已影响69人
小相柳
android:background="@drawable/shape_daily_spike_bg_blue"
改变背景颜色可以这么做:
GradientDrawable bgShape = (GradientDrawable)mView.getBackground();
bgShape.setColor();
android:background="@drawable/shape_daily_spike_bg_blue"
改变背景颜色可以这么做:
GradientDrawable bgShape = (GradientDrawable)mView.getBackground();
bgShape.setColor();