如何向我的图像添加 FadeInBitmapDisplayer 和 RoundedBitmapDisplayer?
这是我的 DisplayImageOptions
options = new DisplayImageOptions.Builder()
.showStubImage(R.drawable.appwidget
.cacheInMemory().displayer(new FadeInBitmapDisplayer(1500))
.build();
有没有可能只使用一次淡入效果?如果它已加载并且我向下滚动我的列表并再次向上滚动它不会第二次 FadeIn?
提前致谢!
最佳答案
How can I add a FadeInBitmapDisplayer AND a RoundedBitmapDisplayer to my Image?
当前版本不行。您可以创建自己的显示器(扩展 BitmapDisplayer)并将代码从 FadeInBitmapDisplayer 和 RoundedBitmapDisplayer 复制到您的类中。
And is it possible somehow to only use the FadeIn Effect once?
几乎一切皆有可能:) 但它不会那么方便。
您可以在某些 map 中保留显示的图像 URL ( Map<String, Boolean>
= [Image URL<->isDisplayed]) 并在 imageLoader.displayImage(...)
之前检查此 map 称呼。如果当前 URL 的图像在 map 中(即显示图像),则仅使用 RoundedBitmapDisplayer 的选项。如果当前 URL 的图像不在 map 中,则使用带有 FadeInBitmapDisplayer+RoundedBitmapDisplayer 显示器的选项。
关于android - 使用 2 个显示器的通用图像加载器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13661918/