Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1873] convertPointToView() return null for ImageView within ListView

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-10-22T07:54:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy
Labelsalloy, listview, listviewitem
ReporterYoung
AssigneeMauro Parra-Miranda
Created2013-10-10T19:54:59.000+0000
Updated2016-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)
}

Comments

  1. Mostafizur Rahman 2013-10-22

  2. Young 2013-10-22

    cheers :)
  3. Mauro Parra-Miranda 2013-11-24

    DUP issue.

JSON Source