I have an ImageView. I am using imageView.setImageBitmap to set my image as background to ImageView. But it sets my image to ImageVi
ImageView
imageView.setImageBitmap
ImageVi
Try following code to set your own bitmap as background.
Bitmap bitmap = ...; ImageView imageView = ...; Drawable drawable = new BitmapDrawable(getResources(), bitmap); imageView.setBackground(drawable);