Disabling Context Menu for EditText in Android
Disabling Context Menu for EditText in Android
Generally most of the applications use
EditText in Every UI screen.
Android provides default keyboard for EditText. This Keyboard pops-up whenever we are keeping the cursor in EditText box.
Also Android provides default ContextMenu options for EditText. If you enter any text in EditText box and then long press on the entered text , then context menu options will pop-up. These options like cut,copy ,paste ...etc. These are like right click options for the MSWord.
But For some requirements these context menu options not required and also some situations we have to disable this context menu options also. To do this we have to add one tag in XML for that edit text box.
Eg. Add the following tag to ur EditText properties....
andorid:longClickable="false"
Android provides default keyboard for EditText. This Keyboard pops-up whenever we are keeping the cursor in EditText box.
Also Android provides default ContextMenu options for EditText. If you enter any text in EditText box and then long press on the entered text , then context menu options will pop-up. These options like cut,copy ,paste ...etc. These are like right click options for the MSWord.
But For some requirements these context menu options not required and also some situations we have to disable this context menu options also. To do this we have to add one tag in XML for that edit text box.
Eg. Add the following tag to ur EditText properties....
andorid:longClickable="false"
Comments
Post a Comment
Please post comments here:-)