[AC-986] convertPointToView returns null for Views inside of a ListView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Duplicate |
| Resolution Date | 2014-04-17T05:54:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | android |
| Reporter | Young |
| Assignee | Ritu Agrawal |
| Created | 2014-04-13T17:54:59.000+0000 |
| Updated | 2016-03-08T07:37:18.000+0000 |
Description
convertPointToView returns wrong result in android when views inside of a ListView. This function working good in IOS but not working in Android.
Please provide a simple runnable test case to reproduce the issue and we would be happy to investigate further.
*Test Code*
<Alloy> <Tab id="scoresTab" title="Scores"> <Window id="win" title="Scores" class="container"> <ListView id="listView" defaultItemTemplate="headerTemplate" allowsSelection="true"> <Templates> <ItemTemplate id="headerTemplate" name="header"> <Button platform="android" bindId="scale" id="scaleHeadId" onClick="doClick"></Button> </ItemTemplate> </Templates> <ListSection id="headerSection"> </ListSection> </ListView> </Window> </Tab> </Alloy>*Step to reproduce* Create new Alloy Project Update index.xml and index.js file Run on Android Emulator/Device Click on listView Check console its print "pt is null" Expected Result Console will print "working"function doClick(e) { if (isAndroid) { var pt = {x: e.x, y: e.y}; // The next line seems to return null no matter what destination view I choose $.win, $.listView, $.scoresTab pt = e.source.convertPointToView(pt, $.win); if (pt == null) Titanium.API.info('pt is null'); else Titanium.API.info('working'); } }Resolving it as a duplicate of TIMOB-15634. Please follow along that ticket for further updates.