I am using the below line to set my ImageView.
Bitmap bm = Media.getBitmap(getContentResolver(), capturedImage);
Bitmap bm1=Bitmap.createScaledBitmap(bm, 300, 300,true);
pic.setImageBitmap(bm1);
But when I rotate my mobile, the imageView becomes blank. Can anyone help me. Any help is appreciated.