[android-developers] Inflate alloc a new View or reuse it

2011-04-01 Thread 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)

Re: [android-developers] Inflate alloc a new View or reuse it

2011-04-01 Thread Kostya Vasilyev
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

Re: [android-developers] Inflate alloc a new View or reuse it

2011-04-01 Thread Perla
Tjamla pedr0 pulsarpie...@gmail.com escribió: 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);