So, is it working now? 01.04.2011 12:28 пользователь "pedr0" <[email protected]> написал: > I am so sorry for the mistake, problem happen during THIS PIECE OF > CODE > > for(int i = 0; i < poi.getCommenti().size();i++){ > item = poi.getCommenti().get(i); > commento = li.inflate(R.layout.commento, null); > commento_data = (TextView) > commento.findViewById(R.id.commento_data); > commento_descrizione =(TextView) > commento.findViewById(R.id.commento_descrizione); > commento_name = (TextView) > commento.findViewById(R.id.commento_nome); > commento_foto = (ImageView) > commento.findViewById(R.id.commento_foto); > Log.d(TAG, "commento_foto:"+commento_foto); > commento_data.setText(item.getData()); > commento_descrizione.setText(item.getTesto()); > commento_name.setText(item.getUtente().getName()); > contenitore_commenti.addView(commento); > image[i] = new ImageViewURL(commento_foto, > item.getAnteprimaURL()); > } > > // I start only one thread for all images > thread_image_commenti = new ImageThreadURL(this); > thread_image_commenti.execute(image); > > On 1 Apr, 10:09, Kostya Vasilyev <[email protected]> wrote: >> li.inflate(R.layout.commento, null); >> >> gives you a new view object hierarchy each time. >> >> The rest is... probably bugs in your code. >> >> I see that you do >> >> new ImageViewURL(commento_foto,item.getAnteprimaURL() >> >> twice for each "commento" item. Doesn't seem right to me. >> >> -- Kostya >> >> 01.04.2011 11:49, pedr0 пишет: >> >> >> >> >> >> >> >> >> >> > Hi, >> >> > I am a little bit confused about this piece of code : >> >> > for(int i = 0; i< poi.getCommenti().size();i++){ >> > item = poi.getCommenti().get(i); >> > commento = li.inflate(R.layout.commento, null); >> > commento_data = (TextView) >> > commento.findViewById(R.id.commento_data); >> > commento_descrizione =(TextView) >> > commento.findViewById(R.id.commento_descrizione); >> > commento_name = (TextView) >> > commento.findViewById(R.id.commento_nome); >> > commento_foto = (ImageView) >> > commento.findViewById(R.id.commento_foto); >> > commento_data.setText(item.getData()); >> > commento_descrizione.setText(item.getTesto()); >> > commento_name.setText(item.getUtente().getName()); >> > contenitore_commenti.addView(commento); // contenitore_commenti is >> > an LinearLayout >> > image[i] = new ImageViewURL(commento_foto, item.getAnteprimaURL()); >> > thread_image_commenti = new >> > ImageThreadURL(this); >> > thread_image_commenti.execute(new ImageViewURL(commento_foto, >> > item.getAnteprimaURL())); >> >> > } >> >> > thread image is a simple thread which do a download of an image and >> > take 2 param: >> >> > 1) an ImageView where thread call setImage(Bitmap) >> >> > 2) an String representing an URL (for download image) >> >> > The problem is that I can see all my photo flicker when a single image >> > is downloaded and all photo have the same image (URL are not the >> > same). >> >> > This is the right way ? Inflate a NEW view for each element create a >> > NEW VIEW OBJECT for each iteration or them are the same object ? >> >> > What's wrong? >> >> > Thanks a lot in advance. >> >> > pedr0 >> >> > -- >> > undefined >> >> -- >> Kostya Vasilyev --http://kmansoft.wordpress.com > > -- > undefinedI a > > -- > 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
-- 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

