DRY principle for creating adapters #4131
sidsharma2002
started this conversation in
General Discussion
Replies: 1 comment
-
I'm not sure I understand exactly the proposal. BindableAdapter is actually the generic pattern we use for creating recycler view adapters. Could you maybe share a brief code example to better illustrate what you're thinking? If there are further ways to simplify recycler view creation, that's definitely something we can consider refactoring. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just a thought, for example, createRecyclerViewAdapter function in HomeFragmentPresenter builds and return a bindableAdapter. Maybe we could move this fun in a separate kotlin file to make it reusable.
A potential side effect can be a lots of 'when' statements but i think that can be handled if extracted in proper functions.
Beta Was this translation helpful? Give feedback.
All reactions