Simplifying app icon popup
> Using a single linearLayout instead of multiple nested views
> Using clipToOutline for rounded corners instead of using canvas.saveLayer
> Removing nested view elevations and overdraw
> Using LayoutTransition for animating layout changes, instead of manually creating animators
Change-Id: I8e57092f52ca5a032a2756594fdd39788acc5a0d
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index fa4a1c8..dee44aa 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -118,7 +118,6 @@
import com.android.launcher3.model.ModelWriter;
import com.android.launcher3.notification.NotificationListener;
import com.android.launcher3.pageindicators.PageIndicator;
-import com.android.launcher3.popup.BaseActionPopup;
import com.android.launcher3.popup.PopupContainerWithArrow;
import com.android.launcher3.popup.PopupDataProvider;
import com.android.launcher3.shortcuts.DeepShortcutManager;
@@ -1257,9 +1256,9 @@
mWorkspace.updateIconBadges(updatedBadges);
mAppsView.updateIconBadges(updatedBadges);
- BaseActionPopup popup = BaseActionPopup.getOpen(Launcher.this);
- if (popup instanceof PopupContainerWithArrow) {
- ((PopupContainerWithArrow) popup).updateNotificationHeader(updatedBadges);
+ PopupContainerWithArrow popup = PopupContainerWithArrow.getOpen(Launcher.this);
+ if (popup != null) {
+ popup.updateNotificationHeader(updatedBadges);
}
}
};
@@ -3178,7 +3177,7 @@
&& mAccessibilityDelegate.performAction(focusedView,
(ItemInfo) focusedView.getTag(),
LauncherAccessibilityDelegate.DEEP_SHORTCUTS)) {
- BaseActionPopup.getOpen(this).requestFocus();
+ PopupContainerWithArrow.getOpen(this).requestFocus();
return true;
}
break;