Taken from the Appcelerator's own documentation:
<Alloy> <Window class="container"> <ListView id="listView" defaultItemTemplate="template" onClick="test"> <!-- The Templates tag sets the ListView's templates property --> <Templates> <!-- Define your item templates within the Templates tags or use the Require tag to include a view that only contains an ItemTemplate --> <ItemTemplate name="template"> <ImageView bindId="pic" id="icon" /> <Label bindId="info" id="title" /> <Label bindId="es_info" id="subtitle" /> </ItemTemplate> </Templates> <ListSection headerTitle="Fruit / Frutas"> <!-- You can specify any ListItem or ListDataItem properties in ListItem --> <!-- Specify data to bind to the item template with inline attributes defined as <bindId>:<Ti.UI.Component.property> --> <ListItem info:text="Apple" es_info:text="Manzana" pic:image="/apple.png" /> <ListItem info:text="Banana" es_info:text="Banana" pic:image="/banana.png" /> </ListSection> <ListSection headerTitle="Vegetables / Verduras"> <ListItem info:text="Carrot" es_info:text="Zanahoria" pic:image="/carrot.png" /> <ListItem info:text="Potato" es_info:text="Patata" pic:image="/potato.png" /> </ListSection> <ListSection headerTitle="Grains / Granos"> <ListItem info:text="Corn" es_info:text="Maiz" pic:image="/corn.png" /> <ListItem info:text="Rice" es_info:text="Arroz" pic:image="/rice.png" /> </ListSection> </ListView> </Window> </Alloy>and in the .js file:
$.listView.addEventListener('touchstart', function(){ console.log('got it') }) $.index.open();Many events including: touchstart, touchmove, touchend, touchcancel, click, dbclick are not working. The "Swipe" event works but based on the documentation it is supposed to support "up" and "down" direction as well as "left" and "right". However, it only supports "left" & "right".
Am I missing anything here or is it a bug? (using Alloy 1.3.0 (tested with the stable version too and same results), SDK: 3.1.3GA (as well 3.2.0 nightly builds).