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
Here's how I do this: It's pulling the color from a resource xml file.
#FFAAAAAA
In your activity .java file:
import android.graphics.PorterDuff.Mode;
Resources res = context.getResources();
final ImageView image = (ImageView) findViewById(R.id.imageId);
final int newColor = res.getColor(R.color.new_color);
image.setColorFilter(newColor, Mode.SRC_ATOP);
To clear it call:
image.setColorFilter(null);