Search...

Monday, February 27, 2012

How to set Bitmap images from a file stored inside a SD-Card in Android?


File imgFile = new  File(“/sdcard/Images/test_image.jpg”);

if(imgFile.exists()){


    Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());


    ImageView myImage = (ImageView) findViewById(R.id.imageviewTest);

    myImage.setImageBitmap(myBitmap);


}

No comments:

Post a Comment