파일 네임 받아와서 이미지 뷰에 뿌려주는 형식인데 정작 뷰상에는 아무것도 안나옵니다.ㅠ
private final int imgWidth = 480;
private final int imgHeight = 800;
String Filename;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.photo_preview);
loadFileName();
/** 전송메시지 */
String imgPath = Filename+".jpg";
/** 완성된 이미지 보여주기 */
Log.i(imgPath, Filename);
BitmapFactory.Options bfo = new BitmapFactory.Options();
bfo.inSampleSize = 2;
ImageView iv = (ImageView)findViewById(R.id.photo);
Bitmap bm = BitmapFactory.decodeFile(imgPath, bfo);
iv.setImageBitmap(bm);
}
public void loadFileName() {
try {
File myFile = new File("/data/data/패키지명/fileName.txt");
FileInputStream fIn = new FileInputStream(myFile);
BufferedReader myReader = new BufferedReader(
new InputStreamReader(fIn));
String aDataRow = "";
String aBuffer = "";
while ((aDataRow = myReader.readLine()) != null) {
aBuffer += aDataRow;
}
Filename = aBuffer;
myReader.close();
} catch (Exception e) {
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}
}




imgPath 가 올바른지확인해보세요