title: Android drag imageview with finger behaves strange
body: <p>I'm implementing imageview drag function to my application.
  I have tried with below code but it's behaves strange.when I try to drag the image 
  it's changes the position and during the movement it's shows like zooming the image.
  I want to move the image with finger smoothly.</p>
  
  <p>please help me to solve this problem</p>
  
  <pre><code>@Override
      public boolean onTouch(View v, MotionEvent event) {
          final int X = (int) event.getRawX();
          final int Y = (int) event.getRawY();
          MarginLayoutParams marginParams = new MarginLayoutParams(mImagePreView.getLayoutParams());
  
          switch (event.getAction()) {
  
          case MotionEvent.ACTION_DOWN:
              _xDelta = X - marginParams.leftMargin;
              _yDelta = Y - marginParams.topMargin;
              break;
          case MotionEvent.ACTION_MOVE:
              marginParams.leftMargin = X-_xDelta;
              marginParams.topMargin = Y - _yDelta;
              marginParams.rightMargin = -250;
              marginParams.bottomMargin = -250;
  
              FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(marginParams);
              mImagePreView.setLayoutParams(layoutParams);
  
              break;
          default:
              break;
          }
          return true;
      }
  </code></pre>