gpt4 book ai didi

android - 在通用图像加载器中为下载失败添加图像

转载 作者:行者123 更新时间:2023-11-29 18:04:54 25 4
gpt4 key购买 nike

在我的 monodroid 应用程序中,我使用通用图像加载器在 ListView 中显示图像。在显示图像之前,我会在图像上显示一个进度条。我想在下载失败时添加默认图像。是否可以?这是我用它显示图像的代码:

    ImageLoader = Com.Nostra13.Universalimageloader.Core.ImageLoader.Instance;
ImageLoader.DisplayImage(myobject.Images [0], imageView, Application.Options, newImageLoaderListener (progressbar));

这是一个monodroid代码。谢谢。

最佳答案

为此使用 ImageLoadingListener.onLoadingFailed()。在 onLoadingFailed() 中显示您的图像。

关于android - 在通用图像加载器中为下载失败添加图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13904846/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com