is there anyway posible to get the list of items inside my listadapter, cause the only method to access the list is submitList()
how to get the list of ListAdapter<Model,ViewHolder::class>
Asked Answered
Call getCurrentList()
. Quoting the docs:
Get the current List - any diffing to present this list has already been computed and dispatched via the ListUpdateCallback. If a null List, or no List has been submitted, an empty list will be returned.
class DevicesSavedAdapter : ListAdapter<GetDevicesResponse,DevicesSavedAdapter.DeviceSavedHolder>(DIFF_CALLBACK) { fun testGetList(){ getCurrentList() this.getCurrentList() } unresolved reference –
Parterre
@EderPadilla: Are you using
androidx.recyclerview.widget.ListAdapter
, and are you on the latest version? –
Ungotten you were right ! i was ussing 1.0.0 and I change it to 1.1.0-alpha05 thanks a lot 😬 –
Parterre
© 2022 - 2024 — McMap. All rights reserved.