Last active
October 8, 2021 02:16
-
-
Save navczydev/67247949acef437eeb38674b8abc431a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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