Balloon
Balloon copied to clipboard
Wrong arrow position on small balloons.
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!

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.
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!

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!