From 7c0b3ee82ccfd2b52e75665e7c308bea80909643 Mon Sep 17 00:00:00 2001 From: Hemanth S Date: Tue, 22 Sep 2020 15:00:00 +0530 Subject: [PATCH] Update ViewExtensions.kt --- .../name/monkey/retromusic/extensions/ViewExtensions.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/code/name/monkey/retromusic/extensions/ViewExtensions.kt b/app/src/main/java/code/name/monkey/retromusic/extensions/ViewExtensions.kt index 3c224ed6..d32583fb 100644 --- a/app/src/main/java/code/name/monkey/retromusic/extensions/ViewExtensions.kt +++ b/app/src/main/java/code/name/monkey/retromusic/extensions/ViewExtensions.kt @@ -20,6 +20,7 @@ import android.view.View import android.view.ViewGroup import android.widget.EditText import androidx.annotation.LayoutRes +import androidx.core.animation.doOnEnd import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.util.TintHelper import com.google.android.material.bottomsheet.BottomSheetBehavior @@ -54,6 +55,12 @@ fun View.translateXAnimate(value: Float) { .apply { duration = 300 start() + doOnEnd { + + if (value != 0f) { + this@translateXAnimate.hide() + } + } } }