AmrJyniat
11/24/2021, 9:19 AMAlertDialog
when the layout direction change to RTL, so the title, text and buttons align to the wrong alignment in that case, is it bug or am I missed anything? code in 🧵@Composable
fun ShowSureDeleteTaskDialog(
onDismissButton: () -> Unit,
onConfirmButton: () -> Unit,
) {
AlertDialog(
onDismissRequest = onDismissButton,
title = {
Text(
text = stringResource(R.string.warning),
style = texTitleStyle
)
},
text = {
Text(
text = stringResource(R.string.are_you_sure_to_delete_the_task)
)
},
confirmButton = {
Button(
onClick = onConfirmButton,
colors = ButtonDefaults.buttonColors(
backgroundColor = GoogleLightRed,
contentColor = Color.White
)
) {
Text(text = stringResource(id = R.string.delete))
}
},
dismissButton = {
Button(onClick = onDismissButton) {
Text(text = stringResource(id = R.string.cancel))
}
},
)
}