I want to show Indeterminate progress dialog when user performs some action like signing up. The old way it was possible using ProgressDialog.
For compose, I found this How can I render plain android ProgressBar with Compose? But this is not exactly what I'm looking for as it's just a view. It does not cover the screen like dialog does.
With CircularProgressIndicator I'm able to achieve this:

As you can see it's shown below the views.
I want to create something like this:

It should have:
How can I achieve this in Jetpack compose?
You can use the Dialog composable:
var showDialog by remember { mutableStateOf(false) }
if (showDialog) {
    Dialog(
        onDismissRequest = { showDialog = false },
        DialogProperties(dismissOnBackPress = false, dismissOnClickOutside = false)
    ) {
        Box(
            contentAlignment= Center,
             modifier = Modifier
                .size(100.dp)
                .background(White, shape = RoundedCornerShape(8.dp))
        ) {
            CircularProgressIndicator()
        }
    }
}

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With