We are building an app for Android Tablet that has one feature where it has rows of horizonal scrollviews. Think of it as a ListView and each item in the ListView is a HorizontalScrollView. As a side note, this is the design that we have no influence of to change and the one that makes sense for the UX of the app.
In each of this horizonal scrollview, there will be list of images that span horizontally. Now the thing is the number of images in each horizontal scrollview can be large (between 100-500 images each row) and we are planning to lazy load them by loading 25 at a time and as the user scrolling towards the end, we will load more images
Now the two options that I am considering are the following :
Very likely we are going use ListView combined with the Horizontal List View pointed out by this SO Question (we took the two options we had Gallery and HorizontalScrollView as we don't like the center locking feature of the Gallery and HorizontalScrollView doesn't have the feature that AdapterView has)
Use WebView and build this HorizontalScrollView via HTML using Javascript Library for touch devices such as Sencha or JQTouch
Now since potentially we are going to load tons of images, I am thinking that we are going to be susceptible to the dreaded OutOfMemoryException. My question are:
- "Based on your experience, which one of the two approaches is more memory efficient and why?"
- Does HTML elements and interactions in WebView use the allocated heap memory or does it have its own space and memory management?
Any pointer, hints and links that would lead to the answer is much appreciated.