Merge "Fix hidden EmptyShadeView" into sc-dev
This commit is contained in:
@@ -157,15 +157,13 @@ public class StackScrollAlgorithm {
|
|||||||
// After the shelf has updated its yTranslation, explicitly set alpha=0 for view below shelf
|
// After the shelf has updated its yTranslation, explicitly set alpha=0 for view below shelf
|
||||||
// to skip rendering them in the hardware layer. We do not set them invisible because that
|
// to skip rendering them in the hardware layer. We do not set them invisible because that
|
||||||
// runs invalidate & onDraw when these views return onscreen, which is more expensive.
|
// runs invalidate & onDraw when these views return onscreen, which is more expensive.
|
||||||
|
if (shelf.getViewState().hidden) {
|
||||||
|
// When the shelf is hidden, it won't clip views, so we don't hide rows
|
||||||
|
return;
|
||||||
|
}
|
||||||
final float shelfTop = shelf.getViewState().yTranslation;
|
final float shelfTop = shelf.getViewState().yTranslation;
|
||||||
|
|
||||||
for (ExpandableView view : algorithmState.visibleChildren) {
|
for (ExpandableView view : algorithmState.visibleChildren) {
|
||||||
if (view instanceof ExpandableNotificationRow) {
|
|
||||||
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
|
||||||
if (row.isHeadsUp() || row.isHeadsUpAnimatingAway()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
final float viewTop = view.getViewState().yTranslation;
|
final float viewTop = view.getViewState().yTranslation;
|
||||||
if (viewTop >= shelfTop) {
|
if (viewTop >= shelfTop) {
|
||||||
view.getViewState().alpha = 0;
|
view.getViewState().alpha = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user