disable Animation Transition - Android Animation

Android examples for Animation:Translate Animation

Description

disable Animation Transition

Demo Code


//package com.java2s;

import android.annotation.TargetApi;
import android.os.Build;
import android.view.ViewGroup;

public class Main {
    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
    public static void disableAnimationTransition(Object view) {
        if (view instanceof ViewGroup && Build.VERSION.SDK_INT > 10) {
            ViewGroup viewGroup = (ViewGroup) view;
            viewGroup.setLayoutTransition(null);
        }/*from   www  .  j  av  a  2  s .  c  om*/
    }
}

Related Tutorials