Code refactor
parent
b2a5f5a2d1
commit
acd55f249a
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue