List of usage examples for android.webkit WebSettings setLayoutAlgorithm
public abstract void setLayoutAlgorithm(LayoutAlgorithm l);
From source file:com.android.mail.ui.ConversationViewFragment.java
private void setupOverviewMode() { // for now, overview mode means use the built-in WebView zoom and disable custom scale // gesture handling final boolean overviewMode = isOverviewMode(mAccount); final WebSettings settings = mWebView.getSettings(); final WebSettings.LayoutAlgorithm layout; settings.setUseWideViewPort(overviewMode); settings.setSupportZoom(overviewMode); settings.setBuiltInZoomControls(overviewMode); settings.setLoadWithOverviewMode(overviewMode); if (overviewMode) { settings.setDisplayZoomControls(false); layout = WebSettings.LayoutAlgorithm.NORMAL; } else {/*from w ww. j a v a 2s .c om*/ layout = WebSettings.LayoutAlgorithm.NARROW_COLUMNS; } settings.setLayoutAlgorithm(layout); }
From source file:com.tct.mail.ui.ConversationViewFragment.java
private void setupOverviewMode() { // for now, overview mode means use the built-in WebView zoom and disable custom scale // gesture handling final boolean overviewMode = isOverviewMode(mAccount); final WebSettings settings = mWebView.getSettings(); final WebSettings.LayoutAlgorithm layout; // TS: zhaotianyong 2015-03-13 EMAIL BUGFIX-932165 DEL_S // settings.setUseWideViewPort(overviewMode); // TS: zhaotianyong 2015-03-13 EMAIL BUGFIX-932165 DEL_E settings.setSupportZoom(overviewMode); settings.setBuiltInZoomControls(overviewMode); // TS: zhaotianyong 2015-03-13 EMAIL BUGFIX-932165 DEL_S // settings.setLoadWithOverviewMode(overviewMode); // TS: zhaotianyong 2015-03-13 EMAIL BUGFIX-932165 DEL_E if (overviewMode) { settings.setDisplayZoomControls(false); layout = WebSettings.LayoutAlgorithm.NORMAL; } else {//from w w w .j a va2s. co m layout = WebSettings.LayoutAlgorithm.NARROW_COLUMNS; } settings.setLayoutAlgorithm(layout); }