title: How to disable copy/paste from/to EditText/TextView
body: <p>I was trying to make a Edittext which should NOT ALLOW user to copy content from or paste content to it.I read all ansers an do this <strong>but it is not work for me</strong> ! and when i get long click on text to select it, showing me copy/past .hear my code </p>
  
  <p>video.TextViewSelectable class :</p>
  
  <pre><code>public class TextViewSelectable extends TextView {
  
  OnSelectionChangedListener onSelectionChangedListener;
  
  public TextViewSelectable(Context context, AttributeSet attrs,
                            int defStyle) {
      super(context, attrs, defStyle);
      disableCopyPast();
  
  }
  
  public TextViewSelectable(Context context, AttributeSet attrs) {
      super(context, attrs);
      disableCopyPast();
  
  
  }
  
  public TextViewSelectable(Context context) {
      super(context);
      disableCopyPast();
  
  }
  
  
  @Override
  protected void onSelectionChanged(int selStart, int selEnd) {
      if (onSelectionChangedListener == null){
          return;
      }
      String result=this.getText().subSequence(selStart, selEnd).toString();
      if(result.length()&gt;1){
          onSelectionChangedListener.onSelectionChange(result);
      }
  }
  
  public void setOnSelectionChangedListener(OnSelectionChangedListener onSelectionChangedListener){
      this.onSelectionChangedListener = onSelectionChangedListener;
  }
  
  public void disableCopyPast() {
      this.setCustomSelectionActionModeCallback(new Callback() {
  
          public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
              return false;
          }
  
          public void onDestroyActionMode(ActionMode mode) {
          }
  
          public boolean onCreateActionMode(ActionMode mode, Menu menu) {
              return false;
          }
  
          public boolean onActionItemClicked(ActionMode mode,
                                             MenuItem item) {
              return false;
          }
      });
      this.setTextIsSelectable(true);
  }
  
  public interface OnSelectionChangedListener{
      public void onSelectionChange(String result);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>xml code :</p>
  
  <pre><code>&lt;video.TextViewSelectable
          android:id="@+id/offLine_subtitleText"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:layout_weight="12"
          android:ellipsize="middle"
          android:gravity="center"
          android:textColor="#FFFFFF"
          android:clickable="true"
          android:textIsSelectable="true"
          android:textColorHighlight="#fffffe60"
          style="@android:style/Holo.ButtonBar"
  
          android:layout_gravity="center" 
          android:textSize="15sp"/&gt;
  </code></pre>
  
  <p>usage:</p>
  
  <pre><code>    private  TextViewSelectable subtitleText;
   subtitleText =          (TextViewSelectable)findViewById(R.id.offLine_subtitleText);
    subtitleText.setOnSelectionChangedListener(this);
  </code></pre>