Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlrestoreStatesetWebViewClient

0
        setVolumeControlStream(AudioManager.STREAM_MUSIC);
 
        setContentView(R.layout.play_video);
 
        webView = (WebView) findViewById(R.id.play_video_contents);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setPluginsEnabled(true);
        webView.getSettings().setAllowFileAccess(true);
        webView.getSettings().setSupportZoom(true);
        webView.getSettings().setBuiltInZoomControls(true);
 
        webView.setWebViewClient(new Client());
        if (bundle != null) {
            webView.restoreState(bundle);
        } else { 
            webView.loadUrl(getVideoUrl());
        } 
 
        // Show warning if Flash plugin is not installed. 
        if (isFlashPluginInstalled()) { 
            Util.toast(this, R.string.play_video_loading, false);
Stop searching for code, let great code find you!  Add Codota to your java IDE