title: Android - prevent edittext copy/paste and double tap select all
body: <p>I am looking for a solution to disable the long press edit menu(copy/paste) and also the double-tap select-all function for an edittext box. I have read through a few solutions on here to this issue in similar fashion, however, need to go a step further.</p>
  
  <p>For this app I have a requirement to prevent the user from using the copy/paste functions on my app and need a way to disable this functionality that will work on 2.3 API as well as when used on a newer tablet.  I am testing with a NexusOne phone device and a Galaxy Tablet. (minSDK is 8, target is 10)</p>
  
  <p>Currently I am using this (as example):
      edittextPassword.setLongClickable(false);  -disables the popup edit menu, Great!</p>
  
  <p>This method does work on the phone device to prevent the edit menu popup.  On the tablet, this is also disabled from the long-press action.  The tablet however has newer functionality of a double-tap which will select-all text and open the edit menu.   Is there a way for an older API to cancel/trap/disable a newer API feature or prevent the double-tap gesture?</p>
  
  <hr>
  
  <p>Update: Using a combination of setLongClickable(false) and setOnTouchListener connected to a GestureDetector (thank you Nikola for suggestion) I am able to trap/cancel the double click and long click edit menus from opening. </p>
  
  <p>The next part to figure out is this ... on Samsung phones (Galaxy S, not sure about other devices at the moment), when you tap into a field, you get a cursor and a floating cursor pointer button (proper name??). Clicking on this pointer button is another method to open the edit menu. Anyone know how to disable this one? My only workaround left is to clear the Clipboard on BeforeTextChanges and AfterTextChanges using a TextWatcher.  This ensures that even if you get to the Copy/Paste menu, the clipboard is cleared and there is nothing to paste.</p>