Android: How to TOTALLY disable copy and paste function in Edittext

后端 未结 4 1152
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-11 19:38

I am quite new to Android developing area and recently I hv encountered a tough problem.

I was trying to make a Edittext which should NOT ALLOW user to copy content

4条回答
  •  一整个雨季
    2020-12-11 20:03

    best programmatically way is:

    myEdittext.setLongClickable(false);
    

    Or, just in xml

    android:longClickable="false"
    

提交回复
热议问题