Actually ,I was able to get to the root of the prob.The problem is that "getView" gets called multiple times(atleast 3 times) for each row by the Adapter.Because of which when I am running a thread for the image to get loaded from the network,I am getting unwanted results.This thread is being called multiple times and causing unwanted results.Is there any way to make sure that I call thread only once so that there are no unwanted results.Any ideas.
Thanks very much Guru On Tue, Jun 9, 2009 at 11:45 AM, Guru <[email protected]> wrote: > > I have a list view with images and some text items. The images are actually > URLs and are locally cached if the url is already displayed once.The problem > is the listview seems to change the image itself while rendering.I am very > sure that the caching mechanism of the url works fine. > > Is there anything that i am doing wrong .? > > if (convertView == null) { > LayoutInflater mInflater = LayoutInflater.from(this.context); > convertView = mInflater.inflate(resID, null); > holder = new ViewHolder(); > holder.Image= (WebImage) convertView > .findViewById(R.id.image); > holder.text= (TextView) convertView > .findViewById(R.id.name); > }else{ > convertView.setTag(holder); > } > holder.position = position; > String friendImage = myObj.get[position] > .getUrl(); > if (friendImage != null) { > > holder.mFriendImage.getImage(friendImage); > } > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

