Skip to content

Instantly share code, notes, and snippets.

@sudo5in5k
Created October 1, 2021 05:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudo5in5k/b7a368e536685fe2aa337bcb98cff2cf to your computer and use it in GitHub Desktop.
Save sudo5in5k/b7a368e536685fe2aa337bcb98cff2cf to your computer and use it in GitHub Desktop.
val description = if (checkedState.value) {
"次へ進むことができます"
} else {
"次へ進むには利用規約に同意する必要があります"
}
Button(modifier = Modifier
.semantics {
liveRegion = LiveRegionMode.Polite
contentDescription = description
}
.fillMaxWidth(),
enabled = checkedState.value,
onClick = {}) {
Text(text = "次へ進む", fontSize = 16.sp)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment