estevanfick
09/08/2021, 2:30 PMgraphicsLayer
to flip the card component and it’s working. But the problem is with the content, I dont know how to sync the both sides with the flip. Any tips?Zach Klippenstein (he/him) [MOD]
09/08/2021, 3:05 PMestevanfick
09/08/2021, 4:09 PMif (!rotated)
CreditCardFront(...)
else
CreditCardBack(...)
but, when I change the rotate
value, it draws the compose, and after, do the animations. I dont know how to sincronize the animation with the composable…estevanfick
09/08/2021, 4:19 PMColton Idle
09/08/2021, 4:46 PMestevanfick
09/08/2021, 5:03 PMColton Idle
09/08/2021, 6:09 PMpepos
09/08/2021, 6:11 PMpepos
09/08/2021, 6:15 PMpepos
09/08/2021, 6:15 PMpepos
09/08/2021, 6:18 PMCard(Modifier
.graphicsLayer(rotationY = rotation)
.visibility(rotationY > X) {
CreditCardFront()
}
Card(Modifier
.graphicsLayer(rotationY = rotation)
.visibility(rotationY < X) {
CreditCardBack()
}
you get the idea with this pseudocodepepos
09/08/2021, 6:19 PMrotated
variable to render your UI, just to trigger the animation, and base the rest of the UI rendering only on rotationY
varibleZach Klippenstein (he/him) [MOD]
09/08/2021, 6:54 PMCard(Modifier.graphicsLayer(rotationY = rotation)) {
if (rotationY > X) {
CreditCardFront()
} else {
CreditCardBack()
}
}
pepos
09/08/2021, 6:56 PMestevanfick
09/08/2021, 8:34 PMif (rotation < 90F) {
CreditCardFront()
} else {
CreditCardBack()
}
and then
fun CreditCardBack() {
Column(
modifier = Modifier.graphicsLayer {
rotationY = 180F
....
}
thanks a lot, I updated the gistpepos
09/08/2021, 9:05 PMZach Klippenstein (he/him) [MOD]
09/08/2021, 10:50 PMcameraDistance
to control kind of how intense that perspective effect is. Docs here.