Skip to content

Instantly share code, notes, and snippets.

@polson
Created August 17, 2020 20:43
Show Gist options
  • Save polson/c9bab9b250b1be4876fee8fceb2d5694 to your computer and use it in GitHub Desktop.
Save polson/c9bab9b250b1be4876fee8fceb2d5694 to your computer and use it in GitHub Desktop.
private typealias DialogCallback<T> = T.() -> Unit
interface DialogBuilder<T> {
fun title(title: String)
fun title(titleResId: Int)
fun message(message: String)
fun message(messageResId: Int)
fun positiveButtonAction(block: DialogCallback<T>)
fun negativeButtonAction(block: DialogCallback<T>)
fun positiveButtonText(resId: Int)
fun positiveButtonText(title: String)
fun negativeButtonText(resId: Int)
fun negativeButtonText(title: String)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment