Oh sorry I have actually used the tag properly.I just messed up while
copying the relevant code in the mail.

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 <http://r.id.name/>);

                convertView.setTag(holder);

>
> }else{
>      holder = (ViewHolder) convertView.getTag();
> }
> holder.position = position;
> String friendImage = myObj.get[position]
>                     .getUrl();
>             if (friendImage != null) {
>
>                 holder.Image.getImage(friendImage);
>             }



On Tue, Jun 9, 2009 at 11:46 AM, Romain Guy <[email protected]> wrote:

> You're not using the tag correctly. You have to set the tag when
> convertView == null and get the tag when convertView != null.
>
>
> On Mon, Jun 8, 2009 at 11:15 PM, 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);
>>             }
>>
>>
>>
>
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them
>
> >
>


-- 
Thanks and Regards
Gurudutt P.S.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to