Natural selection is testing this #Altcoins season 🌊. In this cycle, many are once again diving deep into research, searching for “the best” after Bitcoin & @Joseinnewworld makes waves 124 #NFTs — Wow, a strong signal for those still weighing their moves. #eCash $XEC #CryptoNews pic.twitter.com/GB3dRvH01U
— NFToa (@nftoa_) September 26, 2025
In my app, there is a registration screen, where I don't want the user to be able to copy/paste text into the EditText field. I have set onLongClickListener on each EditText so that the context menu showing copy/paste/input methods and other options doesn't appear. So the user won't be able to copy/paste into the Edit field.
But the problem arises if the user has enabled a third-party keyboard other than the default Android one, which may have a button for copy/paste or which may display the same context menu. So how to disable copy/paste in that scenario?
Please let me know if there is another way to copy/paste as well. (and maybe a way to disable it).
Solution
The best method is to use:
etUsername.setLongClickable( false );
