am c2be2d14: am 5bc2737b: am 2d0cb7d1: Add a way to get Transitions from a TransitionSet.
* commit 'c2be2d1432b540f64b3d735bb790708a2a64800d': Add a way to get Transitions from a TransitionSet.
This commit is contained in:
@@ -32039,6 +32039,8 @@ package android.transition {
|
||||
method public void captureEndValues(android.transition.TransitionValues);
|
||||
method public void captureStartValues(android.transition.TransitionValues);
|
||||
method public int getOrdering();
|
||||
method public android.transition.Transition getTransitionAt(int);
|
||||
method public int getTransitionCount();
|
||||
method public android.transition.TransitionSet removeTransition(android.transition.Transition);
|
||||
method public android.transition.TransitionSet setOrdering(int);
|
||||
field public static final int ORDERING_SEQUENTIAL = 1; // 0x1
|
||||
|
||||
@@ -150,6 +150,31 @@ public class TransitionSet extends Transition {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of child transitions in the TransitionSet.
|
||||
*
|
||||
* @return The number of child transitions in the TransitionSet.
|
||||
* @see #addTransition(Transition)
|
||||
* @see #getTransitionAt(int)
|
||||
*/
|
||||
public int getTransitionCount() {
|
||||
return mTransitions.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the child Transition at the specified position in the TransitionSet.
|
||||
*
|
||||
* @param index The position of the Transition to retrieve.
|
||||
* @see #addTransition(Transition)
|
||||
* @see #getTransitionCount()
|
||||
*/
|
||||
public Transition getTransitionAt(int index) {
|
||||
if (index < 0 || index >= mTransitions.size()) {
|
||||
return null;
|
||||
}
|
||||
return mTransitions.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting a non-negative duration on a TransitionSet causes all of the child
|
||||
* transitions (current and future) to inherit this duration.
|
||||
|
||||
@@ -3559,6 +3559,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
|
||||
if (transitionId != -1 && transitionId != R.transition.no_transition) {
|
||||
TransitionInflater inflater = TransitionInflater.from(getContext());
|
||||
transition = inflater.inflateTransition(transitionId);
|
||||
if (transition instanceof TransitionSet &&
|
||||
((TransitionSet)transition).getTransitionCount() == 0) {
|
||||
transition = null;
|
||||
}
|
||||
}
|
||||
return transition;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user