Balloon icon indicating copy to clipboard operation
Balloon copied to clipboard

Arrow orientation top position not working with custom layout

Open MariaGiannaki opened this issue 2 years ago • 4 comments

Please complete the following information:

  • Library Version [v 1.4.7]
  • Affected Device(s) All tested devices with Android 11

Describe the Bug:

setArrowOrientation(ArrowOrientation.TOP) doesn't change the arrow's position to the top of the balloon and the arrow shows at the bottom. All the other orientations seem to be working as expected.

Expected Behavior:

setArrowOrientation(ArrowOrientation.TOP) should change the arrow's position to the top of the balloon.

MariaGiannaki avatar Sep 06 '22 10:09 MariaGiannaki

Hey, could you share your Balloon.Builder codes? Also, which method do you use for showing the balloon?

skydoves avatar Sep 06 '22 12:09 skydoves

Hey this is my builder

 val balloon = Balloon.Builder(context)
                .setLayout(tooltipLayout)
                .setBalloonAnimation(BalloonAnimation.CIRCULAR)
                .setCornerRadius(10f)
                .setWidthRatio(1f)
                .setMarginLeft(16)
                .setMarginRight(16)
                .setMarginTop(70)
                .setArrowSize(30)
                .setArrowOrientation(ArrowOrientation.TOP)
                .setArrowColor(ContextCompat.getColor(context, R.color.white))
                .setArrowAlignAnchorPadding(-60)
                .setIsVisibleOverlay(withOverlay)
                .setOverlayColorResource(R.color.transparent_grey)
                .setDismissWhenOverlayClicked(false)
                .setDismissWhenClicked(false)
                .setDismissWhenTouchOutside(false)
                .setOverlayShape(BalloonOverlayRoundRect(40f, 40f))

                balloon.build().showAlignTop(target)

It does work if I change the show method to showAlignBottom

MariaGiannaki avatar Sep 06 '22 12:09 MariaGiannaki

Hey, could you build again after removing the setArrowAlignAnchorPadding method?

skydoves avatar Sep 06 '22 13:09 skydoves

I removed the method but the arrow still shows at the bottom.

MariaGiannaki avatar Sep 06 '22 14:09 MariaGiannaki

I'm closing this issue because the issue is outdated.

skydoves avatar May 03 '23 13:05 skydoves