I am developing an application in which I have parsed Json of public facebook profile. I got String of imageurl and saved them into ArrayList and then implemented in listView. everything is going fine but sometimes my application is crashing by giving an error as "array index out of bound" or "memory space exception". unable to resolve this problem. help me out. thanks in advance.
I am attaching my 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;
}