Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.bc.ViewWeb;
- import android.app.Activity;
- import android.os.Bundle;
- import android.webkit.WebView;
- import android.webkit.WebViewClient;
- public class ViewWebActivity extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
- String myURL="file:///android_asset/hello.html";
- String mime="text/html";
- String encoding="utf-8";
- WebView wv=(WebView)findViewById(R.id.webView1);
- wv.getSettings().setJavaScriptEnabled(true);
- wv.setWebViewClient(new WebViewClient());
- wv.loadDataWithBaseURL(myURL, myURL, mime, encoding, myURL);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement