How to load an ImageView from a png file?

前端 未结 6 1152
独厮守ぢ
独厮守ぢ 2020-12-29 10:57

I take a picture with the camera using

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
startActivityForResult( intent, 22 );
<         


        
6条回答
  •  醉酒成梦
    2020-12-29 11:23

    Also possible:

    java.io.FileInputStream in = openFileInput("myfile.png");
    iv.setImageBitmap(BitmapFactory.decodeStream(in));
    

提交回复
热议问题