android - index out of bound exception in arraylist -


i developing application in have parsed json of public facebook profile. got string of imageurl , saved them arraylist , implemented in listview. going fine application crashing giving error "array index out of bound" or "memory space exception". unable resolve problem. me out. in advance.

i attaching code also.

@override public view getview(int position, view convertview, viewgroup parent) {     view row = view.inflate(socialactivity.this, r.layout.facebook_row, null);     imageview iv_user = (imageview)row.findviewbyid(r.id.iv_user_pic);     textview tv_title, tv_description, tv_time;     tv_title = (textview)row.findviewbyid(r.id.tv_title);     tv_description = (textview)row.findviewbyid(r.id.tv_discription);     tv_time = (textview)row.findviewbyid(r.id.tv_time);     button btn_count = (button)row.findviewbyid(r.id.btn_arrow);     //bitmap = downloadimage(aljson.get(position).strpicurl);     tv_title.settext(aljson.get(position).strname);     tv_description.settext(aljson.get(position).strmessage);     tv_time.settext(aljson.get(position).strdate);     btn_count.settext(aljson.get(position).strcount);     if((aljson.get(position).strpicurl).equals(null){         iv_user.setbackgroundresource(r.drawable.contact_img);     } else{         iv_user.setimagebitmap(al_bitmap.get(position));     }     return row; } 

make sure aljson.size() not 0
, try logging aljson.size() , position see if there's wrong these values


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -