[TIMOB-15102] Bubbling of events in listview items in newer android versions
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, listitem, onclick |
Reporter | Þórhallur Helgason |
Assignee | Unknown |
Created | 2013-09-04T11:26:24.000+0000 |
Updated | 2018-02-28T20:04:16.000+0000 |
Description
For some reason, and after upgrading Android to 4.x from 2.x, the itemclick event on ListView doesn't fire anymore. It works if you click on the very edge of the item, i.e. if you manage to click on the ListItem itself directly and not on any child items.
Our Alloy template is set up like this:
<Alloy>
<Window class="view" layout="vertical">
<ListView id="objectList">
<Templates>
<ItemTemplate name="file" height="50">
<ImageView bindId="image" class="image"/>
<Label bindId="name" class="filename text-and-image" />
<Label bindId="filesize" class="filesize text-and-image" />
<Label bindId="lastModified" class="lastModified" />
</ItemTemplate>
<ItemTemplate name="folder" height="50">
<ImageView bindId="image" class="folderImage"/>
<Label bindId="name" class="folder text-and-image" />
</ItemTemplate>
<ItemTemplate name="back" height="50">
<ImageView bindId="image" class="folderImage"/>
<Label bindId="name" class="folder text-and-image" />
</ItemTemplate>
</Templates>
<ListSection id="objectListSection" />
</ListView>
</Window>
</Alloy>
And then in our controller we have the following:
$.objectList.addEventListener('itemclick', function(e){
handleAction(e);
});
This works perfectly fine in iOS and in older versions of Android, but in 4.x, nothing...
Hello, can you please provide some logs? Best, Mauro