Interface BalloonWindow
-
- All Implemented Interfaces:
public interface BalloonWindowBalloonWindow is an interface that define all executable behaviors of the balloon's window.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanshouldShowUp()Represents if the balloon should be displayed according to the internal persistence.. abstract UnitshowAtCenter(Integer xOff, Integer yOff, BalloonCenterAlign centerAlign)Shows the balloon over the anchor view (overlap) as the center aligns. abstract BalloonrelayShowAtCenter(Balloon balloon, 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. abstract UnitshowAsDropDown(Integer xOff, Integer yOff)Shows the balloon on an anchor view as drop down with x-off and y-off. abstract BalloonrelayShowAsDropDown(Balloon balloon, 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. abstract UnitshowAlignTop(Integer xOff, Integer yOff)Shows the balloon on an anchor view as the top alignment with x-off and y-off. abstract BalloonrelayShowAlignTop(Balloon balloon, 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. abstract UnitshowAlignBottom(Integer xOff, Integer yOff)Shows the balloon on an anchor view as the bottom alignment with x-off and y-off. abstract BalloonrelayShowAlignBottom(Balloon balloon, 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. abstract UnitshowAlignRight(Integer xOff, Integer yOff)Shows the balloon on an anchor view as the right alignment with x-off and y-off. abstract BalloonrelayShowAlignRight(Balloon balloon, 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. abstract UnitshowAlignLeft(Integer xOff, Integer yOff)Shows the balloon on an anchor view as the left alignment with x-off and y-off. abstract BalloonrelayShowAlignLeft(Balloon balloon, 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. abstract UnitshowAlign(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. abstract BalloonrelayShowAlign(BalloonAlign align, Balloon balloon, 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. abstract Unitupdate(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. abstract UnitupdateSizeOfBalloonCard(Integer width, Integer height)updates the size of the balloon card. abstract Unitdismiss()dismiss the popup menu. abstract BooleandismissWithDelay(Long delay)dismiss the popup menu with milliseconds delay. abstract UnitsetOnBalloonClickListener(OnBalloonClickListener onBalloonClickListener)sets a OnBalloonClickListener to the popup. abstract UnitclearAllPreferences()clears all persisted preferences. abstract UnitsetOnBalloonInitializedListener(OnBalloonInitializedListener onBalloonInitializedListener)sets a OnBalloonInitializedListener to the popup. abstract UnitsetOnBalloonDismissListener(OnBalloonDismissListener onBalloonDismissListener)sets a OnBalloonDismissListener to the popup. abstract UnitsetOnBalloonOutsideTouchListener(OnBalloonOutsideTouchListener onBalloonOutsideTouchListener)sets a OnBalloonOutsideTouchListener to the popup. abstract UnitsetOnBalloonTouchListener(View.OnTouchListener onTouchListener)sets a View.OnTouchListener to the popup. abstract UnitsetOnBalloonOverlayTouchListener(View.OnTouchListener onTouchListener)sets a View.OnTouchListener to the overlay popup abstract UnitsetOnBalloonOverlayTouchListener(Function2<View, MotionEvent, Boolean> block)sets a View.OnTouchListener to the overlay popup using lambda. abstract UnitsetOnBalloonOverlayClickListener(OnBalloonOverlayClickListener onBalloonOverlayClickListener)sets a OnBalloonOverlayClickListener to the overlay popup. abstract BalloonsetIsAttachedInDecor(Boolean value)sets whether the popup window will be attached in the decor frame of its parent window. abstract IntegergetMeasuredWidth()gets measured width size of the balloon popup. abstract IntegergetMeasuredHeight()gets measured height size of the balloon popup. abstract ViewGroupgetContentView()gets a content view of the balloon popup window. abstract ViewgetBalloonArrowView()gets a arrow view of the balloon popup window. abstract BalloongetBalloon()-
-
Method Detail
-
shouldShowUp
abstract Boolean shouldShowUp()
Represents if the balloon should be displayed according to the internal persistence..
-
showAtCenter
abstract Unit showAtCenter(Integer xOff, Integer yOff, BalloonCenterAlign centerAlign)
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.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.centerAlign- A rule for deciding the alignment of the balloon.
-
relayShowAtCenter
abstract Balloon relayShowAtCenter(Balloon balloon, 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.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.
-
showAsDropDown
abstract Unit showAsDropDown(Integer xOff, Integer yOff)
Shows the balloon on an anchor view as drop down with x-off and y-off.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
relayShowAsDropDown
abstract Balloon relayShowAsDropDown(Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
showAlignTop
abstract Unit showAlignTop(Integer xOff, Integer yOff)
Shows the balloon on an anchor view as the top alignment with x-off and y-off.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
relayShowAlignTop
abstract Balloon relayShowAlignTop(Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
showAlignBottom
abstract Unit showAlignBottom(Integer xOff, Integer yOff)
Shows the balloon on an anchor view as the bottom alignment with x-off and y-off.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
relayShowAlignBottom
abstract Balloon relayShowAlignBottom(Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
showAlignRight
abstract Unit showAlignRight(Integer xOff, Integer yOff)
Shows the balloon on an anchor view as the right alignment with x-off and y-off.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
relayShowAlignRight
abstract Balloon relayShowAlignRight(Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
showAlignLeft
abstract Unit showAlignLeft(Integer xOff, Integer yOff)
Shows the balloon on an anchor view as the left alignment with x-off and y-off.
- Parameters:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
relayShowAlignLeft
abstract Balloon relayShowAlignLeft(Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
showAlign
abstract 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.
-
relayShowAlign
abstract Balloon relayShowAlign(BalloonAlign align, Balloon balloon, 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.xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
update
abstract Unit update(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:
xOff- A horizontal offset from the anchor in pixels.yOff- A vertical offset from the anchor in pixels.
-
updateSizeOfBalloonCard
abstract Unit updateSizeOfBalloonCard(Integer width, Integer height)
updates the size of the balloon card.
-
dismissWithDelay
abstract Boolean dismissWithDelay(Long delay)
dismiss the popup menu with milliseconds delay.
-
setOnBalloonClickListener
abstract Unit setOnBalloonClickListener(OnBalloonClickListener onBalloonClickListener)
sets a OnBalloonClickListener to the popup.
-
clearAllPreferences
abstract Unit clearAllPreferences()
clears all persisted preferences.
-
setOnBalloonInitializedListener
abstract Unit 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.
-
setOnBalloonDismissListener
abstract Unit setOnBalloonDismissListener(OnBalloonDismissListener onBalloonDismissListener)
sets a OnBalloonDismissListener to the popup.
-
setOnBalloonOutsideTouchListener
abstract Unit setOnBalloonOutsideTouchListener(OnBalloonOutsideTouchListener onBalloonOutsideTouchListener)
sets a OnBalloonOutsideTouchListener to the popup.
-
setOnBalloonTouchListener
abstract Unit setOnBalloonTouchListener(View.OnTouchListener onTouchListener)
sets a View.OnTouchListener to the popup.
-
setOnBalloonOverlayTouchListener
abstract Unit setOnBalloonOverlayTouchListener(View.OnTouchListener onTouchListener)
sets a View.OnTouchListener to the overlay popup
-
setOnBalloonOverlayTouchListener
abstract Unit setOnBalloonOverlayTouchListener(Function2<View, MotionEvent, Boolean> block)
sets a View.OnTouchListener to the overlay popup using lambda.
-
setOnBalloonOverlayClickListener
abstract Unit setOnBalloonOverlayClickListener(OnBalloonOverlayClickListener onBalloonOverlayClickListener)
sets a OnBalloonOverlayClickListener to the overlay popup.
-
setIsAttachedInDecor
abstract 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)
-
getMeasuredWidth
abstract Integer getMeasuredWidth()
gets measured width size of the balloon popup.
-
getMeasuredHeight
abstract Integer getMeasuredHeight()
gets measured height size of the balloon popup.
-
getContentView
abstract ViewGroup getContentView()
gets a content view of the balloon popup window.
-
getBalloonArrowView
abstract View getBalloonArrowView()
gets a arrow view of the balloon popup window.
-
getBalloon
abstract Balloon getBalloon()
-
-
-
-