BalloonWindow

interface BalloonWindow

BalloonWindow is an interface that define all executable behaviors of the balloon's window.

Properties

Link copied to clipboard
abstract val balloon: Balloon

Functions

Link copied to clipboard
abstract fun clearAllPreferences()

clears all persisted preferences.

Link copied to clipboard
abstract fun dismiss()

dismiss the popup menu.

Link copied to clipboard
abstract fun dismissWithDelay(delay: Long): Boolean

dismiss the popup menu with milliseconds delay.

Link copied to clipboard
abstract fun getBalloonArrowView(): View

gets a arrow view of the balloon popup window.

Link copied to clipboard
abstract fun getContentView(): ViewGroup

gets a content view of the balloon popup window.

Link copied to clipboard
abstract fun getMeasuredHeight(): Int

gets measured height size of the balloon popup.

Link copied to clipboard
abstract fun getMeasuredWidth(): Int

gets measured width size of the balloon popup.

Link copied to clipboard
abstract fun relayShowAlign(align: BalloonAlign, balloon: Balloon, 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
abstract fun relayShowAlignBottom(balloon: Balloon, 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
abstract fun relayShowAlignLeft(balloon: Balloon, 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
abstract fun relayShowAlignRight(balloon: Balloon, 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
abstract fun relayShowAlignTop(balloon: Balloon, 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
abstract fun relayShowAsDropDown(balloon: Balloon, 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
abstract fun relayShowAtCenter(balloon: Balloon, 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
abstract fun setIsAttachedInDecor(value: Boolean): Balloon

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
abstract fun setOnBalloonClickListener(onBalloonClickListener: OnBalloonClickListener?)

sets a OnBalloonClickListener to the popup.

abstract fun setOnBalloonClickListener(block: (View) -> Unit)

sets a OnBalloonClickListener to the popup using lambda.

Link copied to clipboard
abstract fun setOnBalloonDismissListener(onBalloonDismissListener: OnBalloonDismissListener?)

sets a OnBalloonDismissListener to the popup.

abstract fun setOnBalloonDismissListener(block: () -> Unit)

sets a OnBalloonDismissListener to the popup using lambda.

Link copied to clipboard
abstract fun setOnBalloonInitializedListener(onBalloonInitializedListener: OnBalloonInitializedListener?)

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

abstract fun setOnBalloonInitializedListener(block: (View) -> Unit)

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
abstract fun setOnBalloonOutsideTouchListener(onBalloonOutsideTouchListener: OnBalloonOutsideTouchListener?)

sets a OnBalloonOutsideTouchListener to the popup.

sets a OnBalloonOutsideTouchListener to the popup using lambda.

Link copied to clipboard
abstract fun setOnBalloonOverlayClickListener(onBalloonOverlayClickListener: OnBalloonOverlayClickListener?)

sets a OnBalloonOverlayClickListener to the overlay popup.

abstract fun setOnBalloonOverlayClickListener(block: () -> Unit)

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
abstract fun setOnBalloonTouchListener(onTouchListener: View.OnTouchListener?)

sets a View.OnTouchListener to the popup.

Link copied to clipboard
abstract fun shouldShowUp(): Boolean

Represents if the balloon should be displayed according to the internal persistence..

Link copied to clipboard
abstract 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
abstract fun showAlignBottom(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
abstract fun showAlignLeft(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
abstract fun showAlignRight(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
abstract fun showAlignTop(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
abstract fun showAsDropDown(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
abstract fun showAtCenter(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
abstract fun update(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
abstract fun updateSizeOfBalloonCard(width: Int, height: Int)

updates the size of the balloon card.