Issue
I have Android WebView which displays some links as:
<a href="http://link1.html">Link1Text</a>
<a href="http://link2.html">Link2Text</a>
Now I would like to retrieve Link1Text and Link2Text when I long press these links. I have contextMenu implemented in the code and I could successfully get the link urls (http://link1.html, http://link2.html) using HitTestResult getExtra() method but how ccan I get those link texts ?
FYI, I require those link texts for implementing "Copy link text" option in the contextMenu.
Solution
Unfortunately, a clear, official way to do this is not available. Although, there are two APIs (selectText and copySelection) which are pending API council approval, that may help to do this, but they are not available at the moment.
Answered By - r.bhardwaj
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.