Balloon

Balloon implements a customizable tooltips popup with and arrow and animations.

See also

(https://github.com/skydoves/balloon)

Parameters

context

A context for creating and accessing internal resources.

builder

A Balloon.Builder for creating an instance of the Balloon.

Types

Link copied to clipboard
class Builder(context: Context)

Builder class for creating Balloon.

Link copied to clipboard
abstract class Factory

An abstract factory class for creating Balloon instance. A factory implementation class must have a default (non-argument) constructor. This class is used to initialize an instance of the Balloon lazily in Activities and Fragments.

Properties

Link copied to clipboard

A main content window of the popup.

Link copied to clipboard
var isShowing: Boolean = false

Denotes the popup is showing or not.

Link copied to clipboard

Interface definition for a callback to be invoked when a balloon view is initialized.

Link copied to clipboard

An overlay window of the background popup.

Functions

Link copied to clipboard

clears all persisted preferences.

Link copied to clipboard
fun dismiss()

dismiss the popup menu.

Link copied to clipboard

dismiss the popup menu with milliseconds delay.

Link copied to clipboard

gets a arrow view of the balloon popup window.

Link copied to clipboard

gets a content view of the balloon popup window.

Link copied to clipboard

gets measured height size of the balloon popup.

Link copied to clipboard

gets measured width size of the balloon popup.

Link copied to clipboard
open override fun onDestroy(owner: LifecycleOwner)

dismiss automatically when lifecycle owner is destroyed.

Link copied to clipboard
open override fun onPause(owner: LifecycleOwner)

dismiss when the LifecycleOwner be on paused.

Link copied to clipboard
fun relayShowAlign(align: BalloonAlign, balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view depending on the align alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAlignBottom(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view as the bottom alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAlignLeft(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view as the left alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAlignRight(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view as the right alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAlignTop(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view as the top alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAsDropDown(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon

Shows the balloon on an anchor view as drop down with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard
fun relayShowAtCenter(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0, centerAlign: BalloonCenterAlign = BalloonCenterAlign.TOP): Balloon

Shows the balloon on an anchor view as the center alignment with x-off and y-off and shows the next balloon sequentially. This function returns the next balloon.

Link copied to clipboard

sets whether the popup window will be attached in the decor frame of its parent window. If you want to show up balloon on your DialogFragment, it's recommended to use with true. (#131)

Link copied to clipboard

sets a OnBalloonClickListener to the popup.

sets a OnBalloonClickListener to the popup using lambda.

Link copied to clipboard

sets a OnBalloonDismissListener to the popup.

sets a OnBalloonDismissListener to the popup using lambda.

Link copied to clipboard

sets a OnBalloonInitializedListener to the popup. The OnBalloonInitializedListener.onBalloonInitialized will be invoked when inflating the body content of the balloon is finished.

sets a OnBalloonInitializedListener to the popup using a lambda. The OnBalloonInitializedListener.onBalloonInitialized will be invoked when inflating the body content of the balloon is finished.

Link copied to clipboard

sets a OnBalloonOutsideTouchListener to the popup.

sets a OnBalloonOutsideTouchListener to the popup using lambda.

Link copied to clipboard

sets a OnBalloonOverlayClickListener to the overlay popup.

sets a OnBalloonOverlayClickListener to the overlay popup using lambda.

Link copied to clipboard

sets a View.OnTouchListener to the overlay popup

sets a View.OnTouchListener to the overlay popup using lambda.

Link copied to clipboard

sets a View.OnTouchListener to the popup.

Link copied to clipboard

Checks if the balloon should show up.

Link copied to clipboard
fun showAlign(align: BalloonAlign, mainAnchor: View, subAnchorList: List<View> = listOf(), xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view depending on the align alignment with x-off and y-off.

Link copied to clipboard
fun showAlignBottom(anchor: View, xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view as the bottom alignment with x-off and y-off.

Link copied to clipboard
fun showAlignLeft(anchor: View, xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view as the left alignment with x-off and y-off.

Link copied to clipboard
fun showAlignRight(anchor: View, xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view as the right alignment with x-off and y-off.

Link copied to clipboard
fun showAlignTop(anchor: View, xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view as the top alignment with x-off and y-off.

Link copied to clipboard
fun showAsDropDown(anchor: View, xOff: Int = 0, yOff: Int = 0)

Shows the balloon on an anchor view as drop down with x-off and y-off.

Link copied to clipboard
fun showAtCenter(anchor: View, xOff: Int = 0, yOff: Int = 0, centerAlign: BalloonCenterAlign = BalloonCenterAlign.TOP)

Shows the balloon over the anchor view (overlap) as the center aligns. Even if you use with the ArrowOrientationRules.ALIGN_ANCHOR, the alignment will not be guaranteed. So if you use the function, use with ArrowOrientationRules.ALIGN_FIXED and fixed ArrowOrientation.

Link copied to clipboard
fun update(anchor: View, xOff: Int = 0, yOff: Int = 0)

updates popup and arrow position of the popup based on a new target anchor view with additional x-off and y-off.

Link copied to clipboard
fun updateSizeOfBalloonCard(width: Int, height: Int)

Inherited functions

Link copied to clipboard
open override fun onCreate(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onResume(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onStart(@NonNull p0: LifecycleOwner)
Link copied to clipboard
open override fun onStop(@NonNull p0: LifecycleOwner)