简体   繁体   English

我是否需要在 recyclerView 或 recyclerView 中使用列表视图?

[英]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 ?

image_ss

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.

相关问题 我应该在 recyclerView 中使用 recyclerView 还是有更好的方法? - Should I use a recyclerView inside a recyclerView or is there a better way? 在嵌套RecyclerView的列表内列出 - List inside list for nested RecyclerView 水平RecyclerView内部的水平RecyclerView - Horizontal RecyclerView inside a Horizontal RecyclerView 在RecyclerView列表中突出显示textview - Highlight textview inside RecyclerView list 如何在 PopupWindow 中使用 RecyclerView - How to use RecyclerView inside PopupWindow 另一个 RecyclerView 内的 ViewPager 内的 RecyclerView 不滚动 - RecyclerView inside a ViewPager inside another RecyclerView not scrolling Horizo​​ntal RecyclerView 里面的 RecyclerView 里面的 CoordinatorLayout - Horizontal RecyclerView inside RecyclerView that inside CoordinatorLayout Android-RecyclerView:是否需要为每个recyclerView使用适配器和ItemObject? 如何分别处理点击? - Android - RecyclerView: Do I need to use an adapter and an ItemObject for each recyclerView ?. How do I handle the clicks separately? 如何使用 RecyclerView 逐步加载带有 RecyclerView 的屏幕滚动屏幕? - How do I scroll the screen with the RecyclerView inside with RecyclerView load items step by step? 适配器内部的RecyclerView onItemClickListener和View.onClickListener - RecyclerView onItemClickListener and View.onClickListener inside adapter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM