String path = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "ww.jpg";
public Drawable stringToDrawable(String path){
FileInputStream input = null;
try {
input = new FileInputStream(new File(path));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
//先转换成bitmap
Bitmap bmp = BitmapFactory.decodeStream(input);
//再转换成drawable
@SuppressWarnings("deprecation")
Drawable drawable = new BitmapDrawable(bmp);
return drawable;
}