Refactor DeepShortcutsContainer to PopupContainerWithArrow

- Also added PopupItemView, which takes animation logic from
  DeepShortcutView, and which DeepShortcutView now extends.
- Renamed ShortcutFilter to PopupPopulator, which has support
  for new item types (not yet used). Also moved populating
  logic (e.g. UpdateShortcutChild Runnable) to PopupPopulator.

Bug: 32410600
Change-Id: Ib6e444ac7ca99c80ba438801c26e62d9542e0ad9
This commit is contained in:
Tony Wickham
2017-01-23 11:47:51 -08:00
parent 43a2f42978
commit 540913eadf
18 changed files with 565 additions and 412 deletions

View File

@@ -32,11 +32,11 @@ import java.lang.annotation.RetentionPolicy;
*/
public abstract class AbstractFloatingView extends LinearLayout {
@IntDef(flag = true, value = {TYPE_FOLDER, TYPE_DEEPSHORTCUT_CONTAINER})
@IntDef(flag = true, value = {TYPE_FOLDER, TYPE_POPUP_CONTAINER_WITH_ARROW})
@Retention(RetentionPolicy.SOURCE)
public @interface FloatingViewType {}
public static final int TYPE_FOLDER = 1 << 0;
public static final int TYPE_DEEPSHORTCUT_CONTAINER = 1 << 1;
public static final int TYPE_POPUP_CONTAINER_WITH_ARROW = 1 << 1;
protected boolean mIsOpen;
@@ -119,6 +119,6 @@ public abstract class AbstractFloatingView extends LinearLayout {
}
public static AbstractFloatingView getTopOpenView(Launcher launcher) {
return getOpenView(launcher, TYPE_FOLDER | TYPE_DEEPSHORTCUT_CONTAINER);
return getOpenView(launcher, TYPE_FOLDER | TYPE_POPUP_CONTAINER_WITH_ARROW);
}
}