Detect specific element tap in listview item


#1

how to detect tap on specific element in listview item not item tap, but get this items context when tap on lcoation image for example… Untitled


#2

itemTap will give you event.view which was actually tapped.


#3

how? how can i detect if click was on location icon? event.view gives me nothing, when i click on icon it says that i clicked on StackLayout


#4

It worked for me most times, can you try reproducing the issue with Playground?


#5

https://play.nativescript.org/?template=play-js&id=TEe2xf&v=3 styling is not good but you can test by clicking on location icon


#6

I think adding tap event for each UI element in template is the feasible solution here. If you want to do some action upon clicking icon, add tap event to that Image and handle that. This will not trigger item tap on list view, clicking anywhere else will trigger item tap.