question: private void startAnimations ( final ExpandableView child , StackScrollState . ViewState viewState , StackScrollState finalState , int i ) { int childVisibility = child . getVisibility ( ) ; boolean wasVisible = childVisibility == View . VISIBLE ; final float alpha = viewState . alpha ; if ( ! wasVisible && alpha != 0 && ! viewState . gone ) { child . setVisibility ( View . VISIBLE ) ; } boolean yTranslationChanging = child . getTranslationY ( ) != viewState . yTranslation ; boolean zTranslationChanging = child . getTranslationZ ( ) != viewState . zTranslation ; boolean scaleChanging = child . getScaleX ( ) != viewState . scale ; boolean alphaChanging = alpha != child . getAlpha ( ) ; boolean heightChanging = viewState . height != child . getActualHeight ( ) ; boolean topInsetChanging = viewState . clipTopAmount != child . getClipTopAmount ( ) ; boolean wasAdded = mNewAddChildren . contains ( child ) ; boolean hasDelays = mAnimationFilter . hasDelays ; boolean isDelayRelevant = yTranslationChanging || zTranslationChanging || scaleChanging || alphaChanging || heightChanging || topInsetChanging ; boolean noAnimation = wasAdded ; long delay = 0 ; long duration = mCurrentLength ; if ( hasDelays && isDelayRelevant || wasAdded ) { delay = mCurrentAdditionalDelay + calculateChildAnimationDelay ( viewState , finalState ) ; } if ( wasAdded && mAnimationFilter . hasGoToFullShadeEvent ) { child . setTranslationY ( child . getTranslationY ( ) + mGoToFullShadeAppearingTranslation ) ; yTranslationChanging = true ; float longerDurationFactor = viewState . notGoneIndex - mCurrentLastNotAddedIndex ; longerDurationFactor = ( float ) Math . pow ( longerDurationFactor , 0.7f ) ; duration = ANIMATION_DURATION_APPEAR_DISAPPEAR + 50 + ( long ) ( 100 * longerDurationFactor ) ; } if ( yTranslationChanging ) { if ( noAnimation && ! mAnimationFilter . hasGoToFullShadeEvent ) { child . setTranslationY ( viewState . yTranslation ) ; } else { startYTranslationAnimation ( child , viewState , duration , delay ) ; } } if ( zTranslationChanging ) { if ( noAnimation ) { child . setTranslationZ ( viewState . zTranslation ) ; } else { startZTranslationAnimation ( child , viewState , duration , delay ) ; } } if ( scaleChanging ) { if ( noAnimation ) { child . setScaleX ( viewState . scale ) ; child . setScaleY ( viewState . scale ) ; } else { startScaleAnimation ( child , viewState , duration ) ; } } if ( alphaChanging && child . getTranslationX ( ) == 0 ) { if ( noAnimation ) { child . setAlpha ( viewState . alpha ) ; } else { startAlphaAnimation ( child , viewState , duration , delay ) ; } } if ( heightChanging && child . getActualHeight ( ) != 0 ) { if ( noAnimation ) { child . setActualHeight ( viewState . height , false ) ; } else { startHeightAnimation ( child , viewState , duration , delay ) ; } } if ( topInsetChanging ) { if ( noAnimation ) { child . setClipTopAmount ( viewState . clipTopAmount ) ; } else { startInsetAnimation ( child , viewState , duration , delay ) ; } } child . setDimmed ( viewState . dimmed , mAnimationFilter . animateDimmed && ! wasAdded && ! noAnimation ) ; child . setDark ( viewState . dark , mAnimationFilter . animateDark && ! noAnimation ) ; child . setHideSensitive ( viewState . hideSensitive , mAnimationFilter . animateHideSensitive && ! wasAdded && ! noAnimation , delay , duration ) ; if ( wasAdded ) { child . performAddAnimation ( delay , mCurrentLength ) ; } }
target:  Start an animation to the given viewState