aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-10-19 22:30:16 -0700
committerAllan Wang <me@allanwang.ca>2019-10-19 22:31:14 -0700
commit7007e61879bf33c09115b5d8bc16f27af2731045 (patch)
tree19bc5e07f16ce1b6b9d13c711fed5160e25bc3ad /core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
parent63f920c3257e955da1ef63c91f8b5e2de5478e55 (diff)
downloadkau-7007e61879bf33c09115b5d8bc16f27af2731045.tar.gz
kau-7007e61879bf33c09115b5d8bc16f27af2731045.tar.bz2
kau-7007e61879bf33c09115b5d8bc16f27af2731045.zip
Convert java math to kotlin math
Diffstat (limited to 'core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt')
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt3
1 files changed, 2 insertions, 1 deletions
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 e4ec19c..d576be1 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
@@ -41,6 +41,7 @@ import com.google.android.material.snackbar.Snackbar
import com.google.android.material.textfield.TextInputEditText
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.IIcon
+import kotlin.math.max
/**
* Created by Allan Wang on 2017-05-31.
@@ -342,7 +343,7 @@ fun FloatingActionButton.hideOnDownwardsScroll(recycler: RecyclerView) {
}
inline var View.scaleXY
- get() = Math.max(scaleX, scaleY)
+ get() = max(scaleX, scaleY)
set(value) {
scaleX = value
scaleY = value