android - Reuse inflated views -


i building complex view based on dynamic data. depending on number of data elements in collections adding more views. each of these subviews complex , inflated in loop through data collection.

this of course inefficient , figure out way inflate subview once , reusing them instead. possible somehow?

ps: not want build subviews in code (i know could) because make things messier due complexities , number of subviews, if performance increase considerably might take @ that.

pps: there no visible performance problem traceview of time spent inflating , if can make faster love ;-)

you can check out google io session entitled 'the world of listview'.

it explains nicely how prevent inflating same view again , again, , how reuse particular view if has been inflated earlier.

here link.

http://www.google.com/events/io/2010/sessions/world-of-listview-android.html

you can either download .pdf file or view video.

hope helps.

regards, mahendra liya.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -