aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-09-09 11:59:24 -0400
committerGitHub <noreply@github.com>2018-09-09 11:59:24 -0400
commitd540934915da26ab2cec4c897e973be35e0bfe24 (patch)
tree6f114d080c168381266a0d5d3a40b685e28b8e9a /core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
parent718a51ed00a0a5c3dc7a655e617308e82da65d1a (diff)
downloadkau-d540934915da26ab2cec4c897e973be35e0bfe24.tar.gz
kau-d540934915da26ab2cec4c897e973be35e0bfe24.tar.bz2
kau-d540934915da26ab2cec4c897e973be35e0bfe24.zip
Clean up kotterknife (#161)
* Remove bindview implementations internally * Remove more bindView calls * Make config private in ElasticRecyclerActivity * Fix recyclerview * Update adapter * Improve swipe destroy and add direction to swipe finish
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
index fdee4d8..6568bf2 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
@@ -118,7 +118,7 @@ inline fun Context.animation(@AnimRes id: Int) = AnimationUtils.loadAnimation(th
inline fun Context.plural(@PluralsRes id: Int, quantity: Number) = resources.getQuantityString(id, quantity.toInt(), quantity.toInt())!!
//Attr retrievers
-fun Context.resolveColor(@AttrRes attr: Int, fallback: Int = 0): Int {
+fun Context.resolveColor(@AttrRes attr: Int, @ColorInt fallback: Int = 0): Int {
val a = theme.obtainStyledAttributes(intArrayOf(attr))
try {
return a.getColor(0, fallback)