Merge "Fixed the clear all animation on the locked shade" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
890c430416
@@ -2589,9 +2589,6 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
}
|
}
|
||||||
updateAnimationState(false, child);
|
updateAnimationState(false, child);
|
||||||
|
|
||||||
// Make sure the clipRect we might have set is removed
|
|
||||||
expandableView.setClipTopAmount(0);
|
|
||||||
|
|
||||||
focusNextViewIfFocused(child);
|
focusNextViewIfFocused(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3038,10 +3035,6 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
private void generateChildRemovalEvents() {
|
private void generateChildRemovalEvents() {
|
||||||
for (View child : mChildrenToRemoveAnimated) {
|
for (View child : mChildrenToRemoveAnimated) {
|
||||||
boolean childWasSwipedOut = mSwipedOutViews.contains(child);
|
boolean childWasSwipedOut = mSwipedOutViews.contains(child);
|
||||||
int animationType = childWasSwipedOut
|
|
||||||
? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT
|
|
||||||
: AnimationEvent.ANIMATION_TYPE_REMOVE;
|
|
||||||
AnimationEvent event = new AnimationEvent(child, animationType);
|
|
||||||
|
|
||||||
// we need to know the view after this one
|
// we need to know the view after this one
|
||||||
float removedTranslation = child.getTranslationY();
|
float removedTranslation = child.getTranslationY();
|
||||||
@@ -3052,7 +3045,16 @@ public class NotificationStackScrollLayout extends ViewGroup
|
|||||||
removedTranslation = row.getTranslationWhenRemoved();
|
removedTranslation = row.getTranslationWhenRemoved();
|
||||||
ignoreChildren = false;
|
ignoreChildren = false;
|
||||||
}
|
}
|
||||||
|
childWasSwipedOut |= Math.abs(row.getTranslation()) == row.getWidth();
|
||||||
}
|
}
|
||||||
|
if (!childWasSwipedOut) {
|
||||||
|
Rect clipBounds = child.getClipBounds();
|
||||||
|
childWasSwipedOut = clipBounds.height() == 0;
|
||||||
|
}
|
||||||
|
int animationType = childWasSwipedOut
|
||||||
|
? AnimationEvent.ANIMATION_TYPE_REMOVE_SWIPED_OUT
|
||||||
|
: AnimationEvent.ANIMATION_TYPE_REMOVE;
|
||||||
|
AnimationEvent event = new AnimationEvent(child, animationType);
|
||||||
event.viewAfterChangingView = getFirstChildBelowTranlsationY(removedTranslation,
|
event.viewAfterChangingView = getFirstChildBelowTranlsationY(removedTranslation,
|
||||||
ignoreChildren);
|
ignoreChildren);
|
||||||
mAnimationEvents.add(event);
|
mAnimationEvents.add(event);
|
||||||
|
|||||||
Reference in New Issue
Block a user