I want to implement a browser in android using webview. How can I open a context menu in a android webview whenever the user long press a link in the webview?
Asked
Active
Viewed 1,756 times
1
-
possible duplicate of [Enable longClick in WebView](http://stackoverflow.com/questions/3449098/enable-longclick-in-webview) – TalkLittle Nov 24 '14 at 23:25
1 Answers
1
Call Activity.openContextMenu(View v) in onLongPress. This would mean having the MyWebView keep a reference to the Activity though.
jlopez
- 6,287
- 2
- 51
- 90
-
1The webview now just displays a context menu whenever I long press anywhere. How can I detect when a link is long pressed? – Minh Pham Feb 15 '13 at 03:08