代码中改变shape的颜色

2016-05-03  本文已影响69人  小相柳

android:background="@drawable/shape_daily_spike_bg_blue"

改变背景颜色可以这么做:

GradientDrawable bgShape = (GradientDrawable)mView.getBackground();

bgShape.setColor();

上一篇下一篇

猜你喜欢

热点阅读