Android examples for Graphics:Image File
set Image By Path
//package com.java2s; import android.graphics.*; import android.util.Log; import android.widget.ImageView; import java.io.File; public class Main { private static final String TAG = "BitmapCustomUtils"; public static void setImageByPath(String filePath, ImageView profilePicImageView) { try {//from www. j a va2 s . co m File imgFile = new File(filePath); if (imgFile.exists()) { Bitmap myBitmap = BitmapFactory.decodeFile(imgFile .getAbsolutePath()); profilePicImageView.setImageBitmap(myBitmap); } } catch (Exception e) { Log.e(TAG, "error - " + e.getMessage()); } } }