Created
December 25, 2015 05:52
-
-
Save nisrulz/3078eaa6357d6f5c0051 to your computer and use it in GitHub Desktop.
Apply grayscale filter to ImageView in android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImageView imgview = (ImageView)findViewById(R.id.imageView_grayscale); | |
imgview.setImageBitmap(bitmap); | |
// Apply grayscale filter | |
ColorMatrix matrix = new ColorMatrix(); | |
matrix.setSaturation(0); | |
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrix); | |
imgview.setColorFilter(filter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have implement a simple
ProgressImageView
according to it, hope this will help you.