Update folder preview and folder background colors.

Bug: 201332301
Test: light theme / dark theme
      open and close folder, ensure colors are accurate

Change-Id: I49198eb2faee03111be33051fd1cb08094844c77
This commit is contained in:
Jon Miranda
2021-10-06 16:57:33 -07:00
parent f9d2082cf3
commit b77878ebe3
11 changed files with 62 additions and 36 deletions

View File

@@ -22,7 +22,6 @@ import static com.android.launcher3.BubbleTextView.TEXT_ALPHA_PROPERTY;
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.folder.ClippedFolderIconLayoutRule.MAX_NUM_ITEMS_IN_PREVIEW;
import static com.android.launcher3.graphics.IconShape.getShape;
import static com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -175,15 +174,9 @@ public class FolderAnimationManager {
final float yDistance = initialY - lp.y;
// Set up the Folder background.
final int finalColor;
int folderFillColor = Themes.getAttrColor(mContext, R.attr.folderFillColor);
if (mIsOpening) {
finalColor = folderFillColor;
} else {
finalColor = mFolderBackground.getColor().getDefaultColor();
}
final int initialColor = setColorAlphaBound(
folderFillColor, mPreviewBackground.getBackgroundAlpha());
final int initialColor = Themes.getAttrColor(mContext, R.attr.folderPreviewColor);
final int finalColor = Themes.getAttrColor(mContext, R.attr.folderBackgroundColor);
mFolderBackground.mutate();
mFolderBackground.setColor(mIsOpening ? initialColor : finalColor);