1.加载网页实现界面显示
2.如果网页是在应用的assets目录下,那么加载方法及参数:
webView.loadUrl("file:///android_asset/xxx.html");
注意:参数file后面必须有三个“/”,android_asset也是固定的,可改变的是html网页的名称
3.如果是访问网络,使用url的情况,那么加载方法及参数:
webView.loadUrl("http://10.0.2.2:8080/web/phone_tos.html");
2.如果网页是在应用的assets目录下,那么加载方法及参数:
webView.loadUrl("file:///android_asset/xxx.html");
注意:参数file后面必须有三个“/”,android_asset也是固定的,可改变的是html网页的名称
3.如果是访问网络,使用url的情况,那么加载方法及参数:
webView.loadUrl("http://10.0.2.2:8080/web/phone_tos.html");