Skip to content

Different size devices ballon position problem #compose #780

Open
@androidos1831

Description

@androidos1831

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)
                    },
                    
                )
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions