ImageView becomes blank on Screen orientation change

后端 未结 3 496
野趣味
野趣味 2021-01-21 16:58

I am using the below line to set my ImageView.

    Bitmap bm = Media.getBitmap(getContentResolver(), capturedImage);
                    Bitmap bm1=Bitmap.creat         


        
3条回答
  •  梦毁少年i
    2021-01-21 17:46

    Proper way to it is to save the bitmap in onRetainNonConfigurationInstance()

    Here is an example: http://developer.android.com/guide/topics/resources/runtime-changes.html

提交回复
热议问题