Skip to content

Instantly share code, notes, and snippets.

@gabrielbmoro
Created March 10, 2023 18:44
Show Gist options
  • Save gabrielbmoro/60981931fbc8ea1aa98cea95375bfb30 to your computer and use it in GitHub Desktop.
Save gabrielbmoro/60981931fbc8ea1aa98cea95375bfb30 to your computer and use it in GitHub Desktop.
AccessibilityArticle6
@Composable
fun PageIndicator(modifier: Modifier = Modifier, amountOfIndicators: Int, step: Int) {
val description = stringResource(
R.string.page_indicator_description,
amountOfIndicators,
step + 1
)
Row(
// parte adicionada
modifier.semantics(mergeDescendants = true) {
contentDescription = description
}
) {
repeat(amountOfIndicators) {
val isSelected = it <= step
Dot(isSelected)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment