Slide 60
Slide 60 text
Handling change
class FadeAndScaleChangeHandler : AnimatorChangeHandler() {
override fun getAnimator(container: ViewGroup,
from: View,
to: View,
isPush: Boolean,
toAddedToContainer: Boolean): Animator {
val set = AnimatorSet()
set.playTogether(
ObjectAnimator.ofFloat(to, View.SCALE_X, 0.9f, 1f),
ObjectAnimator.ofFloat(to, View.SCALE_Y, 0.9f, 1f),
ObjectAnimator.ofFloat(to, View.ALPHA, 0f, 1f))
return set