Within a MapActivity on an Eclair test phone, I have installed an
OnTouchListener to only listen for screen taps.  If I just tap the
screen it receives events OK.  I am not interested in anything fancy.
I don't care about move events or guessture detection, just taps.
However, after I perform a multi-touch activity to expand or contract
the map view, the OnTouchListener no longer receives any callbacks
whatsoever.  The multi-touch continues to work, but I cannot receive
any screen tap events inside of the OnTouchListener.  My
OnTouchListener looks like this

private class MyTouchListener implements View.OnTouchListener {
    public boolean onTouch(View view, MotionEvent event) {

        int action = event.getAction();
        if (action == MotionEvent.ACTION_DOWN) {
                mPosX = event.getX();
                mPosY = event.getY();
                processEvent(mPosX, mPosY);
                return true;
        }
        return false;
     }
}

   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.mapview);

        MapView myMapView = (MapView) findViewById(R.id.mapview);
        myMapView.setBuiltInZoomControls(true);

        myMapView.setOnTouchListener(mTouchListener);
        // other stuff here
}

Within mapview.xml, I have the following

        <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true"
        android:apiKey="SOME_KEY_HERE"
    />

Yes the onTouch listen

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

Reply via email to