서버에서 스티커를 가져와서 리스트뷰로 뿌려주고있는데
갤럭시 2에서 RejectedExecutionException이 발생하네요.
imageLoaderTask.execute(hm); 이 라인에서 발생하구요
imageLoader.execute(hm1);
전체 소스는
public void onPostExecute(SimpleAdapter adapter) {
// Setting adapter for the listview
length = adapter.getCount();
bitObject = new Bitmap[100];
bitBicObject = new Bitmap[100];
Log.i("HYY", "length-->" + length);
for (int i = 0; i < length; i++) {
HashMap<String, Object> hm = (HashMap<String, Object>) adapter
.getItem(i);
HashMap<String, Object> hm1 = (HashMap<String, Object>) adapter
.getItem(i);
String imgUrl = (String) hm.get("flag_path");
String imgBicUrl = (String) hm1.get("big_path");
ImageLoaderTask imageLoaderTask = new ImageLoaderTask();
ImageLoader imageLoader = new ImageLoader();
hm.put("flag_path", imgUrl);
hm.put("position", i);
hm1.put("big_path", imgBicUrl);
hm1.put("position", i);
imageLoaderTask.execute(hm);
imageLoader.execute(hm1);
}// end for
} // end onPostExecute
입니다.
// json 데이터를 다운로드할 새로운 비 UI 스래드 작업만들기
DownloadTask downloadTask = new DownloadTask();
Log.i("HYY", "2");
// 다운로드 프로세스를 시작
downloadTask.execute(strUrl);
Log.i("HYY", "3");
mHandler.post(new Runnable() {
@Override
public void run() {
mPhotoBitmap = BitmapFactory.decodeFile(path + imagename);
selctImage.setImageBitmap(mPhotoBitmap);
try {
Thread.sleep(500);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
쓰레드 슬립을 해주니깐 최신폰에서는 잘 돌아가는데 유독 갤럭시 2에서는 자꾸 팅기네요
선배님들의 힌트를 부탁합니다^^