2

I want to make a context menu for a webview in my app. I want that when the user does a long click on a link, a context menu will popup. Something like this (the left picture, and instead of of listview I want a webview):

enter image description here

Thanx upfront.

Eli Revah
  • 3,626
  • 7
  • 27
  • 33
  • 1
    See this question and the accepted answer. http://stackoverflow.com/questions/3449098/enable-longclick-in-webview – Squonk Jun 28 '12 at 15:44

1 Answers1

1

You have a wide range of options to choose from : PopupWindow, ListPopupWindow, and PopupMenu

Reference : Android custom Overflow-menu (Without actionbar and no menubutton)

Community
  • 1
  • 1
Ron
  • 24,175
  • 8
  • 56
  • 97
  • I want a context menu like the one on the picture that I showed you. – Eli Revah Jun 28 '12 at 15:21
  • 1
    You can use `ListPopupWindow`.. But since you want to show the list at point of long click you need to use `PopupWindow` as it can be used to show at location (x,y) – Ron Jun 28 '12 at 15:31
  • 1
    Use `PopupMenu` as suggested in that link. The long clicked list item is the anchor view. The post has a sample code. – Ron Jun 28 '12 at 15:40
  • But what is the menu in the picture that i added? – Eli Revah Jun 28 '12 at 16:04