title: OnLongPress increase time
body: <p>I have imageView. Im using pan,pinch for imageView. Sometimes i need to delete imageView. So, i used OnLongClickListener for remove image. When i use long click my imageView removing. But when i use OnTouchListener for pan,pinch for imageView OnLongPress activated and my imageView removed from view. How to solve this?</p>
  
  <p>code:</p>
  
  <pre><code>    imageView.setOnLongClickListener(new OnLongClickListener(){
  
       @Override
       public boolean onLongClick(View v) {
          // TODO Auto-generated method stub
                                      imageView.setVisibility(View.GONE);
  
        return true;
          }
  
    });
  
  
  
     imageView.setOnTouchListener(new View.OnTouchListener() {
         final Handler handler = new Handler(); 
      Runnable mLongPressed = new Runnable() { 
          public void run() { 
              Log.i("", "Long press!");
          }   
      };
  
  
  
       @Override
         public boolean onTouch(View v,MotionEvent event) {
          // TODO Auto-generated method stub
  
      if(event.getAction() == MotionEvent.ACTION_DOWN)
          handler.postDelayed(mLongPressed, 1000);
      if((event.getAction() == MotionEvent.ACTION_MOVE)||(event.getAction() ==     MotionEvent.ACTION_UP))
          handler.removeCallbacks(mLongPressed);
  
  
  
      layoutParams = (RelativeLayout.LayoutParams) imageView.getLayoutParams();
  
          switch(event.getAction())
           {
       case MotionEvent.ACTION_DOWN :
        {
            parms = (RelativeLayout.LayoutParams) imageView.getLayoutParams();
  
  
        dx = event.getRawX() - parms.leftMargin;
        dy = event.getRawY() - parms.topMargin;
  
  
          }
      break;
        case MotionEvent.ACTION_MOVE :
          {
        x = event.getRawX();
        y = event.getRawY();
          parms.leftMargin = (int) (x-dx);
          parms.topMargin = (int) (y - dy);
                                              imageView.setLayoutParams(parms);
  
       }
       break;
       case MotionEvent.ACTION_UP :
       {
  
          }
         break;
      }
       return false;
         }
         });
  
        }
  
     });
  </code></pre>