Reputation: 13787
Here is my coding
webView1.loadUrl("http://www.ppshein.com.mm/testimage.jpg");
What I want is I want to cache this image when image is completely loaded in webview. That's why it can be able to display when device is offline.
Upvotes: 2
Views: 3530
Reputation: 634
Add the next lines:
mWebView.getSettings().setAppCacheEnabled(true);
mWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
Upvotes: 2
Reputation: 11
you can open cacheMode.when your img downloaded,it will be in the/data/data/your packagename/cache the directories below
Upvotes: 0