title: how to move the image with in screen boundary
body: <p>i have problem with moving image when i move image it goes outside the screen 
     i want to move move within boundary of screen size 
  how to fix it 
  Here is the touch listner code for that image.</p>
  
  <pre><code>private ImageView nail_cleaner;
  RelativeLayout re_layout;
  
  PointF DownPT = null; 
  PointF StartPT = null;
  
  @Override
  public boolean onTouch(View v, MotionEvent event) {
      startMoving(nail_cleaner, event);
      return true;
  }
  
  public void startMoving(ImageView img, MotionEvent event) {
      int eid = event.getAction();
      switch (eid) {
      case MotionEvent.ACTION_MOVE:
  
          PointF mv = new PointF(event.getX() - DownPT.x, event.getY()
                  - DownPT.y);
          img.setX((int) (StartPT.x + mv.x));
          img.setY((int) (StartPT.y + mv.y));
          StartPT = new PointF(img.getX(), img.getY());
          if (event.getX() == event.getX()) {
  
          }
  
          break;
      case MotionEvent.ACTION_DOWN:
          DownPT.x = event.getX();
          DownPT.y = event.getY();
          StartPT = new PointF(img.getX(), img.getY());
          Log.e("get points : ", img.getX() + "" + img.getY());
          break;
      }
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      requestWindowFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.clean_wash);
  
      re_layout = (RelativeLayout) findViewById(R.id.layout_clean);
      nail_cleaner = (ImageView) findViewById(R.id.id_nail_cleaner);
  
      DownPT = new PointF();
      StartPT = new PointF(); 
      nail_cleaner.setOnTouchListener(this);
  
  
  
  }
  </code></pre>
  
  <p>and also if i move the image it moves back to the other image, i want to move this image in front of the other , </p>