public View getView(int arg0, View arg1, ViewGroup arg2) {
ImageView i = new ImageView(mContext);
try {
i.setImageBitmap(loadImage(imgPath[arg0]));
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
i.setLayoutParams(new Gallery.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
i.setScaleType(ImageView.ScaleType.FIT_XY);
return i;
}
private Bitmap loadImage(String url) throws MalformedURLException,
IOException {
Bitmap returnValue = null;
InputStream bmis;
bmis = new URL(url).openStream();
returnValue = BitmapFactory.decodeStream(bmis);
return returnValue;
}
주요 포인트는 위와 같습니다.
서버의 이미지 경로를 가지고 와서 비트맵으로 가지고와서 ImageView에 setImageBitmap으로 보여주는 형식입니다.
그런데 이게 이클립스 AVD에서는 잘 돌아가는데... 당췌 디바이스에 깔아서 실험을 하면 에러는 없는데 화면에 뿌려주지를 못하네요 ㅠ,.ㅜ
디바이스는 갤럭시 S 입니다 ㅠ,.ㅜ
원인을 알 수 있을까요??