setRecycledViewPool(...)
can be useful when we have a nested RecyclerView. See this blog post for details. A short description of the same link is added here.
Consider a case where you have a nested RecyclerView
s and inner RecycleView
s share the same view structure. RecycledViewPool
provides a seemless way to share views between these inner (nested) RecyclerView
s.
An example of such case could be seen in the following image:
As you can see the types of views for both lists are same.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…