Adding color back to popup container.

For Color exctraction now occurs in groups:
- System shortcuts
- Deep shortcuts
- Notifications

For home setting popup, each DeepShortcutView will have its own
extracted color.

Bug: 188095443
Test: manual
Change-Id: I7e209f863ff180b8f017aeb2a73c6f1a51842e68
This commit is contained in:
Jon Miranda
2021-06-01 21:26:10 -07:00
committed by Jonathan Miranda
parent 0dfabe0a1e
commit 32ff76cb4e
13 changed files with 300 additions and 45 deletions

View File

@@ -146,13 +146,25 @@ public class OptionsPopupView extends ArrowPopup
view.setOnLongClickListener(popup);
popup.mItemMap.put(view, item);
}
popup.addPreDrawForColorExtraction(launcher);
popup.show();
return popup;
}
@Override
protected List<View> getChildrenForColorExtraction() {
int childCount = getChildCount();
ArrayList<View> children = new ArrayList<>(childCount);
for (int i = 0; i < childCount; ++i) {
children.add(getChildAt(i));
}
return children;
}
@VisibleForTesting
public static ArrowPopup getOptionsPopup(Launcher launcher) {
return launcher.findViewById(R.id.deep_shortcuts_container);
return launcher.findViewById(R.id.popup_container);
}
public static void showDefaultOptions(Launcher launcher, float x, float y) {