Add support for dark tint on taskbar nav buttons

Tint the buttons when taskbar isn't drawing a background (either due to alpha or offset).

Test: Dark icons on a light wallpaper on home screen, dark icons when light IME is showing
Bug: 204256643
Change-Id: Iae634a1b604f50edc102905abd0d812a43c5346e
This commit is contained in:
Tony Wickham
2021-11-04 16:53:59 -07:00
parent b797ca77b2
commit 9ceae57095
8 changed files with 78 additions and 17 deletions

View File

@@ -151,8 +151,8 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
buttonController,
new NavbarButtonsViewController(this, navButtonsView),
new RotationButtonController(this,
c.getColor(R.color.rotation_button_light_color),
c.getColor(R.color.rotation_button_dark_color),
c.getColor(R.color.taskbar_nav_icon_light_color),
c.getColor(R.color.taskbar_nav_icon_dark_color),
R.drawable.ic_sysbar_rotate_button_ccw_start_0,
R.drawable.ic_sysbar_rotate_button_ccw_start_90,
R.drawable.ic_sysbar_rotate_button_cw_start_0,
@@ -394,6 +394,11 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mControllers.rotationButtonController.onBehaviorChanged(displayId, behavior);
}
public void onNavButtonsDarkIntensityChanged(float darkIntensity) {
mControllers.navbarButtonsViewController.getTaskbarNavButtonDarkIntensity()
.updateValue(darkIntensity);
}
/**
* Updates the TaskbarContainer to MATCH_PARENT vs original Taskbar size.
*/