am e0f76e9a: Merge "Fix transition being canceled improperly." into lmp-mr1-dev
* commit 'e0f76e9a6d352c45a1729b99ea0df59bd4359423': Fix transition being canceled improperly.
This commit is contained in:
@@ -1790,6 +1790,10 @@ public abstract class Transition implements Cloneable {
|
|||||||
|
|
||||||
private static boolean isValueChanged(TransitionValues oldValues, TransitionValues newValues,
|
private static boolean isValueChanged(TransitionValues oldValues, TransitionValues newValues,
|
||||||
String key) {
|
String key) {
|
||||||
|
if (oldValues.values.containsKey(key) != newValues.values.containsKey(key)) {
|
||||||
|
// The transition didn't care about this particular value, so we don't care, either.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Object oldValue = oldValues.values.get(key);
|
Object oldValue = oldValues.values.get(key);
|
||||||
Object newValue = newValues.values.get(key);
|
Object newValue = newValues.values.get(key);
|
||||||
boolean changed;
|
boolean changed;
|
||||||
|
|||||||
@@ -484,12 +484,19 @@ public abstract class Visibility extends Transition {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
|
boolean areValuesChanged(TransitionValues oldValues, TransitionValues newValues) {
|
||||||
VisibilityInfo changeInfo = getVisibilityChangeInfo(oldValues, newValues);
|
|
||||||
if (oldValues == null && newValues == null) {
|
if (oldValues == null && newValues == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (oldValues != null && newValues != null &&
|
||||||
|
newValues.values.containsKey(PROPNAME_VISIBILITY) !=
|
||||||
|
oldValues.values.containsKey(PROPNAME_VISIBILITY)) {
|
||||||
|
// The transition wasn't targeted in either the start or end, so it couldn't
|
||||||
|
// have changed.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
VisibilityInfo changeInfo = getVisibilityChangeInfo(oldValues, newValues);
|
||||||
return changeInfo.visibilityChange && (changeInfo.startVisibility == View.VISIBLE ||
|
return changeInfo.visibilityChange && (changeInfo.startVisibility == View.VISIBLE ||
|
||||||
changeInfo.endVisibility == View.VISIBLE);
|
changeInfo.endVisibility == View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user