Skip to content

Commit

Permalink
Merge pull request #564 from skydoves/compose/fix-windows
Browse files Browse the repository at this point in the history
Remove the constraints for measuring the composable content
  • Loading branch information
skydoves authored Dec 27, 2023
2 parents 441c3e9 + 6eac56b commit 9cde427
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.skydoves.balloon.compose
import android.view.MotionEvent
import android.view.View
import android.view.ViewGroup
import androidx.compose.runtime.Stable
import com.skydoves.balloon.ArrowOrientation
import com.skydoves.balloon.ArrowOrientationRules
import com.skydoves.balloon.Balloon
Expand All @@ -36,9 +37,10 @@ import com.skydoves.balloon.showAlignTop
import com.skydoves.balloon.showAsDropDown
import com.skydoves.balloon.showAtCenter

/**
/**qw
* BalloonWindow is an interface that define all executable behaviors of the balloon's window.
*/
@Stable
public interface BalloonWindow {

public val anchorView: View
Expand Down
6 changes: 2 additions & 4 deletions balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,8 @@ public class Balloon private constructor(
measureTextWidth(binding.balloonText, binding.balloonCard)
}
this.binding.root.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
if (!builder.isComposableContent) {
this.bodyWindow.width = getMeasuredWidth()
this.bodyWindow.height = getMeasuredHeight()
}
this.bodyWindow.width = getMeasuredWidth()
this.bodyWindow.height = getMeasuredHeight()
this.binding.balloonText.layoutParams = FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.MATCH_PARENT,
Expand Down

0 comments on commit 9cde427

Please sign in to comment.