Modernized and sophisticated tooltips, fully customizable with an arrow and animations for Android.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by skydoves about 4 years ago
π Released a new version 1.2.1
! π
update(anchor: View)
, update(anchor: View, xOff: Int, yOff: Int)
functionalities.appcompat
version to 1.2.0
stable.android.arch.lifecycle
package to androidx.arch.lifecycle
internally.setDismissWhenTouchOutside
with BalloonAnimation.CIRCULAR
. (#85)Published by skydoves about 4 years ago
π Released a new version 1.2.0
! π
setDismissWhenLifecycleOnPause
functionality. (#77)1setLifecycleOwner
.setIconGravity(value: IconGravity)
functionality for deciding gravity of the icon.OnBalloonInitializedListener
for listening initialized balloon content. (when balloon popup is shown)Published by skydoves over 4 years ago
π Released a new version 1.1.9
! π
setText
receives CharSequence
type instead of String
type for supporting SpannableStringBuilder
. (#70)setArrowLeftPadding(@Dp value: Int
setArrowRightPadding(@Dp value: Int)
setArrowTopPadding(@Dp value: Int)
setArrowBottomPadding(@Dp value: Int)
setTextGravity
functionality for aligning text. (#65)setArrowAlignAnchorPadding
/setArrowAlignAnchorPaddingRatio
functionalities for giving padding from the end of position when we using with ArrowConstraints.ALIGN_ANCHOR
. (#67)setWidthResource(@DimenRes value: Int)
setHeightResource(@DimenRes value: Int)
setPaddingResource(@DimenRes value: Int)
setSpaceResource(@DimenRes value: Int)
setArrowSizeResource(@DimenRes value: Int)
setCornerRadiusResource(@DimenRes value: Int)
setIconSizeResource(@DimenRes value: Int)
setIconSpaceResource(@DimenRes value: Int)
setElevationResource(@DimenRes value: Int)
Published by skydoves over 4 years ago
π Released a new version 1.1.8
! π
We can now determine the constraints of the arrow positioning using the ArrowConstraints
.
The default constraint is still ALIGN_BALLOON
, we can change the ArrowConstraints
using the
setArrowConstraints
method.
// Aligning arrow based on the anchor view.
// if an arrowPosition is 0.5, the arrow will be positioned center of the anchor view.
.setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
// Aligning arrow based on the balloon popup.
// if an arrowPosition is 0.5, the arrow will be positioned center of the balloon popup.
.setArrowConstraints(ArrowConstraints.ALIGN_BALLOON) // default
Make setDismissWhenTouchOutside
option makes focusable false (#53)
Add support for setting text with HTML (#54)
If the setTextIsHtml
is true, we can set text with HTML tags using TextForm
.
Setter for custom layout view instead of resource (#59)
Now we can set a layout as an instance of a view dynamically, not from resource layout.
FragmentBalloonLazy uses viewLifecycleOwner
instead of the fragmentLifecycleOwner
.
Published by skydoves over 4 years ago
πReleased a new version 1.1.7!π
setCircularDuration
functionality for changing the duration of circular revealed/unrevealed animation.lifecycle-common-java8
dependency for processing lifecycle annotations.setElevation
not working (#35)Published by skydoves over 4 years ago
πReleased a new version 1.1.6!π
setFocusable
attribute and the default value is true
(#49)Before the balloon can not dismiss automatically when pressed the back button, and we can touchable other views and balloons when a balloon popup is already showing.
From this release, the balloon popup is one target base by default, so if we press the back button, the balloon popup will be dismissed (we don't need to use OnBalloonOutsideTouchListener for dismissing), and it will be dismissed automatically if we touch outside of the balloon popup.
We can control these functionalities using the setFocusable
method (like before version).
Published by skydoves over 4 years ago
πReleased a new version 1.1.5!π
Fixed some issues related to measuring size of the balloon (#34)
Published by skydoves over 4 years ago
πReleased a new version 1.1.4
!π
Published by skydoves over 4 years ago
π Released a new version 1.1.3
! π
setElevation
, setArrowColor
, setArrowColorResource
.We can set the shadow of the balloon.
We can set the specific color of the arrow, regardless of the background color.
Published by skydoves over 4 years ago
π Released a new version 1.1.2
! π
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
.
We can control the size of the width and height using 3 ways: Padding, Specific size, Screen Ratio.
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.
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.
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.
Published by skydoves over 4 years ago
Released a new version 1.1.1
.
dismissWhenTouchOutside
: #17isRtlSupport
functionalities.true
, the balloon popup's layout will be right-to-left.Published by skydoves over 4 years ago
Released a new version 1.1.0
.
Implemented some features:
BalloonAnimation .OVERSHOOT
Published by skydoves almost 5 years ago
Released version 1.0.9
.
Features:
dismissWithDelay
functionality.Published by skydoves almost 5 years ago
Released version 1.0.7.
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)
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)
Published by skydoves about 5 years ago
Released version 1.0.6.
OnBalloonClickListener
fun onBalloonClick(view: View)
OnBalloonOutsideTouchListener
fun onBalloonOutsideTouch(view: View, event: MotionEvent)
Typeface
object using setTypeface(value: Typeface)
function.fun setTextTypeface(value: Typeface)
__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)
Published by skydoves about 5 years ago
Released new version 1.0.5
.
setDismissWhenShowAgain
and setDismissWhenClicked
to the Balloon.Builder
.setBackgroundColorResource
and setTextColorResource
funtions.Before
.setTextColor(ContextCompat.getColor(baseContext, R.color.white_87))
.setBackgroundColor(ContextCompat.getColor(baseContext, R.color.skyBlue))
After
.setTextColorResource(R.color.white_87)
.setBackgroundColorResource(R.color.yellow)
Published by skydoves about 5 years ago
Released version 1.0.4
.
Balloon's Show
methods and extensions can be used without any onClickListeners or delay.
Published by skydoves about 5 years ago
Released version 1.0.3
.
Implemented
Balloon.Factory
abstract class for creating Balloon instance using lazy delegate.balloon
lazy delegate extension on ComponentActivity, Fragment.Now it is possible to create a balloon instance using balloon keyword.
Before
CustomActivity.kt
class CustomActivity : AppCompatActivity() {
private val profileBalloon by lazy { BalloonUtils.getProfileBalloon(this, this) }
// ...
}
After
CustomActivity.kt
class CustomActivity : AppCompatActivity() {
private val profileBalloon by balloon(ProfileBalloonFactory::class)
// ...
}
ProfileBalloonFactory.kt
class ProfileBalloonFactory : Balloon.Factory() {
override fun create(context: Context, lifecycle: LifecycleOwner): Balloon {
return createBalloon(context) {
setLayout(R.layout.layout_custom_profile)
setArrowSize(10)
setArrowOrientation(ArrowOrientation.TOP)
setArrowPosition(0.5f)
setWidthRatio(0.55f)
setHeight(250)
setCornerRadius(4f)
setBackgroundColor(ContextCompat.getColor(context, R.color.background900))
setBalloonAnimation(BalloonAnimation.CIRCULAR)
setLifecycleOwner(lifecycle)
}
}
}
Published by skydoves about 5 years ago
released version 1.0.2
.
implemented missing method onDestroy
which dismiss automatically when lifecycle owner is onDestroy.