Android examples for Graphics:Drawable Filter
set Image Drawable Filter
//package com.java2s; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.widget.ImageView; public class Main { public static void setImageDrawableFilter(ImageView imageView, int color) { if (null != imageView) { setDrawableFilter(imageView.getDrawable(), color); }//from w ww . j av a 2s . c om } public static void setDrawableFilter(Drawable drawable, int color) { if (null != drawable) { drawable.setColorFilter(color, PorterDuff.Mode.MULTIPLY); } } }