aboutsummaryrefslogtreecommitdiff
path: root/adapter/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-22 16:08:08 -0700
committerGitHub <noreply@github.com>2017-07-22 16:08:08 -0700
commit61d87976e8b29ed25061ae98743a6cf4f4274542 (patch)
treefa4d9bca5fe1b9478ba2f1cc1e6c7d8d18bf15ce /adapter/src/main/kotlin/ca/allanwang
parent8f2b5ac043f47cc44f43c3788d1377083fb339a2 (diff)
downloadkau-61d87976e8b29ed25061ae98743a6cf4f4274542.tar.gz
kau-61d87976e8b29ed25061ae98743a6cf4f4274542.tar.bz2
kau-61d87976e8b29ed25061ae98743a6cf4f4274542.zip
Support sdk 19 where possible and add image picker (#10)3.0
* Fix plural * Switch to long * Test plural again * Comment * Major update to image picker and view utils * Make image activity full screen * Update min sdk and prefix * Lower sdk requirement and make string private * Bring kpref activity to sdk 19
Diffstat (limited to 'adapter/src/main/kotlin/ca/allanwang')
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
index 1349a35..b1c281a 100644
--- a/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
@@ -1,6 +1,8 @@
package ca.allanwang.kau.adapters
import android.content.res.ColorStateList
+import android.os.Build
+import android.support.annotation.RequiresApi
import android.view.View
import android.widget.ImageView
import android.widget.TextView
@@ -174,6 +176,7 @@ class ThemableIItemDelegate : ThemableIItem, ThemableIItemColors by ThemableIIte
views.forEach { it?.setBackgroundColor(color) }
}
+ @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
override fun bindBackgroundRipple(vararg views: View?) {
val background = backgroundColor ?: return
val foreground = accentColor ?: textColor ?: backgroundColor ?: return //default to normal background
@@ -181,6 +184,7 @@ class ThemableIItemDelegate : ThemableIItem, ThemableIItemColors by ThemableIIte
views.forEach { it?.background = ripple }
}
+ @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
override fun bindIconColor(vararg views: ImageView?) {
val color = accentColor ?: textColor ?: return
views.forEach { it?.drawable?.setTintList(ColorStateList.valueOf(color)) }