idanatz / OneAdapter

A Viewholderless Adapter for RecyclerView, who supports builtin diffing, states (paging, empty...), events (clicking, swiping...), and more.
MIT License
470 stars 45 forks source link

It not a function to get the data from adapter. #44

Closed Qeveloper closed 3 years ago

Qeveloper commented 3 years ago

The OneAdapter class is not open, and then I can't get the data from the adapter. can support a function to read the data from the adapter?

idanatz commented 3 years ago

This is by design. Ideally, the items (or views) should be stateless and direct logic and state to a presenter or viewmodel. When working with OneAdapter you care about your models and data and not how they are reflected in the adapter. The adapter is not exposing its data since there are internal viewholders and logic that is irrelevant to the user.

What is the use case you need to access a specific item in the adapter?