Skip to content
This repository has been archived by the owner on Jul 13, 2020. It is now read-only.

Commit

Permalink
Merge pull request #112 from pawegio/master
Browse files Browse the repository at this point in the history
Cancel as default text for negativeButton
  • Loading branch information
yanex committed Nov 25, 2015
2 parents c2f5d02 + 6ed2929 commit 0b7f728
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dsl/static/src/common/AlertDialogBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class AlertDialogBuilder(val ctx: Context) {
builder.setPositiveButton(title, { dialog, which -> dialog.f() })
}

fun negativeButton(textResource: Int = android.R.string.ok, f: DialogInterface.() -> Unit = { dismiss() }) {
fun negativeButton(textResource: Int = android.R.string.cancel, f: DialogInterface.() -> Unit = { dismiss() }) {
negativeButton(ctx.getString(textResource), f)
}

Expand Down Expand Up @@ -135,4 +135,4 @@ class AlertDialogBuilder(val ctx: Context) {
builder.setCursor(cursor, { dialog, which -> f(which) }, labelColumn)
}

}
}

0 comments on commit 0b7f728

Please sign in to comment.