Fix contrast issue with folder background and text colors.

Bug: 187797251
Test: dark wallpaper, light wallpaper, toggle dark theme on both
Change-Id: I57ddfc91878d68735d5ae5ec5ab78222fda101ca
This commit is contained in:
Jon Miranda
2021-05-11 17:01:13 -07:00
parent d30f4ce528
commit 7bbd03160f
7 changed files with 25 additions and 7 deletions

View File

@@ -168,15 +168,15 @@ public class FolderAnimationManager {
final float yDistance = initialY - lp.y;
// Set up the Folder background.
int previewBackgroundColor = Themes.getAttrColor(mContext, R.attr.folderFillColor);
final int finalColor;
int folderFillColor = Themes.getAttrColor(mContext, R.attr.folderFillColor);
if (mIsOpening) {
finalColor = Themes.getAttrColor(mContext, R.attr.popupColorPrimary);
finalColor = folderFillColor;
} else {
finalColor = mFolderBackground.getColor().getDefaultColor();
}
final int initialColor = setColorAlphaBound(previewBackgroundColor,
mPreviewBackground.getBackgroundAlpha());
final int initialColor = setColorAlphaBound(
folderFillColor, mPreviewBackground.getBackgroundAlpha());
mFolderBackground.mutate();
mFolderBackground.setColor(mIsOpening ? initialColor : finalColor);