Corbind logo
Follow Star

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

dependencies {
    implementation("ru.ldralighieri.corbind:corbind-drawerlayout:1.11.0")
}

List of extensions

Component Extension Description
DrawerLayout drawerOpens Called when a drawer has settled in a completely open or close state.

Example

drawer.drawerOpens() // Flow<Boolean>
    .onEach { isOpen ->
      tvMessage = "Drawer completely ${ if (isOpen) "open" else "close"}"
    }
    .flowWithLifecycle(lifecycle)
    .launchIn(lifecycleScope) // lifecycle-runtime-ktx

More examples in source code