Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

List container placeholders

The list container widget supports the use of placeholder list items.A placeholder is a simplified version of an item that is used instead of the list item and may provide better performance during a flick. For example, the placeholder for items with text and an image could be just the text without the image. Note that placeholders can only be used with a list container widget that uses a ListContainerModel as its model.

The use of placeholders is enabled with the LCF_PLACEHOLDERS flag, which is off by default. If placeholders are enabled and the scroll speed is below a certain threshold, the list container touch controller will request the placeholder version of the widget and data.

Placeholders are not normally required during flicks, but should be enabled when a list is running on a low end device or its items are unusually "heavy". An example of a "heavy" list item is one that is made up of several expensive images.

To improve performance, a list item may be simplified by stripping the images. An even simpler placeholder may render only its border and background color.

When the flick ends, and the list comes to a stop, the list container touch controller asynchronously replaces all the placeholder list items with the normal list items.