parcelableExtra() = ReadOnlyProperty parcelableExtra(defaultValue: P? = null) =
+ ReadOnlyProperty (property.name) ?: defaultValue
+ }
diff --git a/core/src/main/java/com/teamfillin/fillin/core/view/ViewExt.kt b/core/src/main/java/com/teamfillin/fillin/core/view/ViewExt.kt
new file mode 100644
index 0000000..3ecbccc
--- /dev/null
+++ b/core/src/main/java/com/teamfillin/fillin/core/view/ViewExt.kt
@@ -0,0 +1,49 @@
+package com.teamfillin.fillin.core.view
+
+import android.view.View
+import android.widget.ImageView
+import androidx.annotation.DrawableRes
+import androidx.recyclerview.widget.DiffUtil
+import com.bumptech.glide.Glide
+
+inline fun View.setOnSingleClickListener(
+ delay: Long = 500L,
+ crossinline block: (View) -> Unit
+) {
+ var previousClickedTime = 0L
+ setOnClickListener { view ->
+ val clickedTime = System.currentTimeMillis()
+ if (clickedTime - previousClickedTime >= delay) {
+ block(view)
+ previousClickedTime = clickedTime
+ }
+ }
+}
+
+fun ImageView.load(
+ @DrawableRes placeHolder: Int = -1,
+ url: String
+) {
+ if (placeHolder == -1)
+ Glide.with(context)
+ .load(url)
+ .into(this)
+ else
+ Glide.with(context)
+ .load(url)
+ .placeholder(placeHolder)
+ .into(this)
+}
+
+class ItemDiffCallback