content: package cn.hotapk.fastandrutils.widget;
  
  /**
   * @author laijian
   * @version 2017/8/30
   * @Copyright (C)下午5:26 , Suntektech
   */
  
  import android.content.Context;
  import android.util.AttributeSet;
  import android.view.ActionMode;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.EditText;
  
  /**
   * Created by jianjun.lin on 16/4/12.
   */
  public class FNullMenuEditText extends EditText {
  
      public FNullMenuEditText(Context context, AttributeSet attrs) {
          super(context, attrs);
          setLongClickable(false);
          setTextIsSelectable(false);
          setCustomSelectionActionModeCallback(new ActionMode.Callback() {
              @Override
              public boolean onCreateActionMode(ActionMode mode, Menu menu) {
                  return false;
              }
  
              @Override
              public boolean onPrepareActionMode(ActionMode mode, Menu menu) {
                  return false;
              }
  
              @Override
              public boolean onActionItemClicked(ActionMode mode, MenuItem item) {
                  return false;
              }
  
              @Override
              public void onDestroyActionMode(ActionMode mode) {
  
              }
          });
  
      }
  
      boolean canPaste() {
          return false;
      }
  
      boolean canCut() {
          return false;
      }
  
      boolean canCopy() {
          return false;
      }
  
      boolean canSelectAllText() {
          return false;
      }
  
      boolean canSelectText() {
          return false;
      }
  
      boolean textCanBeSelected() {
          return false;
      }
  
      @Override
      public boolean onTextContextMenuItem(int id) {
          return true;
      }
  }
  