Android studio:如何人为显示一个网页?
Android studio: How to artificially display a webpage?
我想在未连接到互联网的情况下使用 chrome 访问网页时显示存储在 localstorage 中的 html 文件。
例如,如果您尝试在未连接到 Internet 的情况下访问 https://google.com
<p>google.com</p>
我要显示上面的 html 代码。
如何使用 android studio 执行上述任务?
*(我的母语不是英语,如有不适请见谅)
在activity
中使用此代码
WebView wv;
wv = (WebView) findViewById(R.id.webView1);
wv.loadUrl("file:///android_asset/aboutcertified.html");
我想在未连接到互联网的情况下使用 chrome 访问网页时显示存储在 localstorage 中的 html 文件。
例如,如果您尝试在未连接到 Internet 的情况下访问 https://google.com
<p>google.com</p>
我要显示上面的 html 代码。
如何使用 android studio 执行上述任务?
*(我的母语不是英语,如有不适请见谅)
在activity
中使用此代码 WebView wv;
wv = (WebView) findViewById(R.id.webView1);
wv.loadUrl("file:///android_asset/aboutcertified.html");