I\'m working on an android application, and I have a drawable that I\'m loading up from a source image. On this image, I\'d like to convert all of the white pixels to a dif
This code snippet worked for me:
PorterDuffColorFilter porterDuffColorFilter = new PorterDuffColorFilter(getResources().getColor(R.color.your_color),PorterDuff.Mode.MULTIPLY); imgView.getDrawable().setColorFilter(porterDuffColorFilter); imgView.setBackgroundColor(Color.TRANSPARENT)