Created
March 10, 2023 18:44
-
-
Save gabrielbmoro/60981931fbc8ea1aa98cea95375bfb30 to your computer and use it in GitHub Desktop.
AccessibilityArticle6
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
@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