s. srichomthong
s. srichomthong

Reputation: 495

Is there another solutions instead of nested Recyclerview

Now my code is about Nested RecyclerView for 3 layer example

The customer wants this.

Is there another solutions to handle this with good performance.

While I'm using Nested RecyclerView it lags and slow if a lot of product, comment, order and reply to display

Upvotes: 3

Views: 459

Answers (2)

Vishal Pawar
Vishal Pawar

Reputation: 4340

Use this cool library https://github.com/lisawray/groupie you can find implementation details here https://medium.com/@pedrocarrillo/comments-in-a-recylcerview-e7537235cd33

Upvotes: 0

Erythrozyt
Erythrozyt

Reputation: 804

Nested Recyclerviews are a bad practice in the material design or google app design guidelines. You will have trouble with a bad and wrong scroll behaviour, it is simply not possible to work with this fluently as a user. Also your views will not be recycled and if your content grows the app will act very slow! There are workarounds but it is all a bad practice and more a bad design. You should inform your customers because there are not aware of those design failures and the technical bottlenecks.

A better way would be to enable to collapse the nested views. And just scroll the whole view or to use paging inside all nested views.

Upvotes: 3

Related Questions