{ "id": "149220", "key": "TIMOB-19237", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2015-06-29T08:34:58.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "android" ], "versions": [], "issuelinks": [ { "id": "58262", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "174810", "key": "TIMOB-27807", "fields": { "summary": "Android: convertPointToView() returns pixels instead of default units", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-03-12T01:54:42.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Hello,\r\n\r\nI'm trying to retrieve the location in the current Window of a click on a button inside a ListView. The converted location using convertPointToView() is unreliable on Android (works fine on iOS) and seems to match the button of the last visible ListItem.\r\n\r\nHere's the snippet I used https://gist.github.com/Velan/f3d75612a611b9a47568\r\n\r\nThe output on iOS (and expected output)\r\n{code}\r\n[INFO] Click {\r\n[INFO] x = 26;\r\n[INFO] y = \"18.25\";\r\n[INFO] }\r\n[INFO] Button title button 1\r\n[INFO] Converted {\r\n[INFO] x = \"184.5\";\r\n[INFO] y = \"52.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = \"44.5\";\r\n[INFO] y = \"19.25\";\r\n[INFO] }\r\n[INFO] Button title button 2\r\n[INFO] Converted {\r\n[INFO] x = \"203.5\";\r\n[INFO] y = \"153.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = \"28.5\";\r\n[INFO] y = \"13.25\";\r\n[INFO] }\r\n[INFO] Button title button 3\r\n[INFO] Converted {\r\n[INFO] x = \"187.5\";\r\n[INFO] y = \"247.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = \"40.5\";\r\n[INFO] y = \"17.25\";\r\n[INFO] }\r\n[INFO] Button title button 4\r\n[INFO] Converted {\r\n[INFO] x = \"199.5\";\r\n[INFO] y = \"351.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = 28;\r\n[INFO] y = \"17.75\";\r\n[INFO] }\r\n[INFO] Button title button 5\r\n[INFO] Converted {\r\n[INFO] x = \"186.5\";\r\n[INFO] y = \"452.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = 28;\r\n[INFO] y = \"15.75\";\r\n[INFO] }\r\n[INFO] Button title button 6\r\n[INFO] Converted {\r\n[INFO] x = \"186.5\";\r\n[INFO] y = \"550.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = \"32.5\";\r\n[INFO] y = \"17.75\";\r\n[INFO] }\r\n[INFO] Button title button 7\r\n[INFO] Converted {\r\n[INFO] x = \"191.5\";\r\n[INFO] y = \"652.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = 37;\r\n[INFO] y = \"11.75\";\r\n[INFO] }\r\n[INFO] Button title button 8\r\n[INFO] Converted {\r\n[INFO] x = \"195.5\";\r\n[INFO] y = \"513.75\";\r\n[INFO] }\r\n[INFO] Click {\r\n[INFO] x = 28;\r\n[INFO] y = \"12.25\";\r\n[INFO] }\r\n[INFO] Button title button 9\r\n[INFO] Converted {\r\n[INFO] x = \"186.5\";\r\n[INFO] y = \"613.75\";\r\n[INFO] }\r\n{code}\r\n\r\nThe output on Android\r\n{code}\r\n[INFO] Click {\"x\":31.517547607421875,\"y\":30.885238647460938}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":371,\"y\":866}\r\n[INFO] Click {\"x\":34.513641357421875,\"y\":21.813430786132812}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":374,\"y\":857}\r\n[INFO] Click {\"x\":56.48504638671875,\"y\":22.733795166015625}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":395,\"y\":858}\r\n[INFO] Click {\"x\":53.48895263671875,\"y\":16.659637451171875}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":392,\"y\":852}\r\n[INFO] Click {\"x\":37.509765625,\"y\":23.5753173828125}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":377,\"y\":859}\r\n[INFO] Click {\"x\":50.49285888671875,\"y\":21.498046875}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":389,\"y\":856}\r\n[INFO] Click {\"x\":50.49285888671875,\"y\":29.4129638671875}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":389,\"y\":864}\r\n[INFO] Click {\"x\":50.49285888671875,\"y\":21.34033203125}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":389,\"y\":856}\r\n[INFO] Click {\"x\":50.49285888671875,\"y\":22.2607421875}\r\n[INFO] Button title\r\n[INFO] Converted {\"x\":389,\"y\":857}\r\n{code}\r\n\r\nI also can't seem to retrieve the title of the Button on Android.\r\n\r\nDoes anybody know any workaround beside using TableViews?", "attachment": [], "flagged": false, "summary": "Android: convertPointToView inside a ListView", "creator": { "name": "velan", "key": "velan", "displayName": "Velan Vijatovic", "active": true, "timeZone": "Asia/Tokyo" }, "subtasks": [], "reporter": { "name": "velan", "key": "velan", "displayName": "Velan Vijatovic", "active": true, "timeZone": "Asia/Tokyo" }, "environment": "OSX 10.10.3\r\nNode.js 0.12.2\r\nTitanium SDK 3.5.1.GA, 4.0.0.GA, 4.1.0.v20150626223333\r\nSeveral Android versions and APIs", "comment": { "comments": [], "maxResults": 1, "total": 1, "startAt": 0 } } }