Search code examples
androidkotlincameraandroid-camera-intent

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?

enter image description hereenter image description here


Solution

  • You maybe want to try https://github.com/davemorrissey/subsampling-scale-image-view It can handle very large images.