aboutsummaryrefslogtreecommitdiff
path: root/about
diff options
context:
space:
mode:
Diffstat (limited to 'about')
-rw-r--r--about/build.gradle6
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt9
-rw-r--r--about/src/main/res/layout/kau_iitem_library.xml3
-rw-r--r--about/src/main/res/values/strings_about.xml2
4 files changed, 13 insertions, 7 deletions
diff --git a/about/build.gradle b/about/build.gradle
index 5decae4..3ee1a48 100644
--- a/about/build.gradle
+++ b/about/build.gradle
@@ -1,5 +1,11 @@
apply from: '../android-lib.gradle'
+android {
+ defaultConfig {
+ resValue "string", "kau_version_code", project.VERSION_NAME
+ }
+}
+
dependencies {
compile project(':core-ui')
compile project(':adapter')
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
index 5e00447..629aa52 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
@@ -8,10 +8,7 @@ import android.widget.TextView
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.iitems.KauIItem
-import ca.allanwang.kau.utils.bindView
-import ca.allanwang.kau.utils.dpToPx
-import ca.allanwang.kau.utils.parentViewGroup
-import ca.allanwang.kau.utils.setPaddingLeft
+import ca.allanwang.kau.utils.*
import ca.allanwang.kau.xml.FaqItem
import com.mikepenz.fastadapter.FastAdapter
import com.mikepenz.fastadapter.IItem
@@ -57,7 +54,9 @@ class FaqIItem(val content: FaqItem) : KauIItem<LibraryIItem, FaqIItem.ViewHolde
answer.post { answer.setPaddingLeft(16.dpToPx + number.width) }
bindTextColor(number, question)
bindTextColorSecondary(answer)
- bindDividerColor(answer)
+ val bg2 = backgroundColor?.colorToForeground(0.1f)
+ if (bg2 != null)
+ answer.setBackgroundColor(bg2)
bindBackgroundRipple(questionContainer)
}
}
diff --git a/about/src/main/res/layout/kau_iitem_library.xml b/about/src/main/res/layout/kau_iitem_library.xml
index 3ad4fb4..ed1cceb 100644
--- a/about/src/main/res/layout/kau_iitem_library.xml
+++ b/about/src/main/res/layout/kau_iitem_library.xml
@@ -6,7 +6,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:selectableItemBackground"
- android:clickable="true">
+ android:clickable="true"
+ android:focusable="true">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
diff --git a/about/src/main/res/values/strings_about.xml b/about/src/main/res/values/strings_about.xml
index 8c3dc59..592f9f4 100644
--- a/about/src/main/res/values/strings_about.xml
+++ b/about/src/main/res/values/strings_about.xml
@@ -1,8 +1,8 @@
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
- <string name="library_kau_libraryVersion">3.2.3</string>
<string name="define_kau"/>
<string name="library_kau_author">Allan Wang</string>
<string name="library_kau_authorWebsite">https://www.allanwang.ca/dev/</string>
+ <string name="library_kau_libraryVersion">@string/kau_version_code</string>
<string name="library_kau_libraryName">KAU</string>
<string name="library_kau_libraryDescription">
<![CDATA[