android - problem of reusing image list after grouping
迷茫2017-05-24 11:38:06
0
1
663
Find similar pictures, group similar pictures into a group, and put all groups into a list. How to solve the reuse problem of hundreds of pictures Added pictures, mainly because the number of each group is not fixed
This question is somewhat similar to WeChat Moments. Friends may share 1, 2, 3, 4, or 9 pictures. I happened to briefly analyze the mechanism of Moments. If the largest group of pictures has There won’t be too many words that can be consistent with WeChat, that is, a group is an item, and each item is a viewgroup. The data is displayed by traversing the group of pictures through dynamic addView. If there are too many pictures in some groups, I recommend redoing the data. One layer of encapsulation, that is, each group can have up to three images, and each item is also a parent layout that wraps three image views. You can refer to Facebook's plan for optimizing lists, which is the way of encapsulating data that I mentioned.
This question is somewhat similar to WeChat Moments. Friends may share 1, 2, 3, 4, or 9 pictures. I happened to briefly analyze the mechanism of Moments. If the largest group of pictures has There won’t be too many words that can be consistent with WeChat, that is, a group is an item, and each item is a viewgroup. The data is displayed by traversing the group of pictures through dynamic addView. If there are too many pictures in some groups, I recommend redoing the data. One layer of encapsulation, that is, each group can have up to three images, and each item is also a parent layout that wraps three image views. You can refer to Facebook's plan for optimizing lists, which is the way of encapsulating data that I mentioned.