android - How to add a gradient to a colored ImageView icon? -
i'm showing icon dynamically set color.
question: how can add gradient icon? eg color set "end" color of gradient, , start color "lighter"?
definition:
<imageview android:id="@id+/someicon" android:src="@android:drawable/ic_btn_speak_now" />
color set:
imageview icon = (imageview) view.findviewbyid(r.id.someicon) icon.setcolorfilter(color.parsecolor("#ff0000"), porterduff.mode.src_atop);
android api 16.
Comments
Post a Comment