Created
October 16, 2013 14:56
-
-
Save laaptu/7009033 to your computer and use it in GitHub Desktop.
Load webpage from assets
http://stackoverflow.com/questions/3152422/webview-load-html-from-assets-directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ViewWeb extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.webview); | |
WebView wv; | |
wv = (WebView) findViewById(R.id.webView1); | |
wv.loadUrl("file:///android_asset/aboutcertified.html"); // now it will not fail here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment