The ask me anything dialog must now contain text before you can press OK

This commit is contained in:
Mathieu 2022-01-05 10:59:43 +01:00
parent 170dc6b655
commit 39f95ec800

View File

@ -78,6 +78,7 @@ fun IconAlertDialogTextField(
) {
Column {
val (focusRequester) = FocusRequester.createRefs()
OutlinedTextField(
value = text,
onValueChange = textFieldValue,
@ -109,10 +110,11 @@ fun IconAlertDialogTextField(
}
TextButton(onClick = {
onOKClick(); openDialog.value = false
}) {
}, enabled = text.isNotEmpty()) {
Text(
text = stringResource(id = R.string.ok),
color = MaterialTheme.colors.secondary
//TODO: change color to gray when disabled
color = MaterialTheme.colors.secondary,
)
}
}