From 2382af094db7a8942d82b932683fda280161d868 Mon Sep 17 00:00:00 2001 From: Sascha Huth Date: Tue, 24 Oct 2023 11:37:44 +0100 Subject: [PATCH] use overload constructors --- .../com/transferwise/sequencelayout/SequenceLayout.kt | 10 +++++----- .../com/transferwise/sequencelayout/SequenceStepDot.kt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/library/src/main/java/com/transferwise/sequencelayout/SequenceLayout.kt b/library/src/main/java/com/transferwise/sequencelayout/SequenceLayout.kt index 3db7f95..c8c365d 100644 --- a/library/src/main/java/com/transferwise/sequencelayout/SequenceLayout.kt +++ b/library/src/main/java/com/transferwise/sequencelayout/SequenceLayout.kt @@ -36,11 +36,11 @@ import androidx.core.view.ViewCompat * * @see com.transferwise.sequencelayout.SequenceStep */ -public class SequenceLayout(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : - FrameLayout(context, attrs, defStyleAttr), SequenceStep.OnStepChangedListener { - - public constructor(context: Context) : this(context, null) - public constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0) +public class SequenceLayout @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 +) : FrameLayout(context, attrs, defStyleAttr), SequenceStep.OnStepChangedListener { init { LayoutInflater.from(getContext()).inflate(R.layout.sequence_layout, this, true) diff --git a/library/src/main/java/com/transferwise/sequencelayout/SequenceStepDot.kt b/library/src/main/java/com/transferwise/sequencelayout/SequenceStepDot.kt index 1a74eab..26756fb 100644 --- a/library/src/main/java/com/transferwise/sequencelayout/SequenceStepDot.kt +++ b/library/src/main/java/com/transferwise/sequencelayout/SequenceStepDot.kt @@ -15,11 +15,11 @@ import android.view.LayoutInflater import android.view.View import android.widget.FrameLayout -internal class SequenceStepDot(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : - FrameLayout(context, attrs, defStyleAttr) { - - constructor(context: Context) : this(context, null) - constructor(context: Context, attrs: AttributeSet?) : this(context, attrs, 0) +internal class SequenceStepDot @JvmOverloads constructor( + context: Context, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0 +) : FrameLayout(context, attrs, defStyleAttr) { private var pulseAnimator: AnimatorSet? = null