Java – how to create a listview with multiple views

My question is – how to create a custom list view instead of just repeating a custom view, but like in instagram or other applications, where the list contains other views, it looks like a scrolling view, a list view, other Android views, but Roman guy said that "a list view in a scrolling view is a very bad way", and I agree with it, I don't believe Google uses this way

What is the best way to implement this feature using listview or recycler view

Solution

To implement the UI, you must define multiple view types for listview or recyclerview; A very similar question has been answered here

In your example, you will have two view types:

>< horizontal scroll > this is an embedded horizontal recyclerview / listview. >< View > this is the view type you define

This concept has many tutorials Because of the advantages over listview, I recommend that you use recyclerview

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>