I am having a database (Firebase), which contains details of users, where each user can add any amount of personnel details. Like one person can add only name and age while another user can add a name, age, and address.
I am also building an android app that displays those details using a recyclerView.I am using a basic recycler view.
Now the problem is a recyclerView requires a pre-defined model class with pre-defined getters and setters, but my database is dynamic and can have any number of values.
Like some users may only have a name and age while others may have a name, age, address. For the first user, we only have to define the name, age, and define getters and setters, but for the second user we have to define the extra address variable and assign getters and setters. Adding them pre-hand is not a good idea because users can add any number of details.
I need a recyclerView that can show any number of values, how should I do that.
PS: I think no code is needed because I am using a basic recycle view. Please tell me if I should post the code too.