https://kotlinlang.org logo
Title
n

Nat Strangerweather

02/17/2022, 5:56 PM
Is it possible to animate a composable beyond its bounds? For instance, here, I have pieces in a
LazyVerticalGrid
I want these pieces to move outside of the grid. How can I do it? At the moment, they are moving but then disappear when they reach the edge of the
LazyVerticalGrid
. 🧵
@Composable
fun Board() {
    Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
        LazyVerticalGrid(
            cells = GridCells.Fixed(7),
            contentPadding = PaddingValues(7.dp),
        ) {
            items(49) { index ->
                Piece(index)
            }
        }
    }
}
t

theapache64

02/17/2022, 6:51 PM
I think you can use
SizeTransform(clip = false)
. See usage here
👍 1
n

Nat Strangerweather

02/17/2022, 6:59 PM
Thanks, will check it out!