I want to populate a list (RecycleView or similar) with any number of elements in runtime.
Example:
//Data Models
Animal(spices: String, breed: Breed)
Breed(name: String, color: String)
The list should look something like:
Cats
-----------
Ragdoll
White
Bengal
Beige/Black
Dogs
-----------
Golden Retriever
Beige
German Shepard
Brown
St. Bernard
White/Brown
The list can be infinite long and each Animal can have an infinite amount of Breeds.
I have been using nested recyclers but I am afraid this will cause bad performance.
What is the "correct" way of populating this kind of list?