How can you generate a Bitmap from an image to use with the Palette API? I tried imageView.getDrawable().getBitmap()
, but AS couldn't resolve getBitmap()
, so I checked the source code of Drawable
and this method doesn't seem to be there anymore.
I also set imageView.isDrawingCacheEnabled = true
, and then used imageView.drawingCache
, but that crashes the app with IllegalArguementException: Bitmap is not valid