Code refactor

main
Hemanth S 2020-10-12 01:30:36 +05:30
parent b2a5f5a2d1
commit acd55f249a
2 changed files with 3 additions and 3 deletions

View File

@ -346,10 +346,10 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity() {
ViewCompat.setElevation(bottomNavigationView, 10f) ViewCompat.setElevation(bottomNavigationView, 10f)
if (isVisible) { if (isVisible) {
bottomSheetBehavior.peekHeightAnimate(heightOfBarWithTabs) bottomSheetBehavior.peekHeightAnimate(heightOfBarWithTabs)
bottomNavigationView.translateXAnimate(0f) bottomNavigationView.translateYAnimate(0f)
} else { } else {
bottomNavigationView.translateYAnimate(150f)
bottomSheetBehavior.peekHeightAnimate(heightOfBar) bottomSheetBehavior.peekHeightAnimate(heightOfBar)
bottomNavigationView.translateXAnimate(500f)
} }
} }
} }

View File

@ -50,7 +50,7 @@ fun EditText.appHandleColor(): EditText {
return this return this
} }
fun View.translateXAnimate(value: Float) { fun View.translateYAnimate(value: Float) {
ObjectAnimator.ofFloat(this, "translationY", value) ObjectAnimator.ofFloat(this, "translationY", value)
.apply { .apply {
duration = 300 duration = 300