title: How to retrieve button position?
body: <p>I've created a Relative layout that will change a button position when I touch it. Using OnTouchListener. But I want when I release the button (ACTION_UP), it go to it's own position before this operation. Can anyone help me out please?</p>
  
  <p>My code : (inside on Create)</p>
  
  <p>... </p>
  
  <pre><code>this.relative_layout.setOnTouchListener(new OnTouchListener()
              {
  
              @Override
              public boolean onTouch(View view, MotionEvent event)
              {
                  // TODO: Implement this method
                  if(event.getAction() == event.ACTION_MOVE)
                  {
                      float x = event.getX();
                      float y = event.getY();
                      my_button.setX(x);
                      my_button.setY(y);
                  } else if(event.getAction() == event.ACTION_UP)
                  /* here's the issue that I'm
                   * asking for help about
                   * What to do to return the button position back
                   * Like it was? */
                      return true;
              }
  
          });
  </code></pre>