am 3e056aa0: am f9df9dd8: Merge "Fixed an issue where the notification could become transparent" into lmp-dev
* commit '3e056aa0e09003679c2b96f6d5c966d299d8b70a': Fixed an issue where the notification could become transparent
This commit is contained in:
@@ -403,6 +403,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void fadeBackground() {
|
private void fadeBackground() {
|
||||||
|
mBackgroundNormal.animate().cancel();
|
||||||
if (mDimmed) {
|
if (mDimmed) {
|
||||||
mBackgroundDimmed.setVisibility(View.VISIBLE);
|
mBackgroundDimmed.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
@@ -446,6 +447,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
|||||||
mBackgroundDimmed.setVisibility(View.VISIBLE);
|
mBackgroundDimmed.setVisibility(View.VISIBLE);
|
||||||
mBackgroundNormal.setVisibility(View.INVISIBLE);
|
mBackgroundNormal.setVisibility(View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
cancelFadeAnimations();
|
||||||
mBackgroundDimmed.setVisibility(View.INVISIBLE);
|
mBackgroundDimmed.setVisibility(View.INVISIBLE);
|
||||||
mBackgroundNormal.setVisibility(View.VISIBLE);
|
mBackgroundNormal.setVisibility(View.VISIBLE);
|
||||||
mBackgroundNormal.setAlpha(1f);
|
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
|
@Override
|
||||||
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
|
||||||
super.onLayout(changed, left, top, right, bottom);
|
super.onLayout(changed, left, top, right, bottom);
|
||||||
|
|||||||
Reference in New Issue
Block a user