我有一个WebView,使用以下设置将其图像缓存到目录中:
mWebView.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
mWebView.getSettings().setAppCacheMaxSize( 8 * 1024 * 1024 ); // 8MB
mWebView.getSettings().setAppCachePath(getApplicationContext().getCacheDir().getAbsolutePath());
mWebView.getSettings().setAllowFileAccess(true);
mWebView.getSettings().setAppCacheEnabled(true);
我希望能够将使用此WebView缓存的图像加载到ImageView中.
我正在查看缓存目录指向的目录使用adb shell(/data/data/com.example.webviewtest/cache),我找到了以下文件夹:
> ApplicationCache.db
> com.android.opengl.shaders_cache
> webviewCacheChromium
有没有办法在这些目录中找到下载的图像?
如果是,我可以将它们加载到Bitmap(在ImageView中使用)吗?