From 065893e31d9746e67e0ab42a6dfe22e876d83c04 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 6 Apr 2020 00:39:22 +0530 Subject: MultiselectableRelativeLayout: use JvmOverloads constructor Signed-off-by: Harsh Shandilya --- .../android/widget/MultiselectableRelativeLayout.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ui/src/main/java/com/wireguard') diff --git a/ui/src/main/java/com/wireguard/android/widget/MultiselectableRelativeLayout.kt b/ui/src/main/java/com/wireguard/android/widget/MultiselectableRelativeLayout.kt index 69ffefc0..5312f5b9 100644 --- a/ui/src/main/java/com/wireguard/android/widget/MultiselectableRelativeLayout.kt +++ b/ui/src/main/java/com/wireguard/android/widget/MultiselectableRelativeLayout.kt @@ -10,14 +10,14 @@ import android.view.View import android.widget.RelativeLayout import com.wireguard.android.R -class MultiselectableRelativeLayout : RelativeLayout { +class MultiselectableRelativeLayout @JvmOverloads constructor( + context: Context? = null, + attrs: AttributeSet? = null, + defStyleAttr: Int = 0, + defStyleRes: Int = 0 +) : RelativeLayout(context, attrs, defStyleAttr, defStyleRes) { private var multiselected = false - constructor(context: Context?) : super(context) {} - constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {} - constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {} - constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {} - override fun onCreateDrawableState(extraSpace: Int): IntArray { if (multiselected) { val drawableState = super.onCreateDrawableState(extraSpace + 1) -- cgit v1.2.3