NoB*_*ugs 1 android freeze webview toast
我在WebChromeClient中为嵌入式WebView设置了一个javascript alert()处理程序:
@Override
public boolean onJsAlert(WebView view, String url, String message, final android.webkit.JsResult result)
{
Log.d("alert", message);
Toast.makeText(activity.getApplicationContext(), message, 3000).show();
return true;
};
Run Code Online (Sandbox Code Playgroud)
不幸的是,这只显示一次弹出式Toast,然后WebView停止响应任何事件.我甚至无法使用我的菜单命令加载另一个页面.我没有在LogCat中看到错误,这可能是什么问题?
| 归档时间: |
|
| 查看次数: |
1968 次 |
| 最近记录: |