可能性の重複:
Show Image View from file path in android?convertion
ここに画像のパスは、私がしたい文字列として保存された画像に文字列を変換し、どのようにエミュレータで画像を表示する必要がありますこれは可能ですか?私
おかげ
可能性の重複:
Show Image View from file path in android?convertion
ここに画像のパスは、私がしたい文字列として保存された画像に文字列を変換し、どのようにエミュレータで画像を表示する必要がありますこれは可能ですか?私
おかげ
ImageViewを使用し、資源としてあなたの文字列を追加を教えてください。 mImagePath
を想定し
Bitmap bm = BitmapFactory.decodeFile(mImagePath);
ImageView image = (ImageView) findViewById(R.id.image_view);
image.setImageBitmap(bm);
は、あなたのパスが含まれており、R.id.image_view
はあなたのレイアウトのImageViewののID文字列です。
幸運を祈る!
answerが役立ちます。その回答から:
File imgFile = new File(“/sdcard/Images/test_image.jpg”);
if(imgFile.exists()){
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile);
ImageView myImage = (ImageView) findViewById(R.id.imageviewTest);
myImage.setImageBitmap(myBitmap);
}
重複:http://stackoverflow.com/questions/4181774/show-image-view-from-file-path-in-android –