EditText, Do not allow copy/paste from one to other

android, android-edittext

Solution

Haven't tested this, but I think you could just override the OnLongClick listener (for each of your EditTexts) so that it doesn't display a context menu. Therefore they wouldn't be able to copy and paste.

 OnLongClickListener mOnLongClickListener = new OnLongClickListener() {

    @Override
    public boolean onLongClick(View v) {
        //since nothing is in here, nothing will happen.  

        return true;
    }
};

Problem

I have two edit text defined in layout. Both of them are for email address Once user enter in first box, I want to force user to reenter the same email address again without doing any copy paste operation.

Original source