From 3e7f62f89bc4e95cfae7394463e3fd503777011f Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 23 Feb 2020 15:34:01 -0800 Subject: Move config builder out of constructor --- .../kotlin/ca/allanwang/kau/sample/AboutActivity.kt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'sample/src/main/kotlin/ca') diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt index ffe769a..59f1c92 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt @@ -23,15 +23,17 @@ import com.mikepenz.fastadapter.GenericItem /** * Created by Allan Wang on 2017-06-27. */ -class AboutActivity : AboutActivityBase(R.string::class.java, { - cutoutDrawableRes = R.drawable.kau - textColor = 0xde000000.toInt() - backgroundColor = 0xfffafafa.toInt() - accentColor = 0xff00838F.toInt() - cutoutForeground = 0xff18FFFF.toInt() - faqXmlRes = R.xml.kau_faq - faqParseNewLine = false -}) { +class AboutActivity : AboutActivityBase(R.string::class.java) { + + override fun Configs.buildConfigs() { + cutoutDrawableRes = R.drawable.kau + textColor = 0xde000000.toInt() + backgroundColor = 0xfffafafa.toInt() + accentColor = 0xff00838F.toInt() + cutoutForeground = 0xff18FFFF.toInt() + faqXmlRes = R.xml.kau_faq + faqParseNewLine = false + } override fun postInflateMainPage(adapter: FastItemThemedAdapter) { adapter.add(CardIItem { -- cgit v1.2.3