Merge changes I884b6830,Iee71e4eb into lmp-preview-dev

* changes:
  The layertype was incorrectly restored with overlapping alpha animations.
  Decreased shadows between notifications slightly.
This commit is contained in:
Selim Cinek
2014-05-23 17:33:23 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 3 deletions

View File

@@ -246,7 +246,7 @@
<dimen name="notification_side_padding">8dp</dimen>
<!-- Z distance between notifications if they are in the stack -->
<dimen name="z_distance_between_notifications">2dp</dimen>
<dimen name="z_distance_between_notifications">1dp</dimen>
<!-- The padding between the individual notification cards when dimmed. -->
<dimen name="notification_padding_dimmed">0dp</dimen>

View File

@@ -315,14 +315,13 @@ public class StackStateAnimator {
child.getAlpha(), newEndValue);
animator.setInterpolator(mFastOutSlowInInterpolator);
// Handle layer type
final int currentLayerType = child.getLayerType();
child.setLayerType(View.LAYER_TYPE_HARDWARE, null);
animator.addListener(new AnimatorListenerAdapter() {
public boolean mWasCancelled;
@Override
public void onAnimationEnd(Animator animation) {
child.setLayerType(currentLayerType, null);
child.setLayerType(View.LAYER_TYPE_NONE, null);
if (newEndValue == 0 && !mWasCancelled) {
child.setVisibility(View.INVISIBLE);
}