Package 

Class Balloon

  • All Implemented Interfaces:
    androidx.lifecycle.DefaultLifecycleObserver , androidx.lifecycle.FullLifecycleObserver , androidx.lifecycle.LifecycleObserver

    
    public final class Balloon
     implements DefaultLifecycleObserver
                        

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

    • Constructor Detail

    • Method Detail

      • relayShowAtCenter

         final Balloon relayShowAtCenter(Balloon balloon, View anchor, Integer xOff, Integer yOff, BalloonCenterAlign centerAlign)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
        centerAlign - A rule for deciding the align of the balloon.
      • relayShowAtCenter

         final Balloon relayShowAtCenter(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAtCenter

         final Balloon relayShowAtCenter(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAtCenter

         final Balloon relayShowAtCenter(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAsDropDown

         final Unit showAsDropDown(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAsDropDown

         final Unit showAsDropDown(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • showAsDropDown

         final Unit showAsDropDown(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • relayShowAsDropDown

         final Balloon relayShowAsDropDown(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAsDropDown

         final Balloon relayShowAsDropDown(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAsDropDown

         final Balloon relayShowAsDropDown(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAlignTop

         final Unit showAlignTop(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAlignTop

         final Unit showAlignTop(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • showAlignTop

         final Unit showAlignTop(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • relayShowAlignTop

         final Balloon relayShowAlignTop(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAlignTop

         final Balloon relayShowAlignTop(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAlignTop

         final Balloon relayShowAlignTop(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAlignBottom

         final Unit showAlignBottom(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAlignBottom

         final Unit showAlignBottom(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • showAlignBottom

         final Unit showAlignBottom(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • relayShowAlignBottom

         final Balloon relayShowAlignBottom(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAlignBottom

         final Balloon relayShowAlignBottom(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAlignBottom

         final Balloon relayShowAlignBottom(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAlignRight

         final Unit showAlignRight(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAlignRight

         final Unit showAlignRight(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • showAlignRight

         final Unit showAlignRight(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • relayShowAlignRight

         final Balloon relayShowAlignRight(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAlignRight

         final Balloon relayShowAlignRight(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAlignRight

         final Balloon relayShowAlignRight(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAlignLeft

         final Unit showAlignLeft(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAlignLeft

         final Unit showAlignLeft(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • showAlignLeft

         final Unit showAlignLeft(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • relayShowAlignLeft

         final Balloon relayShowAlignLeft(Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAlignLeft

         final Balloon relayShowAlignLeft(Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAlignLeft

         final Balloon relayShowAlignLeft(Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • showAlign

         final Unit showAlign(BalloonAlign align, View mainAnchor, List<View> subAnchorList, Integer xOff, Integer yOff)

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

        Parameters:
        align - Decides where the balloon should be placed.
        mainAnchor - A target view which popup will be displayed.
        subAnchorList - A list of anchors to display focuses on the overlay view.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • showAlign

         final Unit showAlign(BalloonAlign align, View mainAnchor, List<View> subAnchorList, Integer xOff)

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

        Parameters:
        align - Decides where the balloon should be placed.
        mainAnchor - A target view which popup will be displayed.
        subAnchorList - A list of anchors to display focuses on the overlay view.
        xOff - A horizontal offset from the anchor in pixels.
      • showAlign

         final Unit showAlign(BalloonAlign align, View mainAnchor, List<View> subAnchorList)

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

        Parameters:
        align - Decides where the balloon should be placed.
        mainAnchor - A target view which popup will be displayed.
        subAnchorList - A list of anchors to display focuses on the overlay view.
      • showAlign

         final Unit showAlign(BalloonAlign align, View mainAnchor)

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

        Parameters:
        align - Decides where the balloon should be placed.
        mainAnchor - A target view which popup will be displayed.
      • relayShowAlign

         final Balloon relayShowAlign(BalloonAlign align, Balloon balloon, View anchor, Integer xOff, Integer yOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • relayShowAlign

         final Balloon relayShowAlign(BalloonAlign align, Balloon balloon, View anchor, Integer xOff)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • relayShowAlign

         final Balloon relayShowAlign(BalloonAlign align, Balloon balloon, View anchor)

        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.

        Parameters:
        balloon - A next Balloon that will be shown sequentially after dismissing this popup.
        anchor - A target view which popup will be shown to.
      • update

         final Unit update(View anchor, Integer xOff, Integer yOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
        yOff - A vertical offset from the anchor in pixels.
      • update

         final Unit update(View anchor, Integer xOff)

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

        Parameters:
        anchor - A target view which popup will be shown to.
        xOff - A horizontal offset from the anchor in pixels.
      • update

         final Unit update(View anchor)

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

        Parameters:
        anchor - A target view which popup will be shown to.
      • setIsAttachedInDecor

         final Balloon setIsAttachedInDecor(Boolean value)

        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)