[英]cyclic slideshow in Android
I'm trying to implement a cyclic slideshow. 我正在尝试实施循环幻灯片放映。
I've implemented it using a RecyclerView. 我已经使用RecyclerView实现了它。
What's the most efficient way to implement this ? 实现此目的最有效的方法是什么? I had an idea of storing the bitmaps themselves in SharedPreferences. 我有个想法,将位图本身存储在SharedPreferences中。 Then, when scrolling, instead of loading the image url each time to a new cell and deleting from an old one. 然后,在滚动时,而不是每次都将图像URL加载到一个新的单元格并从一个旧的单元格中删除。
Try to replace 尝试更换
@Override
public int getItemCount() {
return itemsData.size();
}
from 从
@Override
public int getItemCount() {
return Integer.MAX_VALUE;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.