【发布时间】:2017-07-31 13:26:22
【问题描述】:
我正在开发 android 应用程序,我正在使用提交按钮和表单提交加载自定义 html 数据。稍后,当我从它要求外部浏览器的 html 内容内部重定向时,自定义 html 会在 webview 中成功加载。我怎样才能修复在同一个 webview 中工作?
这是我的代码:
wb = (WebView)findViewById(R.id.webv);
wb.getSettings().setLoadsImagesAutomatically(true);
wb.getSettings().setJavaScriptEnabled(true);
wb.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
String customHtml= "<html>...</html>"
wb.loadData(customHtml, "text/html", "UTF-8");
【问题讨论】: