diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-03 00:22:10 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-03 00:22:10 -0700 |
commit | 5796566137995c8d244720f87ba85bce0e0d2f00 (patch) | |
tree | 1736e12182c7cf2769ad953029dc6a645b803802 /app/src/main/kotlin/com/pitchedapps/frost/views | |
parent | bc197ad5769ee792d930ac5b634e1e9000230689 (diff) | |
download | frost-5796566137995c8d244720f87ba85bce0e0d2f00.tar.gz frost-5796566137995c8d244720f87ba85bce0e0d2f00.tar.bz2 frost-5796566137995c8d244720f87ba85bce0e0d2f00.zip |
css updates and beginning login migration
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/ViewUtils.kt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/ViewUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/ViewUtils.kt index 01a49f7e..8dc3f01f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/ViewUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/ViewUtils.kt @@ -1,9 +1,10 @@ package com.pitchedapps.frost.views import android.content.res.ColorStateList -import android.graphics.PorterDuff import android.support.annotation.ColorInt import android.support.annotation.ColorRes +import android.support.annotation.StringRes +import android.support.design.widget.Snackbar import android.support.v4.content.ContextCompat import android.view.View import android.view.ViewGroup @@ -27,4 +28,12 @@ fun ProgressBar.tint(@ColorInt color: Int) { progressTintList = sl secondaryProgressTintList = sl indeterminateTintList = sl +} + +fun View.snackbar(text: String, duration: Int = Snackbar.LENGTH_LONG) { + Snackbar.make(this, text, duration).show() +} + +fun View.snackbar(@StringRes textId: Int, duration: Int = Snackbar.LENGTH_LONG) { + Snackbar.make(this, textId, duration).show() }
\ No newline at end of file |