Giter VIP home page Giter VIP logo

Comments (7)

skydoves avatar skydoves commented on July 24, 2024 3

Hi, @GuillemRoca , @rajal2009
It is fixed on version 1.1.7.
Thank you for your issue! :)

from balloon.

skydoves avatar skydoves commented on July 24, 2024 2

@GuillemRoca @rajal2009
Hi, I checked this issue just now and I will try to fix it soon!
If you have any idea, please let me know or make a pull request! Thank you for your issue :)

from balloon.

skydoves avatar skydoves commented on July 24, 2024 2

@rajal2009
Also, I checked the setArrowColor method is not working when the color is white.
It will be fixed on the next release! Thank you for your issue :)

from balloon.

GuillemRoca avatar GuillemRoca commented on July 24, 2024 2

I've finally had time to test it and it works as intended! Great work and great library! :D

from balloon.

GuillemRoca avatar GuillemRoca commented on July 24, 2024 1

Hello @skydoves!

After a brief investigation, I believe this could be caused by this.

In the method:

  private fun initializeBalloonListeners() {
    this.onBalloonClickListener = builder.onBalloonClickListener
    this.onBalloonDismissListener = builder.onBalloonDismissListener
    this.onBalloonOutsideTouchListener = builder.onBalloonOutsideTouchListener
    this.bodyView.setOnClickListener {
      this.onBalloonClickListener?.onBalloonClick(it)
      if (builder.dismissWhenClicked) dismiss()
    }
    with(this.bodyWindow) {
      setOnDismissListener { onBalloonDismissListener?.onBalloonDismiss() }
      setBackgroundDrawable(ColorDrawable(Color.WHITE))
      isOutsideTouchable = true
      setTouchInterceptor(object : View.OnTouchListener {
        @SuppressLint("ClickableViewAccessibility")
        override fun onTouch(view: View, event: MotionEvent): Boolean {
          if (event.action == MotionEvent.ACTION_OUTSIDE) {
            if (builder.dismissWhenTouchOutside) {
              [email protected]()
            }
            onBalloonOutsideTouchListener?.onBalloonOutsideTouch(view, event)
            return true
          }
          return false
        }
      })
    }
  }


I've changed the setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT)) to White and now the elevation is displayed correctly! 🍾

The bad thing is that it messes with the arrow and the background set in the API. Maybe you can help me get to the final solution.

from balloon.

rajal2009 avatar rajal2009 commented on July 24, 2024

Yes, I am also using setElevation and setArrowColor but not working.

it's just display normal background without elevation and arrow color can not be changed

from balloon.

GuillemRoca avatar GuillemRoca commented on July 24, 2024

Awesome! I will take a look and test it! 😄

from balloon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.