开发者

How to disable edittext pop up when EditText is LongClicked?

开发者 https://www.devze.com 2023-03-15 00:54 出处:网络
Hello All I have used onLongClickListener() to my EditText view but whenever I click on vi开发者_运维百科ew for long time so a popup appears that doesn\'t let me do my task in onLongClick(View v).

Hello All I have used onLongClickListener() to my EditText view but whenever I click on vi开发者_运维百科ew for long time so a popup appears that doesn't let me do my task in onLongClick(View v). The pop up contains some options like Select All,Select Text,Cut All ,Copy All etc. I want to disable that (that should not appear on clicking long on EditText view). How can I do that please Help Me


You can return true in your onLongClick listener onLongClick method that means you have consumed the event and it won't be passed further along.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消