Fixing notification background peeking from the bottom when expanding QS
The issue was caused by notification scrim shifted 1px upward to overlap quick settings scrim. That was needed because of aliasing issue - but checking now that shouldn't be really required as a long as we have horizontal overlapping still in place. Additionally, this 1px vertical shift might be causing other misalignment issues also when notification scrim is fully visible and views are aligned to the scrim's top. Before (with 1px shift): https://screenshot.googleplex.com/3sWpkb7Zn7W8hQk After (no shift): https://screenshot.googleplex.com/AardmjvDezgGC9Q Fixes: 190767217 Bug: 186644628 Test: see screenshots Change-Id: Ie5ead80aa51f838716f1b355d439f36dd7c3c41b
This commit is contained in:
@@ -551,11 +551,11 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, Dump
|
||||
*/
|
||||
public void setNotificationsBounds(float left, float top, float right, float bottom) {
|
||||
if (mClipsQsScrim) {
|
||||
// notification scrim's rounded corners are anti-aliased, but clipping of the QS scrim
|
||||
// can't be and it's causing jagged corners. That's why notification scrim needs
|
||||
// to overlap QS scrim by one pixel - both vertically (top - 1) and
|
||||
// horizontally (left - 1 and right + 1), see: b/186644628
|
||||
mNotificationsScrim.setDrawableBounds(left - 1, top - 1, right + 1, bottom);
|
||||
// notification scrim's rounded corners are anti-aliased, but clipping of the QS/behind
|
||||
// scrim can't be and it's causing jagged corners. That's why notification scrim needs
|
||||
// to overlap QS scrim by one pixel horizontally (left - 1 and right + 1)
|
||||
// see: b/186644628
|
||||
mNotificationsScrim.setDrawableBounds(left - 1, top, right + 1, bottom);
|
||||
mScrimBehind.setBottomEdgePosition((int) top);
|
||||
} else {
|
||||
mNotificationsScrim.setDrawableBounds(left, top, right, bottom);
|
||||
|
||||
Reference in New Issue
Block a user