Android examples for User Interface:WebView
set WebView page cache
//package com.book2s; import java.lang.reflect.Method; import android.webkit.WebSettings; public class Main { /**/*from w ww .j a v a2 s . co m*/ * set page cache * * @param settings * @param capacity */ public static void setWebViewPageCache(WebSettings settings, int capacity) { try { Method setPageCache = settings.getClass().getMethod( "setPageCacheCapacity", new Class[] { int.class }); setPageCache.invoke(settings, new Object[] { capacity }); } catch (Exception e) { e.printStackTrace(); } } }