Merge "Update view colors on onOverlayChanged()" into sc-dev
This commit is contained in:
@@ -1002,10 +1002,6 @@ public class NotificationShelf extends ActivatableNotificationView implements
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUiModeChanged() {
|
|
||||||
updateBackgroundColors();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setController(NotificationShelfController notificationShelfController) {
|
public void setController(NotificationShelfController notificationShelfController) {
|
||||||
mController = notificationShelfController;
|
mController = notificationShelfController;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,10 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
|||||||
initDimens();
|
initDimens();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void updateBackgroundColors() {
|
/**
|
||||||
|
* Reload background colors from resources and invalidate views.
|
||||||
|
*/
|
||||||
|
public void updateBackgroundColors() {
|
||||||
updateColors();
|
updateColors();
|
||||||
initBackground();
|
initBackground();
|
||||||
updateBackgroundTint();
|
updateBackgroundTint();
|
||||||
|
|||||||
@@ -626,7 +626,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
|
|||||||
mBgColor = Utils.getColorAttr(mContext, android.R.attr.colorBackgroundFloating)
|
mBgColor = Utils.getColorAttr(mContext, android.R.attr.colorBackgroundFloating)
|
||||||
.getDefaultColor();
|
.getDefaultColor();
|
||||||
updateBackgroundDimming();
|
updateBackgroundDimming();
|
||||||
mShelf.onUiModeChanged();
|
for (int i = 0; i < getChildCount(); i++) {
|
||||||
|
View child = getChildAt(i);
|
||||||
|
if (child instanceof ActivatableNotificationView) {
|
||||||
|
((ActivatableNotificationView) child).updateBackgroundColors();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ShadeViewRefactor(RefactorComponent.DECORATOR)
|
@ShadeViewRefactor(RefactorComponent.DECORATOR)
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ public class NotificationStackScrollLayoutController {
|
|||||||
updateShowEmptyShadeView();
|
updateShowEmptyShadeView();
|
||||||
mView.updateCornerRadius();
|
mView.updateCornerRadius();
|
||||||
mView.updateBgColor();
|
mView.updateBgColor();
|
||||||
|
mView.updateDecorViews();
|
||||||
mView.reinflateViews();
|
mView.reinflateViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user