Nikolas Guillen Leon
11/21/2022, 2:43 PM.onGloballyPositioned { layoutCoordinates ->
imageHeight =
with(localDensity) { layoutCoordinates.size.height.toDp() }
imageWidth =
with(localDensity) { layoutCoordinates.size.width.toDp() }
}
And I'm using them in an offset calculation like this
val offsetTop = windowInfo.screenHeight.minus(imageHeight).div(4)
val offsetStart = windowInfo.screenWidth.minus(imageWidth).div(4)
Tgo1014
11/21/2022, 3:30 PMNikolas Guillen Leon
11/21/2022, 3:52 PMNikolas Guillen Leon
11/21/2022, 4:14 PMNikolas Guillen Leon
11/21/2022, 4:14 PM