Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.setDismissWhenTouchOutside(false) did not work #766

Open
WilsonScott opened this issue Dec 19, 2024 · 0 comments
Open

.setDismissWhenTouchOutside(false) did not work #766

WilsonScott opened this issue Dec 19, 2024 · 0 comments

Comments

@WilsonScott
Copy link

Please complete the following information:

  • Library Version [1.6.11]
  • Affected Device(s) [Redmi Note 13]

Describe the Bug:
.setDismissWhenTouchOutside(false) did not work
when click outside , the balloon dismissed

Add a clear description about the problem.
Code:
balloon?.dismiss()
balloon = Balloon.Builder(this)
.setText(desc)
.setTextSize(13f)
.setTextTypeface(Typeface.SANS_SERIF)
.setTextColorResource(R.color.colorTextWhite)
.setTextGravity(Gravity.CENTER_VERTICAL)
.setArrowSize(6)
.setArrowColor(ContextCompat.getColor(this,themeColor))
.setArrowOrientation(ArrowOrientation.BOTTOM)
.setLifecycleOwner(this)
.setArrowPosition(0.5f)
.setCornerRadius(4f)
.setPaddingLeft(16)
.setPaddingRight(16)
.setPaddingTop(8)
.setPaddingBottom(8)
.setCornerRadius(12f)
.setIsVisibleOverlay(true)
.setMaxWidthRatio(0.5f)
.setOverlayPadding(0F)
.setOverlayPaddingColor(ContextCompat.getColor(this@MainActivity,R.color.transparent))
.setOverlayColorResource(R.color.colorDim)
.setOverlayPaddingColorResource(R.color.colorPrimary)
.setOverlayShape(BalloonOverlayRoundRect(radius, radius))
.setShouldPassTouchEventToAnchor(true)
.setDismissWhenTouchOutside(false)
.setFocusable(false)
.setBackgroundColor(ContextCompat.getColor(this, themeColor))
.setBalloonAnimation(BalloonAnimation.CIRCULAR)
.setBalloonHighlightAnimation(BalloonHighlightAnimation.HEARTBEAT)
.build()
anchorView.post {
if (balloon?.isShowing == false){
balloon?.showAlignTop(anchorView)
}
}
Expected Behavior:
when i clicked outside of the balloon , the balloon did not disappeared
A clear description of what you expected to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant