Untitled
unknown
plain_text
2 years ago
2.4 kB
7
Indexable
@Composable fun DialogUpdateAvailable( message: String, onDismiss: () -> Unit, onUpdate: () -> Unit, ){ Dialog( onDismissRequest = { onDismiss() }, DialogProperties( dismissOnBackPress = true, dismissOnClickOutside = true ), ) { Column( modifier = Modifier .fillMaxWidth() .clip(shape = RoundedCornerShape(10.dp)) .background(BackgroundPrimary, shape = RoundedCornerShape(10.dp)) .padding(10.dp) ) { Row( horizontalArrangement = Arrangement.Center, modifier = Modifier .fillMaxWidth() .padding(18.dp) ) { Image( painter = painterResource(id = R.drawable.ic_undraw_cloud_files), "", modifier = Modifier.size(180.dp) ) } Text( text = "New update is available", fontSize = 18.sp, fontWeight = FontWeight.SemiBold, color = TextColor, modifier = Modifier.padding(12.dp), ) Text( modifier = Modifier.padding(start = 12.dp, end = 12.dp), text = message, color = TextColor ) Row ( modifier = Modifier .padding(top = 5.dp) .fillMaxWidth() ) { OutlinedButton( onClick = { onDismiss() }, modifier = Modifier .fillMaxWidth() .padding(8.dp) .weight(1F) ) { Text(text = "Cancel") } Button( onClick = { onUpdate() }, modifier = Modifier .fillMaxWidth() .padding(8.dp) .weight(1F) ) { Text(text = "Update") } } } } }
Editor is loading...