I'm trying to create a dynamical scrollable view. It will keep a list of elements downloaded from a server. This list could be thousands of elements. Because of this elements have to be downloaded to the list as it is scrolled downwards, and also should be deleted from the top of the list to keep memory usage low. I also need to be able to set different views as elements.
Would it be best to use a ScrollView or a ListView? And how would I go about adding elements to a list and keeping control of when to download more elemets?
I remember stumbling across an example or tutorial about how to do this. Especially about how to add elements as it is scrolled down, delete elements at the top, and create different xml views to use as elements. I cannot find this example tutorial now. It was something about how to reuse elements as they go out if scope when scrolled I think.
You should use a ListView, this is exactly what it is for and it does exactly what you describe. :)
See this for more info: http://www.google.com/events/io/2010/sessions/world-of-listview-android.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With