Well yes, dispatchTouchEvent() dispatching touch events through the
view. If you do this:
@Override public boolean dispatchTouchEvent(MotionEvent ev) {
return super.dispatchTouchEvent(ev);
}
it will behave exactly the same as if you didn't override the method,
so I'm not sure what you mean by it not working.
What are you trying to accomplish?
On Sep 19, 12:12 am, Urakagi <[EMAIL PROTECTED]> wrote:
> Hi, I have a class extending ListActivity, and I want to catch
> touchevent on it so I override dispatchTouchEvent.
>
> @Override
> public boolean dispatchTouchEvent(MotionEvent ev) {
> ...
>
> }
>
> And since it's a ListActivity, of cource I want to override the
> onListItemClick(), too:
> @Override
> protected void onListItemClick(ListView l, View v, int position, long
> id) {
> ...
>
> }
>
> But now I find that the dispatchTouchEvent() will intercept ALL touch
> event on the activity, so onListItemClick() will never be called.
> I tried
> super.dispatchTouchEvent(ev);
> but it does not work.
>
> Anyone has any idea for this? Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---