aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <allanwang@google.com>2019-08-15 16:04:14 -0700
committerAllan Wang <allanwang@google.com>2019-08-15 16:04:14 -0700
commit5aefeee08f68777dd07a16bd42a7d2392db6bbc9 (patch)
treea357e6cd419123d69ca5d2977c8ce839c56f3d87 /core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
parent85e9e1f253bb14512ae404989c45cbc199eb1eba (diff)
downloadkau-5aefeee08f68777dd07a16bd42a7d2392db6bbc9.tar.gz
kau-5aefeee08f68777dd07a16bd42a7d2392db6bbc9.tar.bz2
kau-5aefeee08f68777dd07a16bd42a7d2392db6bbc9.zip
Apply spotless
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.kt6
1 files changed, 3 insertions, 3 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 d002fb8..62e5716 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ContextUtils.kt
@@ -113,7 +113,7 @@ fun Context.startLink(vararg url: String?) {
fun Context.startLink(@StringRes url: Int) = startLink(string(url))
-//Toast helpers
+// Toast helpers
inline fun View.toast(@StringRes id: Int, duration: Int = Toast.LENGTH_LONG, log: Boolean = false) =
context.toast(id, duration, log)
@@ -130,7 +130,7 @@ inline fun Context.toast(text: String, duration: Int = Toast.LENGTH_LONG, log: B
const val INVALID_ID = 0
-//Resource retrievers
+// Resource retrievers
inline fun Context.string(@StringRes id: Int): String = getString(id)
inline fun Context.string(@StringRes id: Int, fallback: String?): String? =
@@ -161,7 +161,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
+// Attr retrievers
fun Context.resolveColor(@AttrRes attr: Int, @ColorInt fallback: Int = 0): Int {
val a = theme.obtainStyledAttributes(intArrayOf(attr))
try {