Given
ImageView image = R.findViewById(R.id.imageView); image.setImageBitmap(someBitmap);
Is it possible to retrieve the bitmap?
Bitmap bm=((BitmapDrawable)imageView. getDrawable()). getBitmap(); Try having the image in all drawable qualities folders (drawable-hdpi/drawable-ldpi etc.)
You can get Bitmap from Drawables via following code. ImageView image = (ImageView) findViewById(R. id. image); Bitmap b = BitmapFactory.
You can add ImageView and VideoView in RelativeLayout and set ImageView to invisible and VideoView to visible and vice-versa and you can play video on onClick.
Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With