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)
if (isVisible) {
bottomSheetBehavior.peekHeightAnimate(heightOfBarWithTabs)
bottomNavigationView.translateXAnimate(0f)
bottomNavigationView.translateYAnimate(0f)
} else {
bottomNavigationView.translateYAnimate(150f)
bottomSheetBehavior.peekHeightAnimate(heightOfBar)
bottomNavigationView.translateXAnimate(500f)
}
}
}

View File

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