Created
August 28, 2014 16:25
-
-
Save parallelcross/bead6bb63c2f8ccb671b to your computer and use it in GitHub Desktop.
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
Bitmap bitmap = ((BitmapDrawable)viewHolder.productImage.getDrawable()).getBitmap(); | |
int [] colors = new int[1]; | |
colors[0] = bitmap.getPixel(0, 0); | |
Bitmap backgroundBitmap = Bitmap.createBitmap(colors, 1, 1, Bitmap.Config.ARGB_8888); | |
viewHolder.productImage.setBackgroundDrawable(new BitmapDrawable(backgroundBitmap)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment