Hello, everyone :android-wave: [`bug/known issue/...
# compose
h
Hello, everyone 👋 [
bug/known issue/misimplementation?
] Inside my LazyColumn I have many text items and a zoomable Image, when I zoom the Image I noticed this strange behavior: The image is over the text above it, but it is under the text bellow it. 🤔 Is this a known issue?
Also, here's the code:
Copy code
LazyColumn {
        items(3) {
            Text(text = "Lorem Ipsum...")
        }
        item {
            Image(
                painter = painterResource(id = R.drawable.ic_photo),
                modifier = Modifier.size(200.dp).zoomable(rememberZoomState(snapBackOnRelease = true)),
                contentDescription = null,
            )
        }
        items(3) {
            Text(text = "Lorem Ipsum...")
        }
    }
What
zoomable
Modifier is doing is just changing the Image scale and offset
t
You can use the Modifier.zIndex to put it on front of all other elements
h
hmmm... it worked 😄 ✅ Thanks, @Timo Drick
r
For reference this is not an issue: just like with views the default drawing order is the "layout order" (first child ia drawn first etc.). That's why zIndex exists
h
Interesting. Thanks for the details @romainguy