android 图片展示

public static void ShowPicture(String fileName, ImageView pic){

// Calling Convention
// ImageView pic=(ImageView)this.findViewById(R.id.picview);
// JBRoutines.ShowPicture(Constants.PICTURE_FILE,pic);

File f = new File(Environment.getExternalStorageDirectory(),fileName);
FileInputStream is = null;
try {
is = new FileInputStream(f);
} catch (FileNotFoundException e) {
Log.d(\"error: \",String.format( \"ShowPicture.java file[%s]Not Found\",fileName));
return;
}
Bitmap bm;
bm = BitmapFactory.decodeStream(is, null, null);
pic.setImageBitmap(bm);
}

你可能感兴趣的:(android,F#)