List of usage examples for android.webkit WebView getLayerType
public int getLayerType()
From source file:com.quarterfull.newsAndroid.NewsDetailFragment.java
/** * This function has no effect on devices with api level < HONEYCOMB * @param htmlPage/* w w w.ja v a 2s . c o m*/ * @param webView */ public static void SetSoftwareRenderModeForWebView(String htmlPage, WebView webView) { if (htmlPage.contains(".gif")) { webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null); Log.v("NewsDetailFragment", "Using LAYER_TYPE_SOFTWARE"); } else { //webView.setLayerType(WebView.LAYER_TYPE_HARDWARE, null); //Log.v("NewsDetailFragment", "Using LAYER_TYPE_HARDWARE"); if (webView.getLayerType() == WebView.LAYER_TYPE_HARDWARE) { Log.v("NewsDetailFragment", "Using LAYER_TYPE_HARDWARE"); } else if (webView.getLayerType() == WebView.LAYER_TYPE_SOFTWARE) { Log.v("NewsDetailFragment", "Using LAYER_TYPE_SOFTWARE"); } else { Log.v("NewsDetailFragment", "Using LAYER_TYPE_DEFAULT"); } } }