The ListView item template only supports a limited set of view classes from the Ti.UI namespace. In addition to using one of the predefined view classes, you should be able to also pass module views to your list item template. For example, use ImageView on AvImageview module in your list view:
where <ImageView ns="AvImageview"> will be expanded into type: 'AvImageview.ImageView' in ListView ItemTemplate. In this case ListView should call AxImageview.createImageView behind the scenes eventually.
We also need support for Alloy Widget tag like below.
In this case <Widget src="test.widget"> will be expanded into type: 'test.widget' in ListView ItemTemplate. In this case ListView should create Alloy widget test.widget behind the scenes eventually.
So, ListView should search template class in following order:
- If there's a class in global namespace such as Ti.UI.View, use [namespace].create[Classname] function such as Ti.UI.createView.
- If there's a CommonJS module with given name, require it and then use its getView function.
- If there's a Alloy widget with given name, require Resources/windows/alloy/widgets/WIDGET_NAME/controllers/widget.js and then use its getView function