Builder

class Builder(context: Context)

Builder class for creating Balloon.

Constructors

Link copied to clipboard
fun Builder(context: Context)

Properties

Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
var alpha: Float = 1.0f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var arrowDrawable: Drawable? = null
Link copied to clipboard
var arrowElevation: Float = 0.0f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
var arrowPosition: Float = 0.5f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var iconDrawable: Drawable? = null
Link copied to clipboard
var iconForm: IconForm? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var isFocusable: Boolean = true
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var layout: View? = null
Link copied to clipboard
var layoutRes: Int? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var marginLeft: Int = 0
Link copied to clipboard
var marginRight: Int = 0
Link copied to clipboard
var marginTop: Int = 0
Link copied to clipboard
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
var maxWidthRatio: Float
Link copied to clipboard
var minWidth: Int = 0
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
var minWidthRatio: Float
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var overlayPadding: Float = 0.0f
Link copied to clipboard
Link copied to clipboard
var overlayPosition: Point? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var paddingLeft: Int = 0
Link copied to clipboard
Link copied to clipboard
var paddingTop: Int = 0
Link copied to clipboard
Link copied to clipboard
var preferenceName: String? = null
Link copied to clipboard
var runIfReachedShowCounts: () -> Unit? = null
Link copied to clipboard
var showTimes: Int = 1
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var textForm: TextForm? = null
Link copied to clipboard
Link copied to clipboard
var textIsHtml: Boolean = false
Link copied to clipboard
var textLineSpacing: Float? = null
Link copied to clipboard
@Sp
var textSize: Float = 12.0f
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var width: Int
Link copied to clipboard
@FloatRange(from = 0.0, to = 1.0)
var widthRatio: Float

Functions

Link copied to clipboard
fun build(): Balloon

Create a new instance of the Balloon which includes customized attributes.

Link copied to clipboard

sets a Runnable for invoking after the preference showing counts is reached the goal. This method should be used ith the setPreferenceName and setShowCounts.

sets a lambda for invoking after the preference showing counts is reached the goal. This method should be used ith the setPreferenceName and setShowCounts.

Link copied to clipboard
fun setAlpha(@FloatRange(from = 0.0, to = 1.0) value: Float): Balloon.Builder

sets the alpha value to the popup.

Link copied to clipboard

sets the padding of the arrow when aligning anchor using with ArrowPositionRules.ALIGN_ANCHOR.

Link copied to clipboard

sets the padding ratio of the arrow when aligning anchor using with ArrowPositionRules.ALIGN_ANCHOR.

Link copied to clipboard

sets the padding of the arrow the resource when aligning anchor using with ArrowPositionRules.ALIGN_ANCHOR.

Link copied to clipboard

sets the bottom padding of the arrow.

Link copied to clipboard

sets the bottom padding of the arrow using the resource.

Link copied to clipboard

sets a color of the arrow.

Link copied to clipboard

sets if arrow color should match the color of the balloon card. Overrides arrowColor. Does not work with custom arrows.

Link copied to clipboard

sets a color of the arrow using a resource.

Link copied to clipboard

sets a custom drawable of the arrow.

Link copied to clipboard

sets a custom drawable of the arrow using the resource.

Link copied to clipboard

sets the elevation of the arrow.

Link copied to clipboard

sets the elevation of the arrow using dimension resource.

Link copied to clipboard

sets the left padding of the arrow.

Link copied to clipboard

sets the left padding of the arrow using the resource.

Link copied to clipboard

sets the arrow orientation using ArrowOrientation.

Link copied to clipboard

ArrowOrientationRules determines the orientation of the arrow depending on the aligning rules.

Link copied to clipboard
fun setArrowPosition(@FloatRange(from = 0.0, to = 1.0) value: Float): Balloon.Builder

sets the arrow position by popup size ration. The popup size depends on arrowOrientation.

Link copied to clipboard

ArrowPositionRules determines the position of the arrow depending on the aligning rules.

Link copied to clipboard

sets the right padding of the arrow.

Link copied to clipboard

sets the right padding of the arrow using the resource.

Link copied to clipboard
fun setArrowSize(@Dp value: Int): Balloon.Builder

sets the size of the arrow.

Link copied to clipboard

sets the size of the arrow using dimension resource.

Link copied to clipboard

sets the top padding of the arrow.

Link copied to clipboard

sets the top padding of the arrow using the resource.

Link copied to clipboard

dismisses automatically some milliseconds later when the popup is shown.

Link copied to clipboard

sets the background color of the arrow and popup.

Link copied to clipboard

sets the background color of the arrow and popup using the resource color.

Link copied to clipboard

sets the background drawable of the popup.

Link copied to clipboard

sets the background drawable of the popup by the resource.

Link copied to clipboard

