简体   繁体   中英

How to load full size image to imageview

I try to build the simple "cameraIntet" and load the full size image from that camera to imageview, i build the same code like the example from the documentation (at full size image documentation) https://developer.android.com/training/camera/photobasics

And this js my onActivityResult code

  Override fun onActivityResult(...){
         Super.onActivityResults(...)
          If(requestCode == 1){
                val bitmap = BitmapFactory.decodeFile(currentPhotoPath)
                Img_imageview.setImageBitmap(bitmap)
           }
     }

And when i run the code and then take the picture, imageview just blank and not showing the picture,

So, how to show the full size image to imageview?

在此处输入图片说明在此处输入图片说明

您可能想尝试https://github.com/davemorrissey/subsampling-scale-image-view它可以处理非常大的图像。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM