diff options
author | Allan Wang <me@allanwang.ca> | 2019-12-31 19:56:44 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-12-31 19:56:44 -0800 |
commit | b0209fa6bdac6beffd8b0259e68e52dfadbcb9a7 (patch) | |
tree | 85ef35ec64462a0d65cbb865a377ded53ed383ad /core/src | |
parent | 1d71665d55876980ae0926d55b537db62cba4b17 (diff) | |
download | kau-b0209fa6bdac6beffd8b0259e68e52dfadbcb9a7.tar.gz kau-b0209fa6bdac6beffd8b0259e68e52dfadbcb9a7.tar.bz2 kau-b0209fa6bdac6beffd8b0259e68e52dfadbcb9a7.zip |
Allow option to disable CircleView selected ring
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyUi.kt | 17 | ||||
-rw-r--r-- | core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyUi.kt b/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyUi.kt index 28994e4..d3ac0f5 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyUi.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/kotlin/LazyUi.kt @@ -1,6 +1,21 @@ +/* + * Copyright 2019 Allan Wang + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package ca.allanwang.kau.kotlin /** * Shortcut for unsynchronized lazy block */ -fun <T> lazyUi(initializer: () -> T): Lazy<T> = lazy(LazyThreadSafetyMode.NONE, initializer)
\ No newline at end of file +fun <T> lazyUi(initializer: () -> T): Lazy<T> = lazy(LazyThreadSafetyMode.NONE, initializer) diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt index a1b96f5..4757a00 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt @@ -104,7 +104,8 @@ fun View.snackbar( } fun View.snackbar( - @StringRes textId: Int, duration: Int = Snackbar.LENGTH_LONG, + @StringRes textId: Int, + duration: Int = Snackbar.LENGTH_LONG, builder: Snackbar.() -> Unit = {} ) = snackbar(context.string(textId), duration, builder) |