mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-19 19:42:17 +02:00
Add getter for Checkbox prompt used in AlertDialogFacade
Replicates the MaterialDialog.getCheckboxPrompt() extension and it would be useful for migrating some dialogs.
This commit is contained in:
parent
b7bdcb1434
commit
d0c380564a
@ -182,6 +182,11 @@ fun AlertDialog.Builder.checkBoxPrompt(
|
||||
return this.setView(checkBoxView)
|
||||
}
|
||||
|
||||
fun AlertDialog.getCheckBoxPrompt(): CheckBox =
|
||||
requireNotNull(findViewById(R.id.checkbox)) {
|
||||
"CheckBox prompt is not available. Forgot to call AlertDialog.Builder.checkBoxPrompt()?"
|
||||
}
|
||||
|
||||
fun AlertDialog.Builder.customView(
|
||||
view: View,
|
||||
paddingTop: Int = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user