Created
August 19, 2023 19:54
-
-
Save zurche/3c80202e61a4177631d297dbf6d058e9 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
@Composable | |
private fun AssetIcon(iconDrawable: Int = R.drawable.apple) { | |
Box(modifier = Modifier.size(50.dp), contentAlignment = Alignment.Center) { | |
Canvas(modifier = Modifier, onDraw = { | |
val radius = 65f | |
drawCircle( | |
color = Color.White, | |
radius = radius | |
) | |
}) | |
Icon( | |
painter = painterResource(id = iconDrawable), | |
contentDescription = "Asset Icon", | |
tint = Color.Black, | |
modifier = Modifier | |
.size(25.dp) | |
.padding(bottom = 3.dp) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment