Code example for LayoutTransition

0
 
        resetTransition(); 
    } 
 
    private void resetTransition() { 
        mTransitioner = new LayoutTransition();
        componentContainer.setLayoutTransition(mTransitioner);
    } 
 
    private void setupCustomAnimations() { 
 
 
        final ObjectAnimator testIn = ObjectAnimator.ofPropertyValuesHolder(
                componentContainer,
                PropertyValuesHolder.ofFloat("scaleX", 0, 1f),
                PropertyValuesHolder.ofFloat("scaleY", 0, 1f),
                PropertyValuesHolder.ofFloat("alpha", 0f, 1f));
 
        testIn.addListener(new AnimatorListenerAdapter() {
            public void onAnimationEnd(Animator anim) {
                View view = (View) ((ObjectAnimator) anim).getTarget();