To add androidx slidingpanelayout bindings, import corbind-slidingpanelayout
module:
dependencies {
implementation("ru.ldralighieri.corbind:corbind-slidingpanelayout:1.11.0")
}
List of extensions
Component | Extension | Description |
---|---|---|
SlidingPaneLayout | panelOpens |
Called when a sliding pane becomes slid completely open or closed. |
panelSlides |
Called when a sliding pane’s position changes. |
Example
slider.panelOpens() // Flow<Boolean>
.onEach { isOpen ->
tv_message = "Panel completely ${ if (isOpen) "open" else "close"}"
}
.flowWithLifecycle(lifecycle)
.launchIn(scope)
More examples in source code