Android drag and drop
<p>Here i created a dragable imageview .This is my sample code(not given full code)</p>

<pre><code>public class mainClass extends Activity 
{     
    MyView obj1,obj2;   
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        AbsoluteLayout layout = new AbsoluteLayout(LearnKid.this);

        layout.setLayoutParams(new AbsoluteLayout.LayoutParams(
                                   LayoutParams.WRAP_CONTENT,
                       LayoutParams.WRAP_CONTENT,0,0));
        obj1 = new MyView(this);
        obj2 = new MyView(this);

        layout.addView(obj1);
        layout.addView(obj2);

        setContentView(layout);

    }
}
class MyView extends ImageView 
{
    public MyView(Context context)
     {

           super(context);
    }
     public boolean dispatchTouchEvent(MotionEvent event) 
     {
        center_X= (int)event.getRawX();
        center_Y = (int)event.getRawY();
        this.setLayoutParams(new AbsoluteLayout.LayoutParams(AbsoluteLayout.LayoutParams.WRAP_CONTENT,
                    AbsoluteLayout.LayoutParams.WRAP_CONTENT,center_X-10,center_Y-(70)));
    }
}
</code></pre>

<p>Here i get 2 separate imageviews and also it is dragable.
But how do i check whether the first image has crossed the second image.
Because at that point i want to stop the dragable option.</p>

<p>Plz help</p>

<p>thanx in advance....  </p>
