mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01:00
Update linked devices screen.
This commit is contained in:
@@ -6,6 +6,7 @@ import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
||||
import androidx.compose.foundation.layout.FlowRow
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -128,6 +129,33 @@ object Dialogs {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Customizable progress spinner that shows [message] below the spinner to let users know
|
||||
* an action is completing
|
||||
*/
|
||||
@Composable
|
||||
fun IndeterminateProgressDialog(message: String) {
|
||||
androidx.compose.material3.AlertDialog(
|
||||
onDismissRequest = {},
|
||||
confirmButton = {},
|
||||
dismissButton = {},
|
||||
text = {
|
||||
Column(
|
||||
verticalArrangement = Arrangement.Center,
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
modifier = Modifier.fillMaxWidth().fillMaxHeight()
|
||||
) {
|
||||
Spacer(modifier = Modifier.size(24.dp))
|
||||
CircularProgressIndicator()
|
||||
Spacer(modifier = Modifier.size(20.dp))
|
||||
Text(message)
|
||||
}
|
||||
},
|
||||
modifier = Modifier
|
||||
.size(200.dp)
|
||||
)
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalLayoutApi::class)
|
||||
@Composable
|
||||
fun PermissionRationaleDialog(
|
||||
@@ -237,3 +265,9 @@ private fun MessageDialogPreview() {
|
||||
private fun IndeterminateProgressDialogPreview() {
|
||||
Dialogs.IndeterminateProgressDialog()
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun IndeterminateProgressDialogMessagePreview() {
|
||||
Dialogs.IndeterminateProgressDialog("Completing...")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user