title: Android Imageview on touch event
body: <p>I am creating a android application.
  Here  I have a imageview .
  my goal is to get next picture from database when move the finger on image</p>
  
  <pre><code>float nPicturePositionM = 0;
  
  public boolean onTouch(View v, MotionEvent event) {
      boolean aHandledL = false;
      if (event.getAction() == MotionEvent.ACTION_MOVE) {
          float nNewPicturePosL = event.getX();
          if (nPicturePositionM &lt; nNewPicturePosL) {
              nPicturePositionM = nNewPicturePosL;
              GetPictures(true);
          } else {
              nPicturePositionM = nNewPicturePosL;
              GetPictures(false);
          }
          aHandledL = true;
      }
  
      return aHandledL;
  
      //return false;
  }
  </code></pre>
  
  <p>How can i handle it using touch event? Image should slide as in we do it in gallery</p>