make dialog modal (#6015)

Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
This commit is contained in:
Parneet Singh 2024-12-11 11:38:39 +05:30 committed by GitHub
parent c175a4ee03
commit 9a876fa5e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 53 additions and 62 deletions

View file

@ -66,6 +66,7 @@ class QuizActivity : AppCompatActivity() {
AlertDialog.Builder(this)
.setTitle(getString(R.string.warning))
.setMessage(getString(R.string.quiz_back_button))
.setCancelable(false)
.setPositiveButton(R.string.continue_message) { dialog, _ ->
val intent = Intent(this, QuizResultActivity::class.java)
dialog.dismiss()
@ -137,6 +138,7 @@ class QuizActivity : AppCompatActivity() {
AlertDialog.Builder(this)
.setTitle(title)
.setMessage(message)
.setCancelable(false)
.setPositiveButton(R.string.continue_message) { dialog, _ ->
questionIndex++
if (questionIndex == quiz.size) {

View file

@ -181,6 +181,7 @@ class QuizResultActivity : AppCompatActivity() {
val shareMessage = view.findViewById<TextView>(R.id.alert_text)
shareMessage.setText(R.string.quiz_result_share_message)
alertadd.setView(view)
alertadd.setCancelable(false)
alertadd.setPositiveButton(R.string.about_translate_proceed) { dialog, _ ->
shareScreen(screenshot)
}