Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.animation.LayoutTransition;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;

import java.util.List;

public class Main {
    private static List<LayoutTransition> sLayoutTransitions = new ArrayList<LayoutTransition>();

    public static void disableChangeTransition(LayoutTransition layoutTransition) {
        if (layoutTransition == null) {
            return;
        }
        try {
            Method method = LayoutTransition.class.getMethod("disableTransitionType", new Class[] { int.class });
            Field field = LayoutTransition.class.getField("CHANGING");
            method.invoke(layoutTransition, field.get(null));
        } catch (Exception e) {
            sLayoutTransitions.remove(layoutTransition);
        }
    }
}