Description
When creating a ListView in a widget, it is not possible to add the templates as children of the widget.
Sample
The ListView is created as a Widget. XML code:
<Alloy>
<ListView id="list">
<ListSection>
<ListItem image:image="someimage.jpg" label:text="this is some text"/>
</ListSection>
</ListView>
</Alloy>
The Templates should be added in the index.xml:
<Alloy>
<Window>
<Widget src="listtemplate" defaultItemTemplate="template1">
<Templates>
<ItemTemplate name="template1" height="100">
<ImageView bindId="image" id="image"/>
<Label bindId="label" id="label1"/>
</ItemTemplate>
</Templates>
</Widget>
</Window>
</Alloy>
[~dcassenti] Can you please give us an example use case?
lib/customlist.js
index.xml
index.js
Closing, see ALOY-1102 for a solution