I am doing such type of project ,In my project change Image color dynamically.
I have a one black shape color image ,when user click on this ima
Put this in your OnDraw, just before you draw your square.
if (userclicked){ paint.setColor(Color.GREEN); } else { paint.setColor(Color.BLACK); }
Of course that is if you are drawing it with canvas.drawRect(x0,y0,x1,y1,paint) which you would if you were drawing a simple shape like that.