aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-03 15:18:20 -0700
committerGitHub <noreply@github.com>2017-08-03 15:18:20 -0700
commitbafc1996d803862d30a2c7d0c402d30c79c4f647 (patch)
tree5456960a330d7890ac43e1193a80f1db670a8b06 /about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
parent84b9d3b40e342dc7715c5af13d102bb98529b0fb (diff)
downloadkau-bafc1996d803862d30a2c7d0c402d30c79c4f647.tar.gz
kau-bafc1996d803862d30a2c7d0c402d30c79c4f647.tar.bz2
kau-bafc1996d803862d30a2c7d0c402d30c79c4f647.zip
3.2.2 - Create faq parser and update sample (#19)3.2.3
* Test emulator * Update readme * Update fastadapter and about listing * Make faq parser asynchronous * Modularize about panels * Add basis for faq * Test and finalize the faq panel * Update readme * Update changelog * Remove emulator for now * Update sample
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt12
1 files changed, 4 insertions, 8 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
index 1ba5815..3f764d3 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
@@ -4,6 +4,7 @@ import android.support.v7.widget.RecyclerView
import android.view.View
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
+import ca.allanwang.kau.iitems.KauIItem
import ca.allanwang.kau.ui.views.CutoutView
import ca.allanwang.kau.utils.bindView
import com.mikepenz.fastadapter.items.AbstractItem
@@ -13,12 +14,9 @@ import com.mikepenz.fastadapter.items.AbstractItem
*
* Just a cutout item with some defaults in [R.layout.kau_iitem_cutout]
*/
-class CutoutIItem(val config: CutoutView.() -> Unit = {}
-) : AbstractItem<CutoutIItem, CutoutIItem.ViewHolder>(), ThemableIItem by ThemableIItemDelegate() {
-
- override fun getType(): Int = R.id.kau_item_cutout
-
- override fun getLayoutRes(): Int = R.layout.kau_iitem_cutout
+class CutoutIItem(val config: CutoutView.() -> Unit = {}) : KauIItem<CutoutIItem, CutoutIItem.ViewHolder>(
+ R.layout.kau_iitem_cutout, {ViewHolder(it)}, R.id.kau_item_cutout
+), ThemableIItem by ThemableIItemDelegate() {
override fun isSelectable(): Boolean = false
@@ -38,8 +36,6 @@ class CutoutIItem(val config: CutoutView.() -> Unit = {}
}
}
- override fun getViewHolder(v: View): ViewHolder = ViewHolder(v)
-
class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {
val cutout: CutoutView by bindView(R.id.kau_cutout)
}