sets the balloon showing animation using BalloonAnimation.

Link copied to clipboard

sets the balloon showing animation using custom xml animation style.

Link copied to clipboard

sets the balloon highlight animation using BalloonHighlightAnimation.

Link copied to clipboard

sets the balloon highlight animation using custom xml animation resource file.

Link copied to clipboard

sets the balloon overlay showing animation using BalloonAnimation.

Link copied to clipboard

sets the balloon overlay showing animation using custom xml animation style.

Link copied to clipboard

sets a BalloonRotateAnimation to give highlight animation.

Link copied to clipboard

sets the duration of the circular animation. this option only works with BalloonAnimation.CIRCULAR value in setBalloonAnimation.

Link copied to clipboard

sets the corner radius of the popup.

Link copied to clipboard

sets the corner radius of the popup using dimension resource.

Link copied to clipboard

dismisses when the popup clicked.

Link copied to clipboard

dismisses when the LifecycleOwner be on paused.

Link copied to clipboard

dismisses when the overlay popup is clicked.

Link copied to clipboard

dismisses when invoked show function again.

Link copied to clipboard

dismisses when touch outside.

Link copied to clipboard
fun setElevation(@Dp value: Int): Balloon.Builder

sets the elevation to the popup.

Link copied to clipboard

sets the elevation to the popup using dimension resource.

Link copied to clipboard

sets isFocusable option to the body window. if true when the balloon is showing, can not touch other views and onBackPressed will be fired to the balloon.

Link copied to clipboard
fun setHeight(@Dp value: Int): Balloon.Builder

sets the height size.

Link copied to clipboard

sets the height size using a dimension resource.

Link copied to clipboard

sets the color of the icon drawable.

Link copied to clipboard

sets the color of the icon drawable using the resource color.

Link copied to clipboard

sets the content description accessibility.

Link copied to clipboard

sets the content description accessibility using resource.

Link copied to clipboard

sets the icon drawable of the popup.

Link copied to clipboard

sets the icon drawable of the popup using the resource.

Link copied to clipboard

applies IconForm attributes to the icon.

Link copied to clipboard

sets the icon gravity of the popup using the resource.

Link copied to clipboard

sets the height size of the icon drawable.

Link copied to clipboard

sets the height size of the icon drawable using the dimension resource.

Link copied to clipboard
fun setIconSize(@Dp value: Int): Balloon.Builder

sets the size of the icon drawable.

Link copied to clipboard

sets the size of the icon drawable using the dimension resource.

Link copied to clipboard
fun setIconSpace(@Dp value: Int): Balloon.Builder

sets the space between the icon and the main text content.

Link copied to clipboard

sets the space between the icon and the main text content using dimension resource.

Link copied to clipboard
fun setIconWidth(@Dp value: Int): Balloon.Builder

sets the width size of the icon drawable.

Link copied to clipboard

sets the width size of the icon drawable using the dimension resource.

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 isComposableContent to the balloon content. isComposableContent indicates if the custom layout content is composed of Jetpack Compose Composable function.

Link copied to clipboard

sets is status bar is visible or not in your screen.

Link copied to clipboard

sets the visibility of the arrow.

Link copied to clipboard

sets the visibility of the overlay for highlighting an anchor.

Link copied to clipboard
fun <T : ViewBinding> setLayout(binding: T): Balloon.Builder

sets a ViewBinding to the popup content.

sets a custom layout view to the popup content.

sets a custom layout resource to the popup content.

Link copied to clipboard

sets the LifecycleObserver for observing the the lifecycleOwner's lifecycle states.

Link copied to clipboard

sets the LifecycleOwner for dismissing automatically when the LifecycleOwner is destroyed. It will prevents memory leak : Avoid Memory Leak

Link copied to clipboard
fun setMargin(@Dp value: Int): Balloon.Builder

sets the margin on the balloon all directions.

Link copied to clipboard

sets the bottom margin on the balloon.

Link copied to clipboard

sets the bottom margin on the balloon using dimension resource.

Link copied to clipboard

sets the horizontal (left and right) margins on the balloon.

Link copied to clipboard

sets the horizontal (left and right) margins on the balloon using a dimension resource.

Link copied to clipboard

sets the left margin on the balloon.

Link copied to clipboard

sets the left margin on the balloon using dimension resource.

Link copied to clipboard

sets the margin on the balloon all directions using a dimension resource.

Link copied to clipboard

sets the right margin on the balloon.

Link copied to clipboard

sets the right margin on the balloon using dimension resource.

Link copied to clipboard
fun setMarginTop(@Dp value: Int): Balloon.Builder

sets the top margin on the balloon.

Link copied to clipboard

sets the top margin on the balloon using dimension resource.

Link copied to clipboard

