skydoves / Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.

Home Page:https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arrow always pointing up when using Compose v1.4.0-alpha03

joreilly opened this issue · comments

It looks like the arrow is always pointing up when using Compose v1.4.0-alpha03....if I go back to say 1.3.2 for example it's fine. Am using Balloon Compose v1.5.0.

Can reproduce by creating new Compose project in AS and for example changing Greeting composable to following (along with setting compose_version = '1.4.0-alpha03')

@Composable
fun Greeting(name: String) {

    val builder = rememberBalloonBuilder {
        setArrowSize(10)
        setWidthRatio(1.0f)
        setHeight(BalloonSizeSpec.WRAP)
        setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
        setArrowPosition(0.5f)
        setPadding(12)
        setMarginRight(12)
        setMarginLeft(12)
        setTextSize(15f)
        setCornerRadius(8f)
        setBackgroundColorResource(R.color.teal_200)
        setBalloonAnimation(BalloonAnimation.ELASTIC)
        setIsVisibleOverlay(true)
        setBalloonHighlightAnimation(BalloonHighlightAnimation.SHAKE)
        setDismissWhenClicked(true)
    }
    Row(modifier = Modifier.fillMaxSize(),
        verticalAlignment = Alignment.CenterVertically
    ) {

        Balloon(
            builder = builder,
            balloonContent = {
                Text(text = "Now you can edit your profile!")
            }
        ) { balloonWindow ->
            Text(
                modifier = Modifier.clickable { balloonWindow.showAlignTop() },
                text = "Hello $name!"
            )
        }
    }

}

This is what you see for example in this case
Screenshot_20230105_200802

@joreilly Thank you for reporting this issue! I just fixed it and it will be released on the next stable.

It was released in version 1.5.1. Thank you! 😄

@skydoves the arrow issue is fixed in 1.5.1 but seems to be change in behaviour regarding width/wrapping (full text is no longer shown here)?

Screenshot_20230106_201214

@joreilly Thanks for reporting another issue! 😄

I just released a new version 1.5.2. Please try to build with the new one and let me know if you face other issues. Thank you!