[AC-1873] convertPointToView() return null for ImageView within ListView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2013-10-22T07:54:20.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Alloy |
| Labels | alloy, listview, listviewitem |
| Reporter | Young |
| Assignee | Mauro Parra-Miranda |
| Created | 2013-10-10T19:54:59.000+0000 |
| Updated | 2016-03-08T07:40:47.000+0000 |
Description
On Android devices (2.3.x thru 4.3), convertPointToView() return null for point in ImageView (contained in a ListView) translating to coordinates of the ListView.
Behavior is correct in iOS.
list.xml:
<ListView id="list">
<Templates>
<ItemTemplate name="template1">
<ImageView bindId="image" id="img" onSingletap="doClick"/>
</ItemTemplate>
</Templates>
</ListView>
list.js:
function doClick(e){
var pt = { x: e.source.rect.x, y: e.source.rect.y };
var newPt = e.source.convertPointToView(pt, $.list); // newPt == null (Android only)
}
cheers :)
DUP issue.