1 我想在我的應用程序中爲webview創建一個上下文菜單。 我希望當用戶長時間點擊一個鏈接時,會彈出一個上下文菜單。 像這樣的東西(左圖和,而不是列表視圖的我想要一個網頁視圖):如何爲web視圖製作上下文菜單? 感謝名單的前期。 來源 2012-06-28 Eli Revah +1 看到這個問題和接受的答案。 http://stackoverflow.com/questions/3449098/enable-longclick-in-webview – Squonk
1 你有多種選擇可供選擇:PopupWindow,ListPopupWindow和PopupMenu 參考:Android custom Overflow-menu (Without actionbar and no menubutton) 來源 2012-06-28 15:20:00 Ronnie +0 我想要一個上下文菜單,就像我給你展示的圖片上的菜單。 – +1 你可以使用'ListPopupWindow' ..但是既然你想在長按點上顯示列表,你需要使用'PopupWindow',因爲它可以用來顯示位置(x,y) – Ronnie +1 按照建議使用'PopupMenu'在那個環節。長按列表項是錨定視圖。該帖子有一個示例代碼。 – Ronnie
看到這個問題和接受的答案。 http://stackoverflow.com/questions/3449098/enable-longclick-in-webview – Squonk