Open parmarkamlesh opened 3 years ago
When i set src to drawable it throw exception cant cast drawable to bitmap
You can convert the drawable into a bitmap: Bitmap myBitmap = ((BitmapDrawable) ResourcesCompat.getDrawable(context.getResources(), R.drawable.my_drawable, null)).getBitmap();
Bitmap myBitmap = ((BitmapDrawable) ResourcesCompat.getDrawable(context.getResources(), R.drawable.my_drawable, null)).getBitmap();
When i set src to drawable it throw exception cant cast drawable to bitmap