Make navbar scrim taskbar background if taskbar is enabled.

This ensures the navbar buttons are visible on large screens where All
Apps or Widgets picker are bottom sheets.

Test: Scrim is taskbar background color on devices with taskbar.
Bug: 264463659
Change-Id: I37890c0f542db625f9aeae7648bbaed064c4d240
This commit is contained in:
Brian Isganitis
2023-03-31 16:40:49 -04:00
parent d48a6fb4b7
commit 13e672aa76
3 changed files with 32 additions and 3 deletions

View File

@@ -184,7 +184,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
this, mActivityContext.getStatsLogManager());
mAH = Arrays.asList(null, null, null);
mNavBarScrimPaint = new Paint();
mNavBarScrimPaint.setColor(Themes.getAttrColor(context, R.attr.allAppsNavBarScrimColor));
mNavBarScrimPaint.setColor(Themes.getNavBarScrimColor(mActivityContext));
AllAppsStore.OnUpdateListener onAppsUpdated = this::onAppsUpdated;
if (TestProtocol.sDebugTracing) {
@@ -810,6 +810,12 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
}
}
updateBackground(dp);
int navBarScrimColor = Themes.getNavBarScrimColor(mActivityContext);
if (mNavBarScrimPaint.getColor() != navBarScrimColor) {
mNavBarScrimPaint.setColor(navBarScrimColor);
invalidate();
}
}
protected void updateBackground(DeviceProfile deviceProfile) {