sets the vertical (top and bottom) margins on the balloon.

Link copied to clipboard

sets the vertical (top and bottom) margins on the balloon using a dimension resource.

Link copied to clipboard
fun setMaxWidth(@Dp value: Int): Balloon.Builder

sets the maximum size of the width. this functionality works only with the BalloonSizeSpec.WRAP.

Link copied to clipboard
fun setMaxWidthRatio(@FloatRange(from = 0.0, to = 1.0) value: Float): Balloon.Builder

sets the maximum width size by the display screen size ratio.

Link copied to clipboard

sets the maximum size of the width using a dimension resource. this functionality works only with the BalloonSizeSpec.WRAP.

Link copied to clipboard
fun setMinWidth(@Dp value: Int): Balloon.Builder

sets the minimum size of the width. this functionality works only with the BalloonSizeSpec.WRAP.

Link copied to clipboard
fun setMinWidthRatio(@FloatRange(from = 0.0, to = 1.0) value: Float): Balloon.Builder

sets the minimum width size by the display screen size ratio.

Link copied to clipboard

sets the minimum size of the width using a dimension resource. this functionality works only with the BalloonSizeSpec.WRAP.

Link copied to clipboard

sets the movement method for TextView.

Link copied to clipboard

background color of the overlay.

Link copied to clipboard

background color of the overlay using a color resource.

Link copied to clipboard

sets the balloon overlay gravity.

Link copied to clipboard

sets a padding value of the overlay shape internally.

Link copied to clipboard

sets color of the overlay padding.

Link copied to clipboard

sets color of the overlay padding using a color resource.

Link copied to clipboard

sets a padding value of the overlay shape internally using dimension resource..

Link copied to clipboard

sets a specific position of the overlay shape.

Link copied to clipboard

sets a shape of the overlay over the anchor view.

Link copied to clipboard
fun setPadding(@Dp value: Int): Balloon.Builder

sets the padding on the balloon content all directions.

Link copied to clipboard

sets the bottom padding on the balloon content.

Link copied to clipboard

sets the bottom padding on the balloon content using dimension resource.

Link copied to clipboard

sets the horizontal (right and left) padding on the balloon content.

Link copied to clipboard

sets the horizontal (right and left) padding on the balloon content using dimension resource.

Link copied to clipboard

sets the left padding on the balloon content.

Link copied to clipboard

sets the left padding on the balloon content using dimension resource.

Link copied to clipboard

sets the padding on the balloon content all directions using dimension resource.

Link copied to clipboard

sets the right padding on the balloon content.

Link copied to clipboard

sets the right padding on the balloon content using dimension resource.

Link copied to clipboard

sets the top padding on the balloon content.

Link copied to clipboard

sets the top padding on the balloon content using dimension resource.

Link copied to clipboard

sets the vertical (top and bottom) padding on the balloon content.

Link copied to clipboard

sets the vertical (top and bottom) padding on the balloon content using dimension resource.

Link copied to clipboard

sets the preference name for persisting showing counts. This method should be used with the setShowCounts.

Link copied to clipboard

sets the balloon should support the RTL layout. The RTL layout is enabled by default, but you can disable this by passing false to the isRtlSupport.

Link copied to clipboard

pass touch events through the overlay to the anchor.

Link copied to clipboard

sets showing counts which how many times the Balloon popup will be shown up. This method should be used with the setPreferenceName.

Link copied to clipboard
fun setSize(@Dp width: Int, @Dp height: Int): Balloon.Builder

sets the width and height sizes of the balloon.

Link copied to clipboard

sets the width and height sizes of the balloon using a dimension resource.

Link copied to clipboard

sets the main text content of the popup.

Link copied to clipboard

sets the color of the main text content.

Link copied to clipboard

sets the color of the main text content using the resource color.

Link copied to clipboard

applies TextForm attributes to the main text content.

Link copied to clipboard

sets gravity of the text. this only works when the width or setWidthRatio set explicitly.

Link copied to clipboard

sets whether the text will be parsed as HTML (using Html.fromHtml(..))

Link copied to clipboard

sets the line spacing value of the text.

Link copied to clipboard

sets the line spacing value resource of the text.

Link copied to clipboard

sets the main text content of the popup using resource.

Link copied to clipboard

sets the size of the main text content.

Link copied to clipboard

sets the size of the main text content using dimension resource.

Link copied to clipboard

sets the typeface of the main text content.

Link copied to clipboard
fun setWidth(@Dp value: Int): Balloon.Builder

sets the width size.

Link copied to clipboard
fun setWidthRatio(@FloatRange(from = 0.0, to = 1.0) value: Float): Balloon.Builder

sets the width size by the display screen size ratio.

Link copied to clipboard

sets the width size using a dimension resource.