title: touch listener and long click listener
body: <p>i wrote a code with touch listener on surface view to  move object and it work great,  when i insert on long click listener the touch listener stop working well and the object move even if i not touch it. the long clickneed to open dialog.</p>
  
  <p>on create:</p>
  
  <pre><code>sf = new SurfaceView(this);
  sf.setOnTouchListener(this);
  sf.setOnLongClickListener(this);
  </code></pre>
  
  <p>on Long Click:</p>
  
  <pre><code>public boolean onLongClick(View v) {
      if (!changePositionMode){
          final Dialog dialog = new Dialog(this);
          dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
          dialog.setContentView(R.layout.text_manager);
          dialog.setTitle("Browser");
          dialog.setCancelable(true);
          dialog.show();
      }
      return false;
  }
  </code></pre>
  
  <p>on touch listener</p>
  
  <pre><code>public boolean onTouch(View v, MotionEvent event) {
      Point p=new Point((int)event.getX(),(int)event.getY());
      if (event.getAction()==MotionEvent.ACTION_DOWN){
          }else if (object.isTouch(p)){
              changePositionMode=true;
              x=event.getX();
              y=event.getY();
              draw();
              return true;
          }   
      }
      else if (event.getAction()==MotionEvent.ACTION_MOVE){
          t.changeTamplatePosition(event.getX()-x,event.getY()-y);
          x=event.getX();
          y=event.getY();
          draw();
          return true;
      }
      else if (event.getAction()==MotionEvent.ACTION_UP){
          changePositionMode=false;
      }
  
      return false;
  }
  </code></pre>