android - Stopping event listener of tableviewrow in Titanium -


when user click on tableviewrow, alert box 'row' occur. , inside tableviewrow, contains view contains image view. alert box 'label' popout when user click on image. problem when user click on image, not alert box 'label' popup, alert box 'row' too. how can avoid alert box 'row' popping out when user click on image? alert box 'row' appear when user click on tableviewrow other image. thanks..

var row = titanium.ui.createtableviewrow({    classname:'rowclass', });  var u_image = titanium.ui.createimageview({    image: 'image.jpg',    top:10,    left:4,    height:36,    width:36, }); row.add(u_image); regdata.push(row);  u_image.addeventlistener('click', function(e){    alert('label'); }); row.addeventlistener('click', function(e){    alert('row'); }); 

ti 1.6, android 2.2

create image view id

var u_image = titanium.ui.createimageview({    image: 'image.jpg',    id: "image_view",    top:10,    left:4,    height:36,    width:36, }); 

put listener on whole table , not specific elements

mytable.addeventlistener('click', function(e){     if(e.source.id == "image_view") {         alert('image_view');     } else {         alert('row');     } }); 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -