skydoves / Balloon

:balloon: Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.
https://skydoves.github.io/libraries/balloon/html/balloon/com.skydoves.balloon/index.html
Apache License 2.0
3.7k stars 289 forks source link

Stoke color to Balloon and Arrow #38

Open JohnGeorgiou opened 4 years ago

JohnGeorgiou commented 4 years ago

Hi , and thanks for thiis useful library, I try to create a simple balloon with white background , arrow, and black stroke color. Is it possible to have a stroke outline to balloon? Alternatively, is it possible to create a shadow to simulate a stroke?

thanks in advance

skydoves commented 4 years ago

Hi, I was thinking about this issue for a few days, but there is no clear way to resolve this issue. Because of the body of the balloon and the arrow is actually separated each other. Thank you for your issue :)

JohnGeorgiou commented 4 years ago

Yes I see, the two items have the same background, the only thing you have to do is to add a line with the background color over the arrow, I could add a commit, but unfortunately Im a Java person

skydoves commented 4 years ago

Making a stroke on a balloon (except the bottom, only oblique sides) is an easy problem. But we should remove the little line against the position of the arrow on the balloon body. If not there will be a boundary between the arrow and the balloon body.

JohnGeorgiou commented 4 years ago

Look at the attached drawing to see what I mean balloon

znakeeye commented 4 years ago

Why not use a clipping rectangle (the balloon) for the arrow?

The suggested hack is not desirable.

XLAR-8 commented 3 years ago

Hey @skydoves, great work with the lib. are we expecting this feature anytime soon? is there a way to set alpha to arrow too (below code gives color difference in balloon and arrow)? and how to set border highlight(strokes) at present?

class BalloonFactory : Balloon.Factory() {
    override fun create(
        context: Context,
        lifecycle: LifecycleOwner?
    ): Balloon = createBalloon(context) {
        setArrowSize(17)
        setHeight(45)
        setWidth(160)
        setAlpha(0.8f)
        setArrowColorResource(R.color.trans_secondary_80)
        setCornerRadius(4f)
        setPadding(4)
        setTextResource(R.string.series_state_complete_msg)
        setTextSize(TEXT_SIZE.toFloat())
        setTextColorResource(R.color.fefefe)
        setBackgroundColorResource(R.color.black_04pc)
        setLifecycleOwner(lifecycleOwner)
        arrowOrientation = ArrowOrientation.LEFT
        build()
    }
}
emretanerc commented 1 year ago

Any progress? We have difficulty reading because the balloon is opened on a white background. We want to change the border color.

rezafaraji93 commented 1 year ago

We are also looking for this change. the border of balloon!

hb-ranjeet commented 2 weeks ago

Any update on this.