마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

서버의 이미지가 잘 로딩이 안됩니다

0 추천
 
try{
new AccumulateTask().execute(firstItemCount, firstItemCount,print_YN);
mTweetList.add(new RoomListItem(Address, RoomType, price, Content, ArticlePhoto1, Article_PK_ID));
mAdapter.notifyDataSetChanged();
}catch(Exception e){
 
}
 
class AccumulateTask extends AsyncTask<Integer, Integer, Integer> {
protected void onPreExecute() {
 
}
 
protected Integer doInBackground(Integer... params) {
      int id = params[0];
      int listPos = params[1];
        int pSw = params[2];
        try{
        String fileName = temp_imgpath[id];
       
        String imagePath =  fileName;
       
        BitmapFactory.Options resizeOpts = new Options();
        resizeOpts.inSampleSize = 5;
        resizeOpts.inJustDecodeBounds = false;
        resizeOpts.inPurgeable = true;
        InputStream is = new URL(imagePath).openStream();
        Bitmap bit = BitmapFactory.decodeStream(is,null, resizeOpts);
//     PensionListItem  Item = (PensionListItem)pensionItem.get(id);
    RoomListItem  Item = (RoomListItem)mTweetList.get(listPos);
 
    Item.setImageBitmap(bit);
 
   
    bit = null;
    is.close();
    bit.recycle();
    resizeOpts =  null;
    Item = null;
       
        }catch(Exception e){
        Log.i(null, "imageErr = "+listPos);
        }catch(OutOfMemoryError e){
       
        }
return 0;
}
   protected void onProgressUpdate(Integer... progress) {         
    //dialog.progressDialogClose();
   }
   
   protected void onPostExecute(Integer result) { 
   
   }
   
   protected void onCancelled() {
//dialog.progressDialogClose();
 
   }
 
}\
 
위와 같이 하면 10개중에서 1~2개는 불러오지를 못합니다
미치겟습니다
어떻게 해야하나요?
 
헨씀히포 (3,660 포인트) 님이 2014년 12월 5일 질문

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...