我不能够缓存图像,因为我用MvvmCross bindind图片 [英] I am not able to cache the images as I bindind Image using MvvmCross

查看:181
本文介绍了我不能够缓存图像,因为我用MvvmCross bindind图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid Xamarin使用Application.I毕加索组件缓存和下载图像,它工作正常。结果
Picasso.With(this.Activity).Load(在这里我通过URL)进入(ImageView的);
现在,我使用MvvmCross样结合:

I am new to Xamarin Android Application.I use Picasso component to cache and download Images and It works fine.
Picasso.With (this.Activity).Load ("Here I pass Url").Into (imageview); Now I am using MvvmCross binding like:

<Mvx.MvxImageView
   android:layout_width="120dp"
   android:layout_height="140dp"
   android:id="@+id/ProductImageView"
   android:scaleType="fitXY"
   local:MvxBind="ImageUrl URL" />

下面网址是我在Viewmodel.My问题设置一个字符串,它的下载图像,但是不能缓存如毕加索does.Can人的形象建议我该怎么办?
如何使用毕加索绑定和缓存图像?

Here URL is a string which I set in Viewmodel.My problem is, it downloads image but can not cache that image like picasso does.Can anyone suggest me what to do? How to use Picasso to bind and cache image ?

推荐答案

您可以缓存与毕加索的图像不以任何ImageViewers加载它是这样的:

You can cache an image with Picasso without loading it in any ImageViewers like this:

Picasso. with(Context). load(ImageFile.Url). into(null);

但是我不知道你以后可以用这个。

But im not sure how you can use this later.

您可以尝试自己的实现缓存,它很容易,看看这个文章

You can try your own implementation of caching, it's easy, check this article

这篇关于我不能够缓存图像,因为我用MvvmCross bindind图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