Compose Balloon position is misplace
Closed this issue · 6 comments
Hey @waheedkhan-dev, thanks for reporting your issue.
Would you share your code base and the expected result? Thank you!
MY Balloon Content look like this
val builder = rememberBalloonBuilder {
setArrowSize(10)
setArrowPosition(0.5f)
setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
setWidth(BalloonSizeSpec.WRAP)
setHeight(BalloonSizeSpec.WRAP)
setPadding(12)
setMarginHorizontal(12)
setCornerRadius(8f)
setIsVisibleOverlay(true)
setBackgroundColorResource(R.color.white)
setOverlayColorResource(R.color.app_secondary)
setBalloonAnimation(BalloonAnimation.ELASTIC)
}
Balloon(
builder = builder,
balloonContent = {
Text(
toolTipText,
style = TextStyle(
fontFamily = workSansFamily,
fontWeight = FontWeight.Normal,
fontSize = 12.sp,
color = MaterialTheme.colorScheme.secondary,
textAlign = TextAlign.Start
)
)
}
) { balloonWindow ->
IconButton(onClick = {
balloonWindow.showAlignTop()
}) {
Icon(
painter = icon,
contentDescription = null,
tint = MaterialTheme.colorScheme.secondary
)
}
}
@skydoves it seems that since the latest version something with the positioning has broken.
I had to upgrade to 1.6.4 to get the setWidthRatio to work as it didn't before, but since 1.6.4 the alignment does not work correctly anymore
Can confirm, offsets and positions are broken on 1.6.4 with Compose, had to downgrade to 1.6.3 to get it to work.
Hey guys, balloon 1.6.5 has been released. Would you please check it out to see if this issue still occurs? Thank you!