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

Preselected Items #42

Closed Togka closed 3 years ago

Togka commented 3 years ago

Good day. Tell me if it is possible to somehow pre-select some elements of the list when forming the adapter elements?

idanatz commented 3 years ago

Hi, Currently, there is no way to do that. What you can do is start selection manually using: oneAdapter.modules.itemSelectionModule?.actions?.startSelection() and then trigger a click programmatically on the root view of the element's view holder. I know it's not what you asked, but maybe you can achieve your goal with this direction.