Code example for WebView: Displaying local web pages

Methods: getSettingsloadDatasetWebChromeClient

0
 
	@Override 
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
 
		WebView web = new WebView(this);
 
		WebSettings webSettings = web.getSettings();
		webSettings.setSavePassword(false);
		webSettings.setSaveFormData(false);
		webSettings.setJavaScriptEnabled(true);
		webSettings.setSupportZoom(false);
 
		web.setWebChromeClient(new MyWebChromeClient());
 
		String htmldata = "";//loadResToString(R.raw.help, this);
		 
		web.loadData(htmldata, "text/html", "UTF-8");
		 
		//web.loadUrl("http://www.google.com.br"); 
 
		setContentView(web);
	} 
 
	public static String loadResToString(int resId, Activity ctx) {
 
		try {