开发者

How to change selected background color of my image?

I want to change the selected background color of my image on touch开发者_StackOverflow中文版 event. Should i need to draw that image on canvas or it can be done by imageview only? Please help me


Have you tried viewid.setBackgroundResource (somecolor) to set the color? http://developer.android.com/reference/android/view/View.html#setBackgroundResource(int)

To set the background color on a canvas, do something like this: The first FF is the alpha value Paint p=new Paint(); p.setColor(0xFFFFFFFF); canvas.drawPaint(paint);

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