Force persistent taskbar all apps icon to light version.

Persistent taskbar background is always dark regardless of device theme,
so we should make the icon always light for now.

Test: Manual
Fix: 262837720
Change-Id: I8f66af874e07f68e1943245e9cd49c3b3107915f
This commit is contained in:
Brian Isganitis
2023-01-31 14:50:15 -08:00
parent f667823a8e
commit 748094b185
6 changed files with 23 additions and 7 deletions

View File

@@ -47,6 +47,7 @@ import com.android.launcher3.util.DisplayController;
import com.android.launcher3.util.LauncherBindableItemsContainer;
import com.android.launcher3.views.ActivityContext;
import com.android.launcher3.views.DoubleShadowBubbleTextView;
import com.android.launcher3.views.IconButtonView;
import java.util.function.Predicate;
@@ -80,7 +81,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
private @Nullable FolderIcon mLeaveBehindFolderIcon;
// Only non-null when device supports having an All Apps button.
private @Nullable View mAllAppsButton;
private @Nullable IconButtonView mAllAppsButton;
// Only non-null when device supports having an All Apps button.
private @Nullable View mTaskbarDivider;
@@ -125,10 +126,14 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()
&& !mActivityContext.getPackageManager().hasSystemFeature(FEATURE_PC)) {
mAllAppsButton = LayoutInflater.from(context)
mAllAppsButton = (IconButtonView) LayoutInflater.from(context)
.inflate(R.layout.taskbar_all_apps_button, this, false);
mAllAppsButton.setPadding(mItemPadding, mItemPadding, mItemPadding, mItemPadding);
mAllAppsButton.setScaleX(mIsRtl ? -1 : 1);
mAllAppsButton.setForegroundTint(mActivityContext.getColor(
DisplayController.isTransientTaskbar(mActivityContext)
? R.color.all_apps_button_color
: R.color.all_apps_button_color_dark));
if (FeatureFlags.ENABLE_TASKBAR_PINNING.get()) {
mTaskbarDivider = LayoutInflater.from(context).inflate(R.layout.taskbar_divider,