Wednesday, 21 August 2013

Android super.onTouch

Android super.onTouch

I am adding a touch listener to a view here is the code:
view.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return super.onTouch(v, event);
}
});
but I keep getting the error:
The method onTouch(View, MotionEvent) is undefined for the type Object.
Why do I keep getting this error. Is there something I need to add to my
app to make it work?

No comments:

Post a Comment