ScrollableView in ListView

Using ListView is all about mapping collection data structure to UI structure. What if we have a UI structure that have nested collection in a single ListItem, such as a ScrollableView? We have to make sure our data structure can map to the ScrollableView.views property.

News (data)

Ti.UI

previews[]

ScrollableView.views

title

Label.text

timestamp

Label.text

The solution: we have to create each child view when setting items to ListView. Here’s how: