How to disable edittext when edittext longclicked?

Hey. Everything that I used onLongClickListener()in my view EditText, but whenever I click on the view for a long time, a pop-up window appears that does not allow me to complete my task in onLongClick(View v). The pop-up window contains some options, such as Select All, Select Text, Cut All, Copy All, etc. I want to disable this (this should not appear with a long press on EditText). How can i do this help me

+2
source share
2 answers

can you return true in your onLongClick receiver onLongClick? this means that you destroyed the event and it will not be passed on.

+8
source

I also got this popup when I redefined onTouchEvent () and returned false. Suppress it by returning true.

+1
source

Source: https://habr.com/ru/post/1610888/


All Articles