nisrulz/sensey

How do we add the Touch listeners to specific views?

gouravd opened this issue · 5 comments

How do we add the Touch listeners to specific views?

@gouravd I haven't tested the lib to work with specific views but I would test that out before I can make a statement about it.

Override this in your custom view and you should be good to go.

@Override public boolean dispatchTouchEvent(MotionEvent event) {
    Sensey.getInstance().setupDispatchTouchEvent(event);
    return super.dispatchTouchEvent(event);
}

P.S:: i have tested and its working as expected.

@gouravd Can you confirm that this is resolved.

Closing as already answered.

I had to eventually create a wrapper view on top of my views and overridden the dispatch events for these wrapper views.