【问题标题】:Caching Zoomable Web Image缓存可缩放的 Web 图像
【发布时间】:2013-09-06 08:04:49
【问题描述】:

查询

可缩放的网络图像 除了 ImageView,WebView 还可用于显示图像以及 Android 内置的 WebView 缩放支持。图像将居中并根据其方向填充 webview 的宽度或高度。

我正在使用,

        String url1 = "file:///mnt/sdcard/image.jpg";
            aq.id(R.id.webView1).progress(R.id.progress).webImage(url1);

我注意到,即使我断开连接并重新打开该应用程序,图像仍会显示。它被缓存了吗?我查看了它的sd卡文件夹,那里什么都没有。我想利用缓存的图像而不是多次获取它。

另外,我同时使用 Universal-Image-Loader 和 Android Query。我只是担心他们是否都可以读取缓存的图像。

       //Aquery
       //returns the cached file by url, returns null if url is not cached
       File file = aq.getCachedFile(url);

【问题讨论】:

    标签: java android universal-image-loader aquery


    【解决方案1】:

    每次调用时都会下载 url1 aq.id(R.id.webView1).progress(R.id.progress).webImage(url1);

    您的缓存文件正在返回到 File 文件对象,但您没有在其中使用它

    【讨论】:

      猜你喜欢
      • 2011-11-10
      • 2010-11-23
      • 1970-01-01
      • 1970-01-01
      • 2010-11-05
      • 1970-01-01
      • 2015-10-12
      • 2016-05-10
      • 1970-01-01
      相关资源
      最近更新 更多