Hello all,

I'm trying to develop a touch control, but I'm getting some problems
with the onTouch method. Basically, only the event ACTION_DOWN is
working. The others seems to be in trouble. My application has a
LinearLayout, containing a VideoView.

I have a HTC Magic updated to 1.6. With a basic code like this one:

public boolean onTouch(View v, MotionEvent event) {
                // TODO Auto-generated method stub
                  int action = event.getAction();
                    switch (action) {
                      case MotionEvent.ACTION_DOWN:
                        return false;
                      case MotionEvent.ACTION_MOVE:
                        return true;
                      case MotionEvent.ACTION_UP:
                          return true;
                      case MotionEvent.ACTION_CANCEL:
                          return false;
                      case MotionEvent.ACTION_OUTSIDE:
                          return false;
                      default:
                    }
                return false;
        }

I always enter into the first case. I've been googling and trying to
find a response for it.  I added the following permision lines to the
manifest.

        <uses-permission
android:name="android.permission.ACCESS_SURFACE_FLINGER" />
        <uses-permission android:name="android.permission.BIND_INPUT_METHOD" /
>
        <uses-permission android:name="android.permission.HARDWARE_TEST" />

Hope someone can give some useful hints. Thank you in advance, and
regards,

Enrique

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to