I have an application containing several lists. The list contains items consisting of images and text views.
All images have the size of thumbnails on the server, and the template used to upload them is as follows:
When the images on the SD card all work fine. But for the first time (or when using an application without an SD card), the images seem to fill in the wrong listviews lines when scrolling. When I stop scrolling, the problem is fixed automatically after a couple of seconds.
It almost looks like ImageView links are merged or something like that.
Any ideas?
I also include the getView method:
public View getView(int position, View convertView, ViewGroup parent) { ViewHolder vh; if (convertView == null) { convertView = inflater.inflate(R.layout.informationrow, null); vh = new ViewHolder(); vh.imageView = (ImageView) convertView.findViewById(R.id.rowInformationIcon); vh.textView = (TextView) convertView.findViewById(R.id.rowInformationTitleLine); convertView.setTag(vh); } else { vh = (ViewHolder) convertView.getTag(); } CustomCategory cc = items.get(position); if (cc != null) { vh.textView.setText(cc.get_name()); if (cc.getMediaUrl() != null) { _drawMgr.fetchDrawableOnThread(cc.getMediaUrl(), vh.imageView); vh.imageView.setBackgroundDrawable(getResources().getDrawable(R.drawable.imageframe)); } else { vh.imageView.setImageDrawable(getResources().getDrawable(R.drawable.trans4040)); vh.imageView.setBackgroundDrawable(null); } } return convertView; }
source share