Code example for WebSettings

Methods: setJavaScriptEnabledsetPluginState, setPluginsEnabled

0
		mWebView = new WebView(context);
 
		mWebView.setBackgroundColor(0xff000000);
 
		WebSettings webSettings = mWebView.getSettings();
		webSettings.setJavaScriptEnabled(true);
		webSettings.setPluginsEnabled(true);
		webSettings.setPluginState(PluginState.ON);
 
		mWebView.setWebChromeClient(new WebChromeClient() {
			@Override 
			public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
				Log.v(TAG, "onConsoleMessage msg:" + consoleMessage.message());
				return super.onConsoleMessage(consoleMessage);
			} 
		}); 
 
//		// オーバーレイの下の15dp分を開けておく(FlasyPlayerのツールバー部分) 
//		LayoutParams overlayLp = new LayoutParams( 
//				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);