EF's Blog

Android Tutorial : Set ImageView file from SD Card

Posted on: July 31, 2012

Bitmap bmp = BitmapFactory.decodeFile(Environment.getExternalStorageDirectory()
+ strStoragePath+strLocalFileName+strJPGext);
ivThumbnailPlaceHolder.setImageBitmap(bmp);

That is the code.

This “Environment.getExternalStorageDirectory()+ strStoragePath+strLocalFileName+strJPGext” actually meant the file path, for example : “mnt/sdcard/yourfolder/blabla.jpg”.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

EF’s Blog

I'm just ordinary people who lived in an extra-ordinary world.

EF's Blog Stats

  • 126,564 hits
July 2012
M T W T F S S
« May   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives

%d bloggers like this: