java - ListView Adapter with many different Views -
This question is more about efficiency than any error, because I have created it in many different ways And as every strategy I have not enabled has its own drawbacks.
So my requirement is that I have a ListView with an unknown, but possibly very large (tens of tens), the amount of data. As I have drawn in the data, I need to sort the incoming items according to the two days of that day, as well as a part of the game's diversity. E.g. List items 1 day Header games 1 items Games 2 items items items list items 2 date header games x etc ...
Since each Each game can contain different games per item in the list item, I use the adapter to create a smooth scrolling effect (or no way yet) to reuse the sequences efficiently can do.
So whatever I have tried, it is:
-
Increasing one container layout, and then increasing the game within the adapter / The getView () method is called evolving clearly, every time it is called, it is heavy on the system and does not allow a smooth experience along with a small amount of data. However, regardless of the amount of data in the catalog, katpsi is very consistent.
-
Make all the scenes before adding to the list view, and get the getView () method of the adapter just back to the pre-built view it works very well with small quantities of data Does, but more data is added as it starts shaving down.
My question is, is there a way to either optimize the strategy?
It seems that you can be called some holder pattern.
It looks like a good tutorial:
Vogela also touches the subject here:
To avoid enabling scrolling through all the lists , You can also add adding, as this library can help:
Comments
Post a Comment