From 4a388cc75596a5fab68cfa82567269659d3ad6dd Mon Sep 17 00:00:00 2001 From: skydoves Date: Sat, 2 Nov 2024 11:04:06 +0900 Subject: [PATCH] Fix max width size limitation --- balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt index 5a2b77ba..6117bda9 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt @@ -1905,7 +1905,10 @@ public class Balloon private constructor( } builder.width != BalloonSizeSpec.WRAP -> builder.width.coerceAtMost(displayWidth) - else -> binding.root.measuredWidth.coerceIn(builder.minWidth, builder.maxWidth) + else -> + binding.root.measuredWidth + .coerceIn(builder.minWidth, builder.maxWidth) + .coerceAtMost(displayWidth) } }