Dim background when group notification expanded

This fixes the contrast issue when dismissing

Fixes: 187652080
Test: visual
Change-Id: Ic181bc8b23ae62c8212fee19fd7c6434eb94cd61
This commit is contained in:
Jay Aliomer
2021-06-17 23:27:08 -04:00
parent 9da336b4c1
commit a0859487e4
2 changed files with 14 additions and 0 deletions

View File

@@ -203,6 +203,14 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg);
}
protected boolean hideBackground() {
return false;
}
protected void updateBackground() {
mBackgroundNormal.setVisibility(hideBackground() ? INVISIBLE : VISIBLE);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {

View File

@@ -2890,6 +2890,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
mShowNoBackground = false;
}
updateOutline();
updateBackground();
}
@Override
protected boolean hideBackground() {
return mShowNoBackground || super.hideBackground();
}
public int getPositionOfChild(ExpandableNotificationRow childRow) {