Firing touch event on parent view while child view is clicked

You must Login before you can answer or comment on any questions.

I have a view and a child view (image view). The parent view is a scrollable view. So the problem is, when the user touches the child view, it blocks the touch event on the parent view, so the user can't scroll it. The child view is just a passive image view that does not have any event attached to it.

Here is what the current code looks like.

var p = Ti.UI.createScrollableView({ 
        views: [a,b,c,d],
        width: w,
        top: t,
    });
 
var c = Ti.UI.createImageView({image: "/image/abc.png"});
p.add(c);
Is there any way so the child view is pretty much ignored (visible but does not block parent view's touch event)?

1 Answer

Accepted Answer

On the child view, set touchEnabled = false

— answered 9 months ago by Shannon Hicks
answer permalink
1 Comment
  • same issue. Your solution is just a turn around : clicking the child view should not fire this event on parent view. it seems it occurs only on ios platform.

    — commented 8 months ago by Bruno Sizun

Your Answer

Think you can help? Login to answer this question!