Skip to content

Commit

Permalink
Use ProgressDialog instead of Snackbar again
Browse files Browse the repository at this point in the history
  • Loading branch information
robbi5 committed Oct 23, 2023
1 parent 0f406c6 commit 040ed94
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package eu.pretix.pretixscan.droid.ui

import android.Manifest
import android.app.ProgressDialog
import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
Expand All @@ -15,8 +16,6 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
import androidx.core.content.ContextCompat
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.BaseTransientBottomBar
import com.google.android.material.snackbar.Snackbar
import com.google.zxing.Result
import eu.pretix.libpretixsync.setup.*
import eu.pretix.libpretixui.android.scanning.HardwareScanner
Expand Down Expand Up @@ -181,7 +180,13 @@ class SetupActivity : AppCompatActivity(), ZXingScannerView.ResultHandler {
}
ongoing_setup = true

val pdialog = Snackbar.make(binding.root, R.string.setup_progress, BaseTransientBottomBar.LENGTH_INDEFINITE)
val pdialog = ProgressDialog(this).apply {
isIndeterminate = true
setMessage(getString(R.string.setup_progress))
setTitle(R.string.setup_progress)
setCanceledOnTouchOutside(false)
setCancelable(false)
}

fun resume() {
pdialog.dismiss()
Expand Down

0 comments on commit 040ed94

Please sign in to comment.