Releases: skydoves/Balloon
1.1.5
1.1.4
1.1.3
🎉 Released a new version 1.1.3
! 🎉
What's new?
- The minimum API level is changed 16 -> 17.
- Fixed some issues (#25, #27, #33)
- Added new functionalities:
setElevation
,setArrowColor
,setArrowColorResource
.
setElevation
We can set the shadow of the balloon.
setArrowColor, setArrowColorResource
We can set the specific color of the arrow, regardless of the background color.
1.1.2
🎉 Released a new version 1.1.2
! 🎉
What's new?
The balloon popup wraps content from now. (#1)
So we can use wrap_content
to the custom layouts without using setWidth
and setHeight
methods.
- setWidth(120)
- setHeight(65)
+ setPadding(8) // sets 8dp padding for all directions (left-top-right-bottom)
We can use setPaddingLeft
, setPaddingTop
, setPaddingRight
, setPaddingBottom
instead of the setPadding
.
Also, still we can use the setWidth
and setHeight
methods instead of the setPadding
.
Width and height
We can control the size of the width and height using 3 ways: Padding, Specific size, Screen Ratio.
Padding
Balloon wraps a content. So the balloon's width and height size will be decided by the content.
We can set the size of the balloon using paddings of the content.
balloon.setPadding(6) // sets 6dp padding to all directions (left-top-right-bottom)
balloon.setPaddingLeft(8) // sets 8dp padding to content's left.
balloon.setPaddingTop(12) // sets 12dp padding to content's top.
Specific size
We can set the specific size of the balloon regardless of contents.
balloon.setWidth(220) // sets 220dp size width.
balloon.setHeight(160) // sets 160dp size height.
According to screen ratio
Also, we can set the width according to the ratio of the horizontal screen's size.
balloon.setWidthRatio(0.5f) // sets width as 50% of the horizontal screen's size.
1.1.1
1.1.0
1.0.9
1.0.8
1.0.7
Released version 1.0.7.
Features :
- Implemented relay functions.
We can show balloon popup sequentially using relayShow
method.
The relayShow
method makes that setOnDismissListener of the first balloon is reset to show the
next balloon and returns an instance of the next balloon.
customListBalloon
.relayShowAlignBottom(customProfileBalloon, circleImageView) // relay to customListBalloon
.relayShowAlignTop(customTagBalloon, bottomNavigationView, 130, 0) // relay to customProfileBalloon
// show sequentially customListBalloon-customProfileBalloon-customTagBalloon
customListBalloon.showAlignBottom(toolbar_list)
- Support for XML animations (#10)
We can set animation custom xml style using setBalloonAnimationStyle
method.
<style name="ElasticAndFadeOut">
<item name="android:windowEnterAnimation">@anim/elastic_center</item>
<item name="android:windowExitAnimation">@anim/fade_out</item>
</style>
setBalloonAnimationStyle(R.style.ElasticAndFadeOut)
1.0.6
Released version 1.0.6.
Features :
- Pass down View & MotionEvent to listeners (#6)
OnBalloonClickListener
fun onBalloonClick(view: View)
OnBalloonOutsideTouchListener
fun onBalloonOutsideTouch(view: View, event: MotionEvent)
- Support for setting TypeFace type (#7)
We can set theTypeface
object usingsetTypeface(value: Typeface)
function.
fun setTextTypeface(value: Typeface)
- Added setting drawable using
__Resource
functionality.
before
.setTextColor(ContextCompat.getColor(baseContext, R.color.white_87))
.setIconDrawable(ContextCompat.getDrawable(baseContext, R.drawable.ic_edit))
.setBackgroundColor(ContextCompat.getColor(baseContext, R.color.skyBlue))
after
.setTextColorResource(R.color.white_87)
.setIconDrawableResource(R.drawable.ic_edit)
.setBackgroundColorResource(R.color.skyBlue)