Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.drawable.Drawable; import android.os.Environment; public class Main { public static Drawable getDrawableFromFile(String fileName) { Drawable d = Drawable.createFromPath(getAbsoluteFilePath(fileName)); return d; } public static String getAbsoluteFilePath(String fileName) { String filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + fileName; return filePath; } }