A bottom sheet dialog for Jetpack Compose that provides the same syntax as AlertDialog.
Add JitPack repository to root build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add OverlappingPanelsCompose dependency to app build.gradle
dependencies {
implementation 'com.github.X1nto:BottomSheetDialogCompose:1.0.1'
}
Add JitPack repository to root build.gradle
allprojects {
repositories {
...
maven(url = "https://jitpack.io")
}
}
Add OverlappingPanelsCompose dependency to app build.gradle
dependencies {
implementation("com.github.X1nto:BottomSheetDialogCompose:1.0.1")
}
var showDialog by remember { mutableStateOf(false) }
Button(onClick = {
showDialog = true
}) {
Text("Show Dialog")
}
if (showDialog) {
BottomSheetDialog(onDismissRequest = {
showDialog = false
}) {
//Your content
}
}
Check out the sample app for a better example on how to use the library.