Merge "Properly cancel animators when View doesn't exist in starting state." into mnc-dev
This commit is contained in:
@@ -1639,6 +1639,7 @@ public abstract class Transition implements Cloneable {
|
|||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
TransitionValues values = lookIn.get(i);
|
TransitionValues values = lookIn.get(i);
|
||||||
if (values == null) {
|
if (values == null) {
|
||||||
|
// Null values are always added to the end of the list, so we know to stop now.
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (values.view == view) {
|
if (values.view == view) {
|
||||||
@@ -1742,6 +1743,9 @@ public abstract class Transition implements Cloneable {
|
|||||||
View oldView = oldInfo.view;
|
View oldView = oldInfo.view;
|
||||||
TransitionValues startValues = getTransitionValues(oldView, true);
|
TransitionValues startValues = getTransitionValues(oldView, true);
|
||||||
TransitionValues endValues = getMatchedTransitionValues(oldView, true);
|
TransitionValues endValues = getMatchedTransitionValues(oldView, true);
|
||||||
|
if (startValues == null && endValues == null) {
|
||||||
|
endValues = mEndValues.viewValues.get(oldView);
|
||||||
|
}
|
||||||
boolean cancel = (startValues != null || endValues != null) &&
|
boolean cancel = (startValues != null || endValues != null) &&
|
||||||
oldInfo.transition.areValuesChanged(oldValues, endValues);
|
oldInfo.transition.areValuesChanged(oldValues, endValues);
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
|
|||||||
Reference in New Issue
Block a user