I have a custom Listview, where each item contains a progressbar. But when the list contains many items, and I use the scrollbar to navigate through listview, some ProgressB
try to use a holder for your cell view
put this class at the end of your adapter
class ViewHolder {
TextView txtName,txtStatus;
ImageView imageView;
public ViewHolder(View convertview) {
txtName = (TextView) convertview.findViewById(R.id.txtName );
imageView = (ImageView) convertview.findViewById(R.id.ColImgPath);
//and so on...
}
}
replace:
if (convertView == null) {
convertView = inflater.inflate(R.layout.list_upload, null);
}
with:
if (convertview == null) {
convertview = activity.getLayoutInflater().inflate(R.layout.list_upload, null);
holder = new ViewHolder(convertview);
convertview.setTag(holder);
} else {
holder = (ViewHolder) convertview.getTag();
}
after that do your job with holder...
holder.imageView
instead of imageView and so on for all views