[TIMOB-14902] Android: ListView itemclick event broken in 3.1.2.GA
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-08-17T01:34:57.000+0000 |
Affected Version/s | Release 3.1.2 |
Fix Version/s | 2013 Sprint 17, 2013 Sprint 17 API, Release 3.1.3, Release 3.2.0 |
Components | Android |
Labels | 3.1.2, android, listview, qe-testadded, regression |
Reporter | Mark Mokryn |
Assignee | Ping Wang |
Created | 2013-08-16T21:54:40.000+0000 |
Updated | 2014-06-19T12:43:35.000+0000 |
Description
Just try to click the ListView in the label area. In 3.1.2.GA it rarely works, on 3.1.1.GA clicks reliably. This bug seems to be dependent upon the item template - I have listviews in my app that are totally unclickable. Sorry to vent about this - Android has several ListView issues, I can work around most of them, but this one is a showstopper. I can't use 3.1.2 until fixed.
index.xml:
<Alloy>
<Window class="container">
<ListView id="lv" top="0dp" defaultItemTemplate="temp1" onItemclick="lvClicked">
<Templates>
<ItemTemplate name="temp1">
<Label bindId="testMsg"/>
</ItemTemplate>
</Templates>
<ListSection id="ls"/>
</ListView>
</Window>
</Alloy>
index.js:
function lvClicked() {
alert('clicked');
}
var data = [];
for (var i=0; i < 10; i++) {
data.push({testMsg: {text: 'try to click on the label area - it will work with 3.1.1 but not on 3.1.2 :('}});
}
$.ls.setItems(data);
$.index.open();
Linking to a TIMOB ticket. TIMOB-14901
Test case for classic Titanium project:
This regression is caused by [PR#4241](https://github.com/appcelerator/titanium_mobile/pull/4241).
Verified as fixed in my app by https://github.com/appcelerator/titanium_mobile/pull/4580 Thanks for the quick fix!
Closing as duplicate of linked ticket.