aboutsummaryrefslogtreecommitdiff
path: root/about
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-02-23 16:03:12 -0800
committerGitHub <noreply@github.com>2020-02-23 16:03:12 -0800
commit61dddd883908a803e3ee55de537e0a30ee4ef90d (patch)
tree1c0793625b9d05c98b4d0abfccd35ffa90819094 /about
parent3fa13a3a84d34fd0d96f26d6c5dea0e0671dd6c4 (diff)
parent5038b93102949bb127b6cb9cb26809490739b3fa (diff)
downloadkau-61dddd883908a803e3ee55de537e0a30ee4ef90d.tar.gz
kau-61dddd883908a803e3ee55de537e0a30ee4ef90d.tar.bz2
kau-61dddd883908a803e3ee55de537e0a30ee4ef90d.zip
Merge pull request #249 from AllanWang/about-activity
About activity
Diffstat (limited to 'about')
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt11
1 files changed, 5 insertions, 6 deletions
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index 6b57825..4fe97da 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -40,17 +40,14 @@ import kotlinx.android.synthetic.main.kau_activity_about.*
* Created by Allan Wang on 2017-06-28.
*
* Floating About Activity Panel for your app
- * This contains all the necessary layouts, and can be extended and configured using the [configBuilder]
+ * This contains all the necessary layouts, and can be extended and configured using [buildConfigs]
* The [rClass] is necessary to generate the list of libraries used in your app, and should point to your app's
* R.string::class.java
* If you don't need auto detect, you can pass null instead
* Note that for the auto detection to work, the R fields must be excluded from Proguard
* Manual lib listings and other extra modifications can be done so by overriding the open functions
*/
-abstract class AboutActivityBase(
- val rClass: Class<*>?,
- private val configBuilder: Configs.() -> Unit = {}
-) :
+abstract class AboutActivityBase(val rClass: Class<*>?) :
KauBaseActivity(), ViewPager.OnPageChangeListener {
val currentPage: Int
@@ -60,7 +57,9 @@ abstract class AboutActivityBase(
* Holds some common configurations that may be added directly from the constructor
* Applied lazily since it needs the context to fetch resources
*/
- val configs: Configs by lazy { Configs().apply { configBuilder() } }
+ val configs: Configs by lazy { Configs().apply { buildConfigs() } }
+
+ open fun Configs.buildConfigs() = Unit
/**
* Holds that status of each page