List of usage examples for android.transition TransitionSet getTransitionCount
public int getTransitionCount()
From source file:Main.java
public static @Nullable Transition findTransition(@NonNull TransitionSet set, @NonNull Class<? extends Transition> clazz) { for (int i = 0; i < set.getTransitionCount(); i++) { Transition transition = set.getTransitionAt(i); if (transition.getClass() == clazz) { return transition; }/*from ww w. j a v a 2s. c o m*/ if (transition instanceof TransitionSet) { Transition child = findTransition((TransitionSet) transition, clazz); if (child != null) return child; } } return null; }
From source file:Main.java
public static @Nullable Transition findTransition(@NonNull TransitionSet set, @NonNull Class<? extends Transition> clazz, @IdRes int targetId) { for (int i = 0; i < set.getTransitionCount(); i++) { Transition transition = set.getTransitionAt(i); if (transition.getClass() == clazz) { if (transition.getTargetIds().contains(targetId)) { return transition; }/*from www.j a v a 2s . com*/ } if (transition instanceof TransitionSet) { Transition child = findTransition((TransitionSet) transition, clazz, targetId); if (child != null) return child; } } return null; }