我使用的是以下行来设置我的ImageView。
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);
但是,当我转动我的手机,ImageView的变成空白。 谁能帮我。 任何帮助是AP preciated。
But when I rotate my mobile, the imageView becomes blank. Can anyone help me. Any help is appreciated.
正确的方式是为保存位图 onRetainNonConfigurationInstance()
Proper way to it is to save the bitmap in onRetainNonConfigurationInstance()
下面是一个例子: http://developer.android.com/guide/topics/resources/runtime -changes.html