A bug in android.view.ScaleGestureDectator?
<p>I use this code to test the ScaleGestureDectator class:</p>

<pre><code>package pirriperdos.common;

import android.os.Bundle;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.ViewGroup;
import android.widget.ScrollView;

public class MainActivity extends Activity {

    public class V extends ScrollView {

        public V(Context context) {
            super(context);
        }


        @Override
        public boolean onTouchEvent(MotionEvent event) {
            sgd.onTouchEvent(event);
            if (sgd.isInProgress())
                return true;
            return super.onTouchEvent(event);
        }


    }
    ScaleGestureDetector sgd;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ScrollView v = new V(this);
        v.removeAllViews();
        LayoutInflater.from(this).inflate(R.layout.activity_main, v);
        setContentView(v, new ViewGroup.LayoutParams(1000, 1000));
        sgd = new ScaleGestureDetector(this, new ScaleGestureDetector.SimpleOnScaleGestureListener());
    }


}
</code></pre>

<p>But I always get a exception when I put 4 figure on the screen then take them up in some certain order.</p>

<p>It report a array out of index exception.</p>

<p>Any one has encountered the same problem? Any solution?</p>

<p>I'm debugging on my Galaxy Nexus running Android 4.1, SDK version 16.
if you need more information please tell me...</p>

<blockquote>
  <p>I think no one will answer me...</p>
</blockquote>
