1

I am expanding a previously written app. The main component of the app is a webview. In the previous iteration of the app we did not want to allow the users to select text. In the expansion we want to allow the users to be able to select text. I made the assumption that text selection is enabled by default on webviews and the developer who wrote the app disabled the ability for people to select text. In trying to enable this feature i commented out all the touch and click listeners that were attached to my webview one by one to see where they disabled text selection, but even with every touch listener commented out i still can't select text. My question is, was my original assumption correct? Is text selection enabled by default? Should i instead be looking for a way to enable text selection instead of not disabling it?

Thanks!

aamiri
  • 2,420
  • 4
  • 38
  • 58
  • did you checked http://stackoverflow.com/questions/5107651/android-disable-text-selection-in-a-webview? http://stackoverflow.com/questions/6058843/android-how-to-select-texts-from-webview – Veer May 07 '12 at 17:52
  • I had checked many similar posts, but not this one. Unfortunately that doesn't quite answer my question. Without implementing any touch listeners, what is the default text-selection behavior of the android os in a web view? – aamiri May 07 '12 at 18:17

1 Answers1

0

I found there was no text selection by default for Android 2.2 - 2.3, but it did enable copy/paste if long touch happened for Android 4.0+. Then I tried to disable this feature, but failed unfortunately. All answers right here (SO) didn't work too.

fifth
  • 4,249
  • 9
  • 45
  • 62