How can I disable the action mode. In another word, I want to prevent the action mode from appearing when the user long clicks on a web view that contains a text.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I haven’t worked a lot with
WebViewsin general, but I think one of these should work. I haven’t tested any of these though.1:
Set the attribute on the
WebViewin the XML:android:longClickable="false"Or 2:
Set the above attribute in Java instead of XML:
Or 3: Override your
WebViewandreturn truein thesetOnLongClickListenermethod