Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

corbind-recyclerview

To add androidx recyclerview bindings, import corbind-recyclerview module:

dependencies {
    implementation("ru.ldralighieri.corbind:corbind-recyclerview:1.12.1")
}

List of extensions

Component Extension Description
RecyclerView.Adapter dataChanges Called when the RecyclerView's adapter data has been changed
RecyclerView childAttachStateChangeEvents Called when a view is attached to or detached from the RecyclerView.
flingEvents Handle a fling given the velocities in both x and y directions
scrollEvents Called when a scrolling event has occurred on that RecyclerView.
scrollStateChanges Called when RecyclerView's scroll state changes.

Example

rv.scrollStateChanges() // Flow<Int>
    .onEach { /* handle RecyclerView scroll state change events */ }
    .flowWithLifecycle(lifecycle)
    .launchIn(lifecycleScope) // lifecycle-runtime-ktx

More examples in source code