Android/Summary
안드로이드 Uri를 가져와서 Bitmap으로 ImageView에 뿌리는 방법
gandus
2011. 6. 12. 16:43
// 선택한 이미지 경로 imgView로 뿌려줌
Uri url = data.getData();
ImageView imgView = (ImageView)findViewById(R.id.imgView);
try {
Bitmap bm = Images.Media.getBitmap(getContentResolver(), url);
imgView.setImageBitmap(bm);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}