diff options
Diffstat (limited to 'about/src/main/kotlin/ca/allanwang')
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt | 13 | ||||
-rw-r--r-- | about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt | 3 |
2 files changed, 9 insertions, 7 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 7a14d95..dddb0b9 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt @@ -15,6 +15,7 @@ import ca.allanwang.kau.internal.KauBaseActivity import ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout import ca.allanwang.kau.ui.widgets.InkPageIndicator import ca.allanwang.kau.utils.AnimHolder +import ca.allanwang.kau.utils.INVALID_ID import ca.allanwang.kau.utils.bindView import ca.allanwang.kau.utils.dimenPixelSize import com.mikepenz.aboutlibraries.Libs @@ -57,7 +58,7 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde val panels: List<AboutPanelContract> by lazy { val defaultPanels = mutableListOf(AboutPanelMain(), AboutPanelLibs()) - if (configs.faqXmlRes != -1) defaultPanels.add(AboutPanelFaqs()) + if (configs.faqXmlRes != INVALID_ID) defaultPanels.add(AboutPanelFaqs()) defaultPanels } @@ -86,23 +87,23 @@ abstract class AboutActivityBase(val rClass: Class<*>?, private val configBuilde } class Configs : ThemableIItemColors by ThemableIItemColorsDelegate() { - var cutoutTextRes: Int = -1 + var cutoutTextRes: Int = INVALID_ID var cutoutText: String? = null - var cutoutDrawableRes: Int = -1 + var cutoutDrawableRes: Int = INVALID_ID var cutoutDrawable: Drawable? = null var cutoutForeground: Int? = null var libPageTitleRes: Int = R.string.kau_about_libraries_intro var libPageTitle: String? = null set(value) { field = value - libPageTitleRes = -1 //reset res so we don't use our default + libPageTitleRes = INVALID_ID //reset res so we don't use our default } - var faqXmlRes: Int = -1 + var faqXmlRes: Int = INVALID_ID var faqPageTitleRes: Int = R.string.kau_about_faq_intro var faqPageTitle: String? = null set(value) { field = value - faqPageTitleRes = -1 //reset res so we don't use our default + faqPageTitleRes = INVALID_ID //reset res so we don't use our default } /** * Whether new lines should be included diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt index 036f16c..59ab39a 100644 --- a/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt +++ b/about/src/main/kotlin/ca/allanwang/kau/about/CollapsibleTextView.kt @@ -2,6 +2,7 @@ package ca.allanwang.kau.about import android.content.Context import android.content.res.Configuration +import android.support.v7.widget.AppCompatTextView import android.util.AttributeSet import android.widget.TextView import ca.allanwang.kau.ui.views.CollapsibleView @@ -13,7 +14,7 @@ import ca.allanwang.kau.ui.views.CollapsibleViewDelegate */ class CollapsibleTextView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0 -) : TextView(context, attrs, defStyleAttr), CollapsibleView by CollapsibleViewDelegate() { +) : AppCompatTextView(context, attrs, defStyleAttr), CollapsibleView by CollapsibleViewDelegate() { init { initCollapsible(this) |