Fixed an issue where the notification could become transparent

Bug: 17668881
Change-Id: If8389084c7696bb8d3c0155f1262ec1fe7973c44
This commit is contained in:
Selim Cinek
2014-10-09 15:54:40 -07:00
parent 1e2e4307ff
commit 59d9723dd7

View File

@@ -403,6 +403,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
}
private void fadeBackground() {
mBackgroundNormal.animate().cancel();
if (mDimmed) {
mBackgroundDimmed.setVisibility(View.VISIBLE);
} else {
@@ -446,6 +447,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
mBackgroundDimmed.setVisibility(View.VISIBLE);
mBackgroundNormal.setVisibility(View.INVISIBLE);
} else {
cancelFadeAnimations();
mBackgroundDimmed.setVisibility(View.INVISIBLE);
mBackgroundNormal.setVisibility(View.VISIBLE);
mBackgroundNormal.setAlpha(1f);
@@ -453,6 +455,13 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
}
}
private void cancelFadeAnimations() {
if (mBackgroundAnimator != null) {
mBackgroundAnimator.cancel();
}
mBackgroundNormal.animate().cancel();
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);