Skip to content

Instantly share code, notes, and snippets.

@navczydev
Last active October 8, 2021 02:16
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 navczydev/67247949acef437eeb38674b8abc431a to your computer and use it in GitHub Desktop.
Save navczydev/67247949acef437eeb38674b8abc431a to your computer and use it in GitHub Desktop.
Row(
Modifier
.clickable(
onClickLabel = stringResource(R.string.post_card_history_click_label)
) {
navigateToArticle(post.id)
}
.semantics {
customActions = listOf(
CustomAccessibilityAction(
label = "Show fewer like this"
// action returns boolean to indicate success
action = { openDialog = true; true }
)
)
}
) {
// ...
CompositionLocalProvider(LocalContentAlpha provides ContentAlpha.medium) {
IconButton(
// it makes sure that Talkback will not interact with this item
modifier = Modifier.clearAndSetSemantics { },
onClick = { openDialog = true }
) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = stringResource(R.string.cd_show_fewer)
)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment