List of usage examples for android.webkit WebSettings setLightTouchEnabled
@Deprecated public abstract void setLightTouchEnabled(boolean enabled);
From source file:com.gh4a.FileViewerActivity.java
private void fillData(boolean highlight) { String data = new String(EncodingUtils.fromBase64(mContent.getContent())); WebView webView = (WebView) findViewById(R.id.web_view); WebSettings s = webView.getSettings(); s.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL); s.setAllowFileAccess(true);/* w w w .ja va 2 s. co m*/ s.setBuiltInZoomControls(true); s.setLightTouchEnabled(true); s.setLoadsImagesAutomatically(true); s.setPluginsEnabled(false); s.setSupportZoom(true); s.setSupportMultipleWindows(true); s.setJavaScriptEnabled(true); s.setUseWideViewPort(true); webView.setWebViewClient(webViewClient); if (FileUtils.isImage(mName)) { String htmlImage = StringUtils.highlightImage( "https://github.com/" + mRepoOwner + "/" + mRepoName + "/raw/" + mRef + "/" + mPath); webView.loadDataWithBaseURL("file:///android_asset/", htmlImage, "text/html", "utf-8", ""); } else { String highlighted = StringUtils.highlightSyntax(data, highlight, mName); webView.loadDataWithBaseURL("file:///android_asset/", highlighted, "text/html", "utf-8", ""); } }