I am creating an application that contains a WebView that will be used to display some links and some plain text to the user. I want to make it so that the user can use LongClick for links or text and get the opportunity to remove this thing from the html displayed in the WebView. This question got me halfway. LongClicking on links works using the wv.getHitTestResult () method. But now my problem is that when I click on plain text for a long time, the onLongClick () method of the listener is not called, and even if getHitTestResult () did not return the text the user touches (I tried setting onTouchListener to get getHitTestResult () getExtra () matters when I touch plain text)
So my questions is - does anyone know how I can get LongClick events inside a WebView that are on text that is not bound? (I assume this is possible, some of how exactly I can select the text in the default browser), and as soon as I get the LongClick event, how can I access which piece of text I clicked on?
source
share