You can absolutely do that.
- Load all the data (through a web service call or by any other means).
- When data are retrieved, set them to the
RecyclerView
's adapter and call notifyDatasetChanged()
).
- Use the
RecyclerView
normally (i.e. binding data objects to the views in onBindViewHolder()
.
This way you will get what you want (having all data and not needing to load more as the user scrolls) and the benefits of the RecyclerView
, that creates as many views as needed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…