load WebView cached image into an ImageView

前端 未结 1 1160
我寻月下人不归
我寻月下人不归 2020-12-19 10:08

I have a WebView that caches its images into a directory using these settings:

mWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mWeb         


        
1条回答
  •  一整个雨季
    2020-12-19 10:45

    The resources are saved inside ApplicationCache.db which is an SQLite database. The images you're looking for could be retrieved from the database, but the format of the database may change between Android versions so implementing a compatible way to do this will be hard. I think you'd be better off downloading and caching the images yourself, outside of the WebView.

    0 讨论(0)
提交回复
热议问题