Balloon icon indicating copy to clipboard operation
Balloon copied to clipboard

Wrong arrow position on small balloons.

Open vitali58AC opened this issue 3 years ago • 3 comments

Following information:

  • Library Version [v1.4.7]
  • Affected Device(s): All, including Samsung Galaxy Note 10+ with Android 12.0.

Describe the Bug:

Hello, I ran into a problem when positioning the position of the arrow on small balloons, if specified:

     setArrowPositionRules(ArrowPositionRules.ALIGN_ANCHOR)
     setArrowSize(BalloonSizeSpec. WRAP)

By setting setArrowAlignAnchorPaddingRatio you can adjust the correct position for a particular case, but the problem is that the content in my balloon can be different, if there is a lot of content, then the arrow is always in the right place, if it is small, then it shifts strongly to the right. The same if you use the standard arrow and do not specify a resource with a drawable. If you do not increase the size of the arrow and set:

     setArrowAlignAnchorPaddingRatio(2.0f)

That everything works as it should.

Expected Behavior:

If this is a bug, then I would be very happy to help fix it, if not, I will be grateful for help with the configuration. Thank you! balloon

vitali58AC avatar Aug 25 '22 13:08 vitali58AC

Hey @vitali58AC, I'm just wondering if there's a use case, such as a small balloon with an arrow that should be located at the end of the body.

skydoves avatar Aug 30 '22 12:08 skydoves

Hello @skydoves , in the screenshot in the issue, I expect the position of the arrow in the center, and if you add content (for example, 1 more icon with a number), then the arrow will be located correctly, exactly on the anchorView. In total, this balloon can have 5 elements (screenshot) and in this case, yes, the arrow will be located closer to the end. Thank you very much for your response!

vitali58AC avatar Aug 30 '22 12:08 vitali58AC

Hey @vitali58AC, I think this is a very tricky problem because it also depends on the corner radius of the body. I would recommend changing the position of the arrow following the size of your items for now. Let me think about any solutions, such as giving padding values to the arrow. Thanks for filing this!

skydoves avatar Aug 31 '22 06:08 skydoves