balloon / com.skydoves.balloon / Balloon

Balloon

class Balloon : LifecycleObserver

Balloon implements showing and dismissing text popup with arrow and animations.

Types

Builder

class Builder

Builder class for creating Balloon.

Factory

abstract class Factory

An abstract factory class for creating Balloon instance.

Constructors

<init>

Balloon(context: Context, builder: Builder)

Balloon implements showing and dismissing text popup with arrow and animations.

Properties

isShowing

var isShowing: Boolean

onBalloonClickListener

var onBalloonClickListener: OnBalloonClickListener?

onBalloonDismissListener

var onBalloonDismissListener: OnBalloonDismissListener?

onBalloonOutsideTouchListener

var onBalloonOutsideTouchListener: OnBalloonOutsideTouchListener?

Functions

dismiss

fun dismiss(): Unit

dismiss the popup menu.

getContentView

fun getContentView(): View

gets a content view of the balloon popup window.

getMeasureWidth

fun getMeasureWidth(): Int

gets measured width size of the balloon.

onDestroy

fun onDestroy(): Unit

dismiss automatically when lifecycle owner is destroyed.

show

fun show(anchor: View): Unit

shows the balloon on the center of an anchor view.

fun show(anchor: View, xOff: Int, yOff: Int): Unit

shows the balloon on an anchor view with x-off and y-off.

showAlignBottom

fun showAlignBottom(anchor: View): Unit

shows the balloon on an anchor view as the bottom alignment.

fun showAlignBottom(anchor: View, xOff: Int, yOff: Int): Unit

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

showAlignLeft

fun showAlignLeft(anchor: View): Unit

shows the balloon on an anchor view as the left alignment.

fun showAlignLeft(anchor: View, xOff: Int, yOff: Int): Unit

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

showAlignRight

fun showAlignRight(anchor: View): Unit

shows the balloon on an anchor view as the right alignment.

fun showAlignRight(anchor: View, xOff: Int, yOff: Int): Unit

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

showAlignTop

fun showAlignTop(anchor: View): Unit

shows the balloon on an anchor view as the top alignment.

fun showAlignTop(anchor: View, xOff: Int, yOff: Int): Unit

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

showAsDropDown

fun showAsDropDown(anchor: View): Unit

shows the balloon on an anchor view as drop down.

fun showAsDropDown(anchor: View, xOff: Int, yOff: Int): Unit

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