The ask me anything dialog must now contain text before you can press OK
This commit is contained in:
parent
170dc6b655
commit
39f95ec800
@ -78,6 +78,7 @@ fun IconAlertDialogTextField(
|
|||||||
) {
|
) {
|
||||||
Column {
|
Column {
|
||||||
val (focusRequester) = FocusRequester.createRefs()
|
val (focusRequester) = FocusRequester.createRefs()
|
||||||
|
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = text,
|
value = text,
|
||||||
onValueChange = textFieldValue,
|
onValueChange = textFieldValue,
|
||||||
@ -109,10 +110,11 @@ fun IconAlertDialogTextField(
|
|||||||
}
|
}
|
||||||
TextButton(onClick = {
|
TextButton(onClick = {
|
||||||
onOKClick(); openDialog.value = false
|
onOKClick(); openDialog.value = false
|
||||||
}) {
|
}, enabled = text.isNotEmpty()) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.ok),
|
text = stringResource(id = R.string.ok),
|
||||||
color = MaterialTheme.colors.secondary
|
//TODO: change color to gray when disabled
|
||||||
|
color = MaterialTheme.colors.secondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user