当前位置: 代码迷 >> Web前端 >> webview加载本土html、本apk内html和远程URL
  详细解决方案

webview加载本土html、本apk内html和远程URL

热度:157   发布时间:2012-07-02 17:46:22.0
webview加载本地html、本apk内html和远程URL

webview加载本地html、本apk内html和远程URL

?

//打开本包内assets目录下的index.html文件
wView.loadUrl(" file:///android_asset/index.html ");  

//打开本地sd卡内的index.html文件
wView.loadUrl("content://com.android.htmlfileprovider/sdcard/index.html");

//打开指定URL的html文件
wView.loadUrl(" http://m.oschina.net");

?

  相关解决方案