G
G
geron2017-03-07 08:51:14
Android
geron, 2017-03-07 08:51:14

Is it possible to use one RecyclerView for multiple lists?

Hello!
I am developing an application, the application will have five different lists. Somehow, not very hunting saws a separate activity, fragment, RecyclerView for each list. Enter they differ only in adapters and markup for item-s. Hence the need arose to file one screen (Activity, Fragment, RecyclerView) for lists, just substitute various lists into it. Can you please tell me how this can be implemented? Is it even possible to do this? Maybe there are some libraries that will simplify this work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2017-03-07
@geronix

Well, actually, yes, there is an adapter for this. You just need logic that will slip the right adapter, and that's it. No additional libraries are needed for this.
In addition, the time has passed when one activity == one screen. It is worth sawing separate screens on fragments.
Well, you should think in advance that screens in the future may differ not only in lists, and take this into account when developing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question