how to create margin moving image view android
<p>please give me sample moving image to my margin destination</p>

<p>ilustration</p>

<pre><code>image        x (margin move image)
</code></pre>

<p>if image moving with drag image stoped moving to my margin     </p>

<pre><code>imageView.setOnTouchListener(new OnTouchListener() {

            public boolean onTouch(View v, MotionEvent event) {
                // TODO Auto-generated method stub
                int eid = event.getAction();
                switch (eid) {
                case MotionEvent.ACTION_MOVE:
                    RelativeLayout.LayoutParams mParams = (RelativeLayout.LayoutParams) imageView.getLayoutParams();
                    int x = (int) event.getRawX();
                    //int y = (int) event.getRawY();
                    TextView text = (TextView) findViewById(R.id.editText1);
                    text.setText("1");
                   mParams.setMargins(0, 0, 70, 0);
                    mParams.leftMargin = x+0;
                    //mParams.

                    imageView.setLayoutParams(mParams);

                    break;
                default:
                    break;
                }
                return true;
            }
        }
</code></pre>
