aboutsummaryrefslogtreecommitdiff
path: root/mediapicker/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-01-11 00:49:07 -0800
committerAllan Wang <me@allanwang.ca>2021-01-11 00:49:07 -0800
commit451e9869bca0ea16eb24eaa8fe9e866ce36a9a7a (patch)
tree9f6eefc3a3eefb965841ebc4338b5f21aa0959d1 /mediapicker/src/main
parent89d4a2e596d07585c4a3ed91e6e091111da0c2ad (diff)
downloadkau-451e9869bca0ea16eb24eaa8fe9e866ce36a9a7a.tar.gz
kau-451e9869bca0ea16eb24eaa8fe9e866ce36a9a7a.tar.bz2
kau-451e9869bca0ea16eb24eaa8fe9e866ce36a9a7a.zip
Apply spotless and allow wildcard imports
Diffstat (limited to 'mediapicker/src/main')
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/BlurredImageView.kt12
-rw-r--r--mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt4
2 files changed, 8 insertions, 8 deletions
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/BlurredImageView.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/BlurredImageView.kt
index 50e8d10..8e78abf 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/BlurredImageView.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/BlurredImageView.kt
@@ -52,7 +52,7 @@ class BlurredImageView @JvmOverloads constructor(
private set
val imageBase: ImageView get() = binding.imageBase
-
+
private val binding: KauBlurredImageviewBinding = KauBlurredImageviewBinding.inflate(LayoutInflater.from(context), this)
init {
@@ -67,7 +67,7 @@ class BlurredImageView @JvmOverloads constructor(
override fun clearAnimation() {
super.clearAnimation()
- with (binding) {
+ with(binding) {
imageBase.clearAnimation()
imageBlur.clearAnimation()
imageForeground.clearAnimation()
@@ -91,7 +91,7 @@ class BlurredImageView @JvmOverloads constructor(
factor.width = width
factor.height = height
BlurTask(imageBase, factor) {
- with (binding) {
+ with(binding) {
imageBlur.setImageDrawable(it)
scaleAnimate(ANIMATION_SCALE).start()
imageBlur.alphaAnimate(1f).start()
@@ -112,7 +112,7 @@ class BlurredImageView @JvmOverloads constructor(
factor.width = width
factor.height = height
BlurTask(imageBase, factor) { drawable ->
- with (binding) {
+ with(binding) {
imageBlur.setImageDrawable(drawable)
scaleXY = ANIMATION_SCALE
imageBlur.alpha = 1f
@@ -128,7 +128,7 @@ class BlurredImageView @JvmOverloads constructor(
if (!isBlurred) return
isBlurred = false
scaleAnimate(1.0f).start()
- with (binding) {
+ with(binding) {
imageBlur.alphaAnimate(0f).withEndAction { imageBlur.setImageDrawable(null) }.start()
imageForeground.alphaAnimate(0f).start()
}
@@ -142,7 +142,7 @@ class BlurredImageView @JvmOverloads constructor(
clearAnimation()
scaleX = 1.0f
scaleX = 1.0f
- with (binding) {
+ with(binding) {
imageBlur.alpha = 0f
imageBlur.setImageDrawable(null)
imageForeground.alpha = 0f
diff --git a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
index 1357d4d..fe25d97 100644
--- a/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
+++ b/mediapicker/src/main/kotlin/ca/allanwang/kau/mediapicker/MediaPickerActivityBase.kt
@@ -39,8 +39,8 @@ import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
* Having three layered images makes this slightly slower than [MediaPickerActivityOverlayBase]
*/
abstract class MediaPickerActivityBase(
- mediaType: MediaType,
- mediaActions: List<MediaAction> = emptyList()
+ mediaType: MediaType,
+ mediaActions: List<MediaAction> = emptyList()
) : MediaPickerCore<MediaItem>(mediaType, mediaActions) {
private lateinit var binding: KauActivityImagePickerBinding