Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different size devices ballon position problem #compose #780

Open
androidos1831 opened this issue Feb 3, 2025 · 0 comments
Open

Different size devices ballon position problem #compose #780

androidos1831 opened this issue Feb 3, 2025 · 0 comments

Comments

@androidos1831
Copy link

Please complete the following information:
-Ballon
-Since 1.6.4 and last version

Describe the Bug:
Different size devices ballon position is wrong

Expected Behavior:
Here its 2 device 6 inch and 4.7 inch.

Image Image

Code

var balloonWindow: BalloonWindow? by remember { mutableStateOf(null) }
val builder = rememberBalloonBuilder {
    setArrowSize(16)
    setArrowPosition(0.94f)
    setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
    setWidth(BalloonSizeSpec.WRAP)
    setHeight(BalloonSizeSpec.WRAP)
    setPadding(10)
    setMarginHorizontal(8)
    setCornerRadius(8f)
    setBackgroundColorResource(R.color.black)
    setLifecycleOwner(lifecycleOwner)
    setBalloonAnimation(BalloonAnimation.OVERSHOOT)
}

  Balloon(
                builder = builder,
                onBalloonWindowInitialized = { balloonWindow = it },
                onComposedAnchor = { },
                balloonContent = {
                    Text(
                        ....
                    )
                }
            ) {
                SampleComponent(
                
                    clickIcon = {
                        balloonWindow?.showAtCenter(yOff = -40)
                    },
                    
                )
            }
@androidos1831 androidos1831 changed the title Different size devices ballon position problem Different size devices ballon position problem #compose Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant