[英]Do I need to use list view inside recyclerView or recyclerView inside recyclerView?
I have a set of events in single recyclerView.我在单个 recyclerView 中有一组事件。 Events are delimited by "\\n".事件由“\\n”分隔。 Each event in a single line.每个事件在一行中。 I need to populate the events in list manner( like events in Google-calendar app).我需要以列表方式填充事件(如 Google 日历应用程序中的事件)。 So for that, Do I need to use recyclerView inside parent recyclerView or use listView inside parent recyclerView ?因此,为此,我是否需要在父 recyclerView 中使用 recyclerView 或在父 recyclerView 中使用 listView ?
Which one will suit my needs + performance.哪一个适合我的需求+性能。 Or Is there any other way to populate this?或者有没有其他方法可以填充它?
Don't use ListView
anymore, because it has been replaced by RecyclerView
.不要再使用ListView
了,因为它已经被RecyclerView
取代了。 I don't understand, why do you need to use RecyclerView
inside RecyclerView
?我不明白,你为什么需要使用RecyclerView
里面RecyclerView
?
If you paragraph is not very long, you can just use TextView
inside a ScrollView
.如果你的段落不是很长,你可以在ScrollView
使用TextView
。
If you paragraph is very long, you can use RecyclerView
and use TextView
as the View
for the line item.如果您的段落很长,您可以使用RecyclerView
并使用TextView
作为行项目的View
。 Since RecyclerView
use ViewHolder
pattern, it will good for performance.由于RecyclerView
使用ViewHolder
模式,它对性能有好处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.