Hi,
I'm making a small app and I'm trying to show datas in a listview, following the listviews overview documentation, but i always get this error :
[ERROR] : XMLModule: (KrollRuntimeThread) [12,14305] Error parsing XML [ERROR] : XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT {@1:2 in java.io.InputStreamReader@410333a8)Here's my js file :
var plainTemplate = { childTemplates: [ { type: 'Ti.UI.Label', // Use a label bindId: 'rowtitle', // Bind ID for this label properties: { // Sets the Label.left property left: '10dp' } } ] }; var communitiesItems = []; communitiesItems.push({ rowtitle : { text : "test"}, properties : { itemId: 'row0', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_NONE } }); var sectionCommunities = Ti.UI.createListSection({ // properties items: communitiesItems }); var listView = Ti.UI.createListView({ sections: [sectionCommunities], headerTitle: "Mes communautés", templates: { 'plain': plainTemplate }, defaultItemTemplate: 'plain' }); $.myCommunitiesWindow.add(listView);and my "mycommunities.xml" file :
<Alloy> <Window class="container" id="myCommunitiesWindow"> </Window> </Alloy>the "mycommunity" window is opened with :
var cont = Alloy.createController('mycommunities').getView(); cont.open();I don't understand the error. Am I making a mistake in the listview construction ?
Thx
Titanium 3.4, testing on an Android 4.0.4 phone