【问题标题】:Using android square's picasso only for caching and decoding仅使用 android square 的 picasso 进行缓存和解码
【发布时间】:2014-11-01 00:13:22
【问题描述】:

我想使用 Picasso (https://github.com/square/picasso) 进行缓存和位图解码,我遇到的问题是我的请求是一个 url,例如:server.com/component/1 这给了我一个原型我解析的文件,其中包含一些其他信息和我解码为位图的图像的字节串。

有没有办法为此使用 picasso,即使请求 url 不只是用于图像或仅用于缓存和解码我的位图,我已经尝试使用类 Target,但它仅适用于 url一张图片。

谢谢。

【问题讨论】:

    标签: android picasso square


    【解决方案1】:

    我认为这是不可能的,你能做的只是缓存,load 方法只有 4 个覆盖 UriStringBitmapint。因此,当您使用Bitmap 作为参数时,您将能够缓存您的位图。 Picasso 只是作为图像加载器创建的,所以我认为它没有从服务器接收所有数据的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-28
      • 1970-01-01
      • 2018-08-27
      • 2015-11-25
      • 2018-08-22
      • 2016-03-11
      • 2015-11-15
      相关资源
      最近更新 更多