WebView htmlWebView = (WebView) findViewById(R.id.webView1);
try {
htmlWebView.getSettings().setPluginState(PluginState.ON);
//presentationWebView.getSettings().setPluginsEnabled(true);
htmlWebView.getSettings().setJavaScriptEnabled(true);
htmlWebView.getSettings().setLoadWithOverviewMode(true);
htmlWebView.getSettings().setAllowFileAccess(true);
htmlWebView.loadUrl("file:///android_asset/htmldatat/index.html");
htmlWebView.setWebViewClient(new WebViewClient(){
@Override public boolean shouldOverrideUrlLoading(WebView view, String url)
{
return false;
}
});
htmlWebView.getSettings().setBuiltInZoomControls(true);
htmlWebView.setWebViewClient(new WebViewClient(){
@Override public boolean shouldOverrideUrlLoading(WebView view, String url)
{
return false;
}
});
htmlWebView.getSettings().setBuiltInZoomControls(true);
} catch (Exception e) {
e.printStackTrace();
}
No comments:
Post a Comment