aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-29 16:27:09 -0700
committerAllan Wang <me@allanwang.ca>2017-06-29 16:27:09 -0700
commit22edec658f1ca9ad8f87cf3345eb883b18848b35 (patch)
tree04068f32e64e9cc410fed1d314d91e8c2ba540ac /library/src/main/kotlin
parentd00d7203c391c7954a4cd16a5f1d1f81ba873eb1 (diff)
downloadkau-22edec658f1ca9ad8f87cf3345eb883b18848b35.tar.gz
kau-22edec658f1ca9ad8f87cf3345eb883b18848b35.tar.bz2
kau-22edec658f1ca9ad8f87cf3345eb883b18848b35.zip
More comments
Diffstat (limited to 'library/src/main/kotlin')
-rw-r--r--library/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt13
1 files changed, 10 insertions, 3 deletions
diff --git a/library/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/library/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index d27f32f..1b80a46 100644
--- a/library/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/library/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -15,7 +15,6 @@ import ca.allanwang.kau.adapters.FastItemThemedAdapter
import ca.allanwang.kau.adapters.ThemableIItemColors
import ca.allanwang.kau.adapters.ThemableIItemColorsDelegate
import ca.allanwang.kau.animators.FadeScaleAnimator
-import ca.allanwang.kau.iitems.CardIItem
import ca.allanwang.kau.iitems.CutoutIItem
import ca.allanwang.kau.iitems.HeaderIItem
import ca.allanwang.kau.iitems.LibraryIItem
@@ -107,7 +106,7 @@ abstract class AboutActivityBase(val rClass: Class<*>, val configBuilder: Config
var cutoutDrawable: Drawable? = null
var cutoutForeground: Int? = null
var libPageTitleRes: Int = -1
- var libPageTitle: String? = string(R.string.kau_about_libraries_intro)
+ var libPageTitle: String? = string(R.string.kau_about_libraries_intro) //This is in the string by default since it's lower priority
/**
* Transition to be called if the view is dragged down
*/
@@ -152,6 +151,10 @@ abstract class AboutActivityBase(val rClass: Class<*>, val configBuilder: Config
return recycler
}
+ /**
+ * Open hook called just before the main page view is returned
+ * Feel free to add your own items to the adapter in here
+ */
open fun postInflateMainPage(adapter: FastItemThemedAdapter<IItem<*, *>>) {
}
@@ -216,7 +219,11 @@ abstract class AboutActivityBase(val rClass: Class<*>, val configBuilder: Config
}
}
- internal fun addLibItems() {
+ /**
+ * Function that is called when the view is ready to add the lib items
+ * Feel free to add your own items here
+ */
+ open fun addLibItems() {
libAdapter.add(HeaderIItem(text = configs.libPageTitle, textRes = configs.libPageTitleRes))
.add(libItems)
}