👋 Rookie question!
I am trying to align the icon with the text so that they are on the same height.
This is the code for reproducing it
@Composable
fun IconTopLeftText(
backgroundImageId: Int,
iconId: Int,
padding: Int = 16,
imagePadding: Int,
text: String,
textColor: Int,
textSize: Int
) {
Box(modifier = Modifier
.padding(padding.dp)
.semantics(true) { }) {
val drawable = AppCompatResources.getDrawable(LocalContext.current, backgroundImageId)
Image(
rememberDrawablePainter( drawable ),
contentDescription = null)
Row(
horizontalArrangement = Arrangement.Start,
verticalAlignment = <http://Alignment.Top|Alignment.Top>,
) {
Image(
painter = painterResource(id = iconId),
modifier = Modifier
.padding(end = imagePadding.dp),
contentDescription = null
)
Text(
text = text,
fontSize = textSize.sp,
color = colorResource(id = textColor)
)
}
}
}
Any ideas what am I missing please?