diff --git a/balloon/api/balloon.api b/balloon/api/balloon.api index 1b8f4d90..9d35ea17 100644 --- a/balloon/api/balloon.api +++ b/balloon/api/balloon.api @@ -36,10 +36,6 @@ public final class com/skydoves/balloon/Balloon : androidx/lifecycle/DefaultLife public final fun isShowing ()Z public fun onDestroy (Landroidx/lifecycle/LifecycleOwner;)V public fun onPause (Landroidx/lifecycle/LifecycleOwner;)V - public final fun relayShow (Lcom/skydoves/balloon/Balloon;Landroid/view/View;)Lcom/skydoves/balloon/Balloon; - public final fun relayShow (Lcom/skydoves/balloon/Balloon;Landroid/view/View;I)Lcom/skydoves/balloon/Balloon; - public final fun relayShow (Lcom/skydoves/balloon/Balloon;Landroid/view/View;II)Lcom/skydoves/balloon/Balloon; - public static synthetic fun relayShow$default (Lcom/skydoves/balloon/Balloon;Lcom/skydoves/balloon/Balloon;Landroid/view/View;IIILjava/lang/Object;)Lcom/skydoves/balloon/Balloon; public final fun relayShowAlignBottom (Lcom/skydoves/balloon/Balloon;Landroid/view/View;)Lcom/skydoves/balloon/Balloon; public final fun relayShowAlignBottom (Lcom/skydoves/balloon/Balloon;Landroid/view/View;I)Lcom/skydoves/balloon/Balloon; public final fun relayShowAlignBottom (Lcom/skydoves/balloon/Balloon;Landroid/view/View;II)Lcom/skydoves/balloon/Balloon; @@ -80,8 +76,6 @@ public final class com/skydoves/balloon/Balloon : androidx/lifecycle/DefaultLife public final fun setOnBalloonOverlayTouchListener (Lkotlin/jvm/functions/Function2;)V public final fun setOnBalloonTouchListener (Landroid/view/View$OnTouchListener;)V public final fun shouldShowUp ()Z - public final fun show (Landroid/view/View;)V - public final fun show (Landroid/view/View;II)V public final fun showAlignBottom (Landroid/view/View;)V public final fun showAlignBottom (Landroid/view/View;I)V public final fun showAlignBottom (Landroid/view/View;II)V @@ -508,8 +502,6 @@ public final class com/skydoves/balloon/BalloonExtensionKt { public static final fun showAtCenter (Landroid/view/View;Lcom/skydoves/balloon/Balloon;II)V public static final synthetic fun showAtCenter (Landroid/view/View;Lcom/skydoves/balloon/Balloon;IILcom/skydoves/balloon/BalloonCenterAlign;)V public static synthetic fun showAtCenter$default (Landroid/view/View;Lcom/skydoves/balloon/Balloon;IILcom/skydoves/balloon/BalloonCenterAlign;ILjava/lang/Object;)V - public static final synthetic fun showBalloon (Landroid/view/View;Lcom/skydoves/balloon/Balloon;)V - public static final synthetic fun showBalloon (Landroid/view/View;Lcom/skydoves/balloon/Balloon;II)V } public final class com/skydoves/balloon/BalloonHighlightAnimation : java/lang/Enum { @@ -633,8 +625,6 @@ public final class com/skydoves/balloon/IconFormKt { public final class com/skydoves/balloon/IconGravity : java/lang/Enum { public static final field BOTTOM Lcom/skydoves/balloon/IconGravity; public static final field END Lcom/skydoves/balloon/IconGravity; - public static final field LEFT Lcom/skydoves/balloon/IconGravity; - public static final field RIGHT Lcom/skydoves/balloon/IconGravity; public static final field START Lcom/skydoves/balloon/IconGravity; public static final field TOP Lcom/skydoves/balloon/IconGravity; public static fun valueOf (Ljava/lang/String;)Lcom/skydoves/balloon/IconGravity; diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt index 84b7468c..bbbba385 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/Balloon.kt @@ -798,28 +798,6 @@ public class Balloon private constructor( return balloon } - /** - * Shows the balloon on the center of an anchor view. - * - * @param anchor A target view which popup will be shown to. - */ - @Deprecated( - message = "show() method will be deprecated since `1.3.8`. Use showAtCenter() instead.", - replaceWith = ReplaceWith( - "showAtCenter(anchor)", - imports = ["com.skydoves.balloon.Balloon.showAtCenter"] - ), - ) - public fun show(anchor: View) { - show(anchor) { - bodyWindow.showAsDropDown( - anchor, - builder.supportRtlLayoutFactor * ((anchor.measuredWidth / 2) - (getMeasuredWidth() / 2)), - -getMeasuredHeight() - (anchor.measuredHeight / 2) - ) - } - } - /** * 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. @@ -894,48 +872,6 @@ public class Balloon private constructor( centerAlign: BalloonCenterAlign = BalloonCenterAlign.TOP ): Balloon = relay(balloon) { it.showAtCenter(anchor, xOff, yOff, centerAlign) } - /** - * Shows the balloon on the center of an anchor view. - * - * @param anchor A target view which popup will be shown to. - * @param xOff A horizontal offset from the anchor in pixels. - * @param yOff A vertical offset from the anchor in pixels. - */ - @Deprecated( - message = "show() method will be deprecated since `1.3.8`. Use showAsDropDown() instead.", - replaceWith = ReplaceWith( - "showAsDropDown(anchor, xOff, yOff)", - imports = ["com.skydoves.balloon.Balloon.showAsDropDown"] - ), - ) - public fun show(anchor: View, xOff: Int, yOff: Int) { - show(anchor) { bodyWindow.showAsDropDown(anchor, xOff, yOff) } - } - - /** - * Shows the balloon on the center of an anchor view and shows the next balloon sequentially. - * This function returns the next balloon. - * - * @param balloon A next [Balloon] that will be shown sequentially after dismissing this popup. - * @param anchor A target view which popup will be shown to. - * @param xOff A horizontal offset from the anchor in pixels. - * @param yOff A vertical offset from the anchor in pixels. - * - * @return A next [balloon]. - * - * @see [Show sequentially](https://github.com/skydoves/Balloon#show-sequentially) - */ - @Deprecated( - message = "relayShow() method will be deprecated since `1.3.8`. Use relayShowAsDropDown() instead.", - replaceWith = ReplaceWith( - "relayShowAsDropDown(anchor, xOff, yOff)", - imports = ["com.skydoves.balloon.Balloon.relayShowAsDropDown"] - ), - ) - @JvmOverloads - public fun relayShow(balloon: Balloon, anchor: View, xOff: Int = 0, yOff: Int = 0): Balloon = - relayShowAsDropDown(balloon, anchor, xOff, yOff) - /** * Shows the balloon on an anchor view as drop down with x-off and y-off. * diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/BalloonExtension.kt b/balloon/src/main/kotlin/com/skydoves/balloon/BalloonExtension.kt index 983bbdce..3e619875 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/BalloonExtension.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/BalloonExtension.kt @@ -21,17 +21,6 @@ package com.skydoves.balloon import android.view.View import androidx.annotation.MainThread -/** shows the balloon on the center of an anchor view. */ -@Deprecated( - message = "show() method will be deprecated since `1.3.8`. Use showAtCenter() instead.", - replaceWith = ReplaceWith( - "showAtCenter(anchor)", - imports = ["com.skydoves.balloon.showAtCenter"] - ), -) -@JvmSynthetic -public fun View.showBalloon(balloon: Balloon): Unit = showAtCenter(balloon) - /** shows the balloon on the center of an anchor view. */ @JvmOverloads @JvmSynthetic @@ -44,18 +33,6 @@ public fun View.showAtCenter( balloon { balloon.showAtCenter(this, xOff, yOff, centerAlign) } } -/** shows the balloon on an anchor view with x-off and y-off. */ -@Deprecated( - message = "show() method will be deprecated since `1.3.8`. Use showAsDropDown() instead.", - replaceWith = ReplaceWith( - "showAsDropDown(anchor, xOff, yOff)", - imports = ["com.skydoves.balloon.showAsDropDown"] - ), -) -@JvmSynthetic -public fun View.showBalloon(balloon: Balloon, xOff: Int, yOff: Int): Unit = - showAsDropDown(balloon, xOff, yOff) - /** shows the balloon on an anchor view as drop down with x-off and y-off. */ @JvmOverloads @JvmSynthetic diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/BalloonLazyExtension.kt b/balloon/src/main/kotlin/com/skydoves/balloon/BalloonLazyExtension.kt index 977f125d..b7e7e035 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/BalloonLazyExtension.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/BalloonLazyExtension.kt @@ -23,28 +23,6 @@ import androidx.fragment.app.Fragment import com.skydoves.balloon.internal.ActivityBalloonLazy import com.skydoves.balloon.internal.FragmentBalloonLazy import com.skydoves.balloon.internal.ViewBalloonLazy -import kotlin.reflect.KClass - -/** - * Returns a [Lazy] delegate to access the [ComponentActivity]'s Balloon property. - * - * @param factory A [Balloon.Factory] kotlin class for creating a new instance of the Balloon. - */ -@Deprecated( - message = "Use balloon() instead", - replaceWith = ReplaceWith( - "balloon()", - imports = ["com.skydoves.balloon"] - ) -) -@MainThread -@JvmSynthetic -@BalloonInlineDsl -public inline fun ComponentActivity.balloon( - factory: KClass -): Lazy { - return ActivityBalloonLazy(this, this, factory) -} /** * Returns a [Lazy] delegate to access the [ComponentActivity]'s Balloon property. @@ -59,27 +37,6 @@ public inline fun ComponentActivity.balloon(): Laz return ActivityBalloonLazy(context = this, lifecycleOwner = this, factory = T::class) } -/** - * Returns a [Lazy] delegate to access the [Fragment]'s Balloon property. - * - * @param factory A [Balloon.Factory] kotlin class for creating a new instance of the Balloon. - */ -@Deprecated( - message = "Use balloon() instead", - replaceWith = ReplaceWith( - "balloon()", - imports = ["com.skydoves.balloon"] - ) -) -@MainThread -@JvmSynthetic -@BalloonInlineDsl -public inline fun Fragment.balloon( - factory: KClass -): Lazy { - return FragmentBalloonLazy(this, factory) -} - /** * Returns a [Lazy] delegate to access the [Fragment]'s Balloon property. * The balloon property will be initialized lazily. @@ -93,27 +50,6 @@ public inline fun Fragment.balloon(): Lazy()", - imports = ["com.skydoves.balloon"] - ) -) -@MainThread -@JvmSynthetic -@BalloonInlineDsl -public inline fun View.balloon( - factory: KClass -): Lazy { - return ViewBalloonLazy(this, factory) -} - /** * Returns a [Lazy] delegate to access the custom [View]'s Balloon property. * The balloon property will be initialized lazily. diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/IconGravity.kt b/balloon/src/main/kotlin/com/skydoves/balloon/IconGravity.kt index d65d6975..2f70f48a 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/IconGravity.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/IconGravity.kt @@ -18,24 +18,6 @@ package com.skydoves.balloon /** IconGravity determines the orientation of the icon. */ public enum class IconGravity { - @Deprecated( - message = "IconGravity.LEFT is deprecated. Use IconGravity.START instead.", - replaceWith = ReplaceWith( - "IconGravity.START", - imports = ["com.skydoves.balloon"] - ) - ) - LEFT, - - @Deprecated( - message = "IconGravity.LEFT is deprecated. Use IconGravity.END instead.", - replaceWith = ReplaceWith( - "IconGravity.END", - imports = ["com.skydoves.balloon"] - ) - ) - RIGHT, - START, END, TOP, diff --git a/balloon/src/main/kotlin/com/skydoves/balloon/extensions/TextViewExtension.kt b/balloon/src/main/kotlin/com/skydoves/balloon/extensions/TextViewExtension.kt index 7ae80cd8..21c422aa 100644 --- a/balloon/src/main/kotlin/com/skydoves/balloon/extensions/TextViewExtension.kt +++ b/balloon/src/main/kotlin/com/skydoves/balloon/extensions/TextViewExtension.kt @@ -55,7 +55,6 @@ private fun fromHtml(text: String): Spanned? { /** applies icon form attributes to a ImageView instance. */ @JvmSynthetic -@Suppress("DEPRECATION") internal fun VectorTextView.applyIconForm(iconForm: IconForm) { iconForm.drawable?.let { drawableTextViewParams = VectorTextViewParams( @@ -65,7 +64,7 @@ internal fun VectorTextView.applyIconForm(iconForm: IconForm) { tintColor = iconForm.iconColor.takeIf { it != NO_INT_VALUE } ).apply { when (iconForm.iconGravity) { - IconGravity.LEFT, IconGravity.START -> { + IconGravity.START -> { drawableStart = iconForm.drawable drawableStartRes = iconForm.drawableRes } @@ -77,7 +76,7 @@ internal fun VectorTextView.applyIconForm(iconForm: IconForm) { drawableBottom = iconForm.drawable drawableBottomRes = iconForm.drawableRes } - IconGravity.RIGHT, IconGravity.END -> { + IconGravity.END -> { drawableEnd = iconForm.drawable drawableEndRes = iconForm.drawableRes }