I want to implement Motion event for two buttons and get the
ACTION_MOVE function at the
same time.

I implemented onTouchEvent but doesn't work

 left = (Button)findViewById(R.id.button1);
    right = (Button)findViewById(R.id.button2);
    left.setOnTouchListener(this);
    right.setOnTouchListener(this);

    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // TODO Auto-generated method stub

        if (event.getAction() == MotionEvent.ACTION_MOVE) {
            if(v.getId()==R.id.button1 && v.getId()==R.id.button2){
               Log.i("Result","both moved!");
            }
        }
        return false;
    }

in AndroidManifest.xml

<uses-feature android:name="android.hardware.touchscreen.multitouch"
           android:required="true" />

please help me to figure this out.

-- 
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