类似于微信朋友圈图片这样的是在listview中嵌套gridview还是动态加入多个imageview呢?
怪我咯2017-04-18 09:19:23
It should be to add multiple imageviews dynamically. You can turn on the display layout boundary in the developer options, or GPU overdrawing. You will find that the overdrawing of the image list becomes less the further back and more towards the front, such as three pictures per line. In this case, the first picture is the darkest, with at least three layers of layout, the second picture is slightly lighter, and the last picture is basically not overdrawn. I guess WeChat may use a cascading type of layout, such as RelativeLayout
黄舟2017-04-18 09:19:23
You can consider usingGenerally, the first View will not be measured multiple times in
AbsListView
里再嵌套使用AbsListView
的,onMeasure(...)
. Therefore, it may cause the scrolling to be stuck.
to implement it. Use Baidu or Google. GridLayout
+ ViewStub
You can also consider customizing the view.
Reference open source projects: