I am working on a project in Android Compose to make an info app where users can print part of the info to a physical printer. I used the Printable Compose weight to send the info to the printer, it has worked up until now but when I moved to the latest version of Android Studio Hedgehog, I get a rendering error with this weight. I haven't found any fix to this problem.
val printController = rememberPrintableController()
Printable(controller = printController) {
firstText
secondText
theredText
}
Icon( // print button
painter = painterResource(id = R.drawable.ic_baseline_print_24),
contentDescription = "print card",
modifier = Modifier
.size(35.dp)
.constrainAs(print) {
top.linkTo(parent.top, margin = 5.dp)
start.linkTo(back.end, margin = 40.dp)
}
.clickable {
printController.print("Text")
}
)