Closed chengmenghuiAndroid closed 4 years ago
我建议 在MessagePicturesLayout类加载图片哪里增加方法 mRecyclerView.addOnScrollListener(getListener(thumbList, i, iPicture)); 避免滑动过程中加载图片失败 ,直接滑动停止后加载图片; 这里为了避免重复设置增加开销,设置了一个sIsScrolling 标志变量来做判断。 /**
对于MessagePicturesLayout 当时的设计定位只是为了在Demo中演示常见的'9宫格'效果,实现方案比较粗糙.
MessagePicturesLayout
NineGridView
使用它来替代MessagePicturesLayout是不错的选择.
我建议 在MessagePicturesLayout类加载图片哪里增加方法 mRecyclerView.addOnScrollListener(getListener(thumbList, i, iPicture)); 避免滑动过程中加载图片失败 ,直接滑动停止后加载图片; 这里为了避免重复设置增加开销,设置了一个sIsScrolling 标志变量来做判断。 /**