title: About Android: how to use Log to gain the position (x,y) when I use the onTouchEvent()?
body: <p>Here is My Code:   </p>
  
  <pre><code> public boolean onTouchEvent(MotionEvent cv){
  
      int x=(int)cv.getX();
      int y=(int)cv.getY();
  
      // here I want to use Log to gain the position(x,y) that I touched.But how?
  
      if( 0&lt;=y &amp;&amp; y&lt;=py ){
          if( (px-(py-y)*Math.tan(30))&lt;=x &amp;&amp; x&lt;=(px+(py-y)*Math.tan(30)) ){
              Log.i(VIEW_LOG_TAG, "yes");
          }
      }
  
      if( px&lt;=x &amp;&amp; x&lt;=(px+py*Math.tan(15)) ){
          if( y&lt;=(Math.tan(15)*(px-x)+py) ){
  
              Log.i(VIEW_LOG_TAG, "no");
          }
      }
  
      return super.onTouchEvent(cv);
  }
  </code></pre>