title: Android onTouch Listener event
body: <p>I am using ontouch event but the problem i m having is it calls down event but it is nt calling move event or UP event
  check the following code</p>
  
  <pre><code>public class DragNewActivity extends Activity implements OnTouchListener  {
  
      private float X;
      private float Y;
      private int width;
      private int height;
      private CharSequence s;
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          Log.d("D","D");
  
          TextView tv1 = (TextView)findViewById(R.id.tv1);
          TextView tv2 = (TextView)findViewById(R.id.tv2);
          tv1.setOnTouchListener(this);
          //tv2.setOnTouchListener(this);
          }
  
      @Override
      public boolean onTouch(View v, MotionEvent event) {
  
          //int action = event.getAction();
          switch (event.getAction()){
          case MotionEvent.ACTION_DOWN:
              Log.d("DOWN","DOWN");
          break;
  
          case MotionEvent.ACTION_MOVE:
              Log.d("MOVE","MOVE");
          break;
  
          case MotionEvent.ACTION_UP:
              Log.d("UP","UP");
              X = event.getRawX();
              Y = event.getRawY();
  
              Display display = getWindowManager().getDefaultDisplay(); 
              width=display.getWidth()/2;
              height=display.getHeight()/2;
              Log.e("X", X+"");
              Log.e("Y", Y+"");
              Log.e("ScX", width+"");
              Log.e("ScY", height+"");
              if(X&gt;width &amp;&amp; Y&gt;height){
                  Log.e("SUFI", "Event ho gyuaaaaaaa");
              }
  
          break;
          }
          return false;
      }
  }
  </code></pre>