This code requires minSdkVersion of 16.
public class ViewUtils { public static void applyGrayFilter(ImageView imageView) { ColorMatrix matrix = new ColorMatrix(); matrix.setSaturation(0); //0 means grayscale ColorMatrixColorFilter cf = new ColorMatrixColorFilter(matrix); imageView.setColorFilter(cf); imageView.setImageAlpha(128); // 128 = 0.5 } public static void resetGrayFilter(ImageView imageView) { imageView.setColorFilter(null); imageView.setImageAlpha(255); } }