Created
February 26, 2020 17:13
-
-
Save AmaroNeto/733269a5edba699fd86abba6a1ebe54f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun collapseAnimation() { | |
val changeColor = AnimatorUtils.changeColor( | |
cardBox::setCardBackgroundColor, | |
ContextCompat.getColor(this, R.color.white), | |
ContextCompat.getColor(this, R.color.red), | |
500) | |
val resize = AnimatorUtils.resize(cardBox, newHeight, oldHeight, 250) | |
val fadeOut = AnimatorUtils.hideWithFadeOut(detail, 200) | |
val fadeIn = AnimatorUtils.showWithFadeIn(intro, 300) | |
AnimatorSet().apply { | |
playTogether(changeColor, resize, fadeOut) | |
play(fadeIn).after(fadeOut) | |
start() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment