Update All Apps divider color.

Also update how theming is applied. We pass a ContextThemeWrapper
to relevant views to retrieve the updated colors.

Demos switching blur on and off with adb:
 - From top (QSB, handle, divider): https://drive.google.com/file/d/1FHNzp5bNbNtH8tM7rSjKELPr6hsETPST/view?usp=drive_link&resourcekey=0-JuiAUJoNh4Pe_xKa74h0-g
 - Scrolled down (header protection + private space): https://drive.google.com/file/d/1gb1GCH3tJHS7HzOjvXgrTxNQ9gfD59dw/view?usp=drive_link&resourcekey=0-AK58FpfN-sDfWhWkmqaEmA

Test: Manual
Flag: com.android.launcher3.all_apps_blur
Fix: 413143411
Change-Id: I5da3b7c38ea4f81dec1011b6cc15ad8b591c761b
This commit is contained in:
Andy Wickham committed 2025-05-01 02:25:02 +00:00
1 parent 1ca1bf9c9d
commit 1e2e88a884
6 files changed
+46 -12

No files matched your search

@@ -50,6 +50,7 @@ import android.os.UserManager;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.ContextThemeWrapper;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -857,13 +858,13 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
}
/** Refresh the UI according to the current theme. */
public void onThemeChanged() {
public void onThemeChanged(ContextThemeWrapper contextThemeWrapper) {
updateHeaderScroll(getActiveRecyclerView().computeVerticalScrollOffset());
invalidateHeader();
forAllRecyclerViews(RecyclerView::invalidateItemDecorations);
getSearchUiManager().onThemeChanged();
getFloatingHeaderView().getTabLayout().updateTheme();
mBottomSheetHandle.setBackground(getContext().getDrawable(
getFloatingHeaderView().updateTheme(contextThemeWrapper);
mBottomSheetHandle.setBackground(contextThemeWrapper.getDrawable(
R.drawable.bg_rounded_corner_bottom_sheet_handle));
}