How to disable edittext pop up when EditText is LongClicked?

蓝咒 提交于 2019-12-19 04:31:55

问题


Hello All I have used onLongClickListener() to my EditText view but whenever I click on view 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


回答1:


you can return true in your onLongClick listener onLongClick method? that means that you have consumed the event and it wont be passed further along.




回答2:


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



来源:https://stackoverflow.com/questions/6435662/how-to-disable-edittext-pop-up-when-edittext-is-longclicked

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!