5
我想表明的PopupMenu中的WebView我的應用程序如Gmail。機器人如何在網頁視圖顯示的PopupMenu例如Gmail
這裏是我的代碼:
webView.addJavascriptInterface(new WebAppInterface(getActivity()), "ScriptToAndroid");
<div class="moreover_icon" onclick="showPopup('file_attach_path', event)">
<img class="overflow_icon" src="android_moreover_icon"/>
</div>
<script type="text/javascript">
function showPopup(file_path, event) {
ScriptToAndroid.showPopupDialog(file_path, pos_x, pos_y);
}
</script>
@JavascriptInterface
public void showPopupDialog(String filePath, int x, int y) {
//show PopupMenu
}
有誰需要回答? – nAkhmedov 2015-03-26 10:14:57