Skip to content

Latest commit

 

History

History
 
 

alertdialog-appcompat-coroutines

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Alert Dialog AppCompat Coroutines

showAndAwait extension functions for AppCompat AlertDialog.

Supported platforms: Android.

Example

import splitties.alertdialog.appcompat.alertDialog
import splitties.alertdialog.appcompat.messageResource
import splitties.alertdialog.appcompat.coroutines.showAndAwait
import splitties.resources.txt

suspend fun shouldWeReallyDeleteFromTrash(): Boolean = alertDialog(
    message = txt(R.string.dialog_msg_confirm_delete_from_trash)
).showAndAwait(
    okValue = true,
    cancelValue = false,
    dismissValue = false
)

Download

implementation("com.louiscad.splitties:splitties-alertdialog-appcompat-coroutines:$splitties_version")