title: How to get initial X, Y values (of first touch ACTION_DOWN) in OnTouchListener
body: <p>I need initial <em>x</em> and <em>y</em> values (the point that moving begun with first touch <code>ACTION_DOWN</code>) in order to calculate <code>deltaX</code> and <code>deltaY</code> as follows;</p>
  
  <pre><code>private float mInitialTouchX = Float.NaN;          // # First touch temp var defined globally
  ...
  someView.setOnTouchListener(new OnTouchListener() {         
      @Override public boolean onTouch(View v, MotionEvent event) 
      {
          switch (event.getAction()) 
          {
              case MotionEvent.ACTION_MOVE:
                  MoveViewHorizontally(v, event.getX(), mInitialTouchX);                      
                  break;
              case MotionEvent.ACTION_DOWN:
                  mInitialTouchX = event.getX();    // # Set initial touch point
                  break;
              case MotionEvent.ACTION_UP:                     
                  mInitialTouchX = Float.NaN;       // # Reset initial touch point
                  break;
              default: break;
          }
          return false;
      }           
  });
  
  private void MoveViewHorizontally(View v, float x, float initialTouchX)
  {
      int deltaX = (int)(x - initialTouchX);      
  
      ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) v.getLayoutParams();     
  
      layoutParams.leftMargin += deltaX;
      v.setLayoutParams(layoutParams);
  }
  </code></pre>
  
  <p>Is there a way that i can get <em>initial touch values</em> from <code>event</code> or somehow - somewhere else, avoiding usage of global variable <code>mInitialTouchX</code> ?</p>