Created
December 3, 2019 23:25
-
-
Save bartekpacia/725856fc35fec2a321a5a2ddba49a75d to your computer and use it in GitHub Desktop.
dialog with forced stack button layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
btnAccept.setOnClickListener { | |
val builder = MaterialAlertDialogBuilder(this, R.style.ThemeOverlay_MaterialComponents_MaterialAlertDialog) | |
.setTitle(R.string.are_you_sure) | |
.setMessage(R.string.are_you_sure_accept) | |
.setPositiveButton(" ${getString(R.string.accept)}") { _, _ -> | |
requestDetailViewModel.acceptRequest(relationResponse.id) | |
} | |
.setNeutralButton(" ${getString(R.string.cancel)}") { _, _ -> | |
// Nothing to do | |
} | |
builder.show() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment