Voglio mostrare PopupMenu in webview sulla mia app come GMail.android come mostrare PopupMenu in webview come GMail
Ecco il mio codice:
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
}
Qualcuno deve rispondere? – nAkhmedov