Created
January 4, 2022 12:03
-
-
Save ferPrieto/c375505d08a1da3dbf53c73a8bd9854f to your computer and use it in GitHub Desktop.
This is an example of a Composable function to define an Icon with a Content description
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 | |
private fun FilterIcon(modifier: Modifier, onClick: () -> Unit) { | |
Box(modifier) { | |
IconButton( | |
onClick = onClick | |
) { | |
Image( | |
painter = painterResource(R.drawable.ic_filter), | |
contentDescription = "Filter Button" | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment