Converting PopupContainerWithArrow into a base class so that it is easier

to create other types of popup

Bug: 67585158
Change-Id: I966ae7bb90f941951b26feaf71b3ea30c3f3c0cc
This commit is contained in:
Sunny Goyal
2017-10-09 14:56:21 -07:00
parent 271e219ea3
commit 10a1bd0e65
9 changed files with 701 additions and 512 deletions

View File

@@ -37,6 +37,7 @@ import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.anim.PropertyListBuilder;
import com.android.launcher3.anim.PropertyResetListener;
import com.android.launcher3.popup.BaseActionPopup;
import com.android.launcher3.popup.PopupContainerWithArrow;
import java.util.ArrayList;
@@ -193,16 +194,17 @@ public class NotificationFooterLayout extends FrameLayout {
private void removeViewFromIconRow(View child) {
mIconRow.removeView(child);
mNotifications.remove((NotificationInfo) child.getTag());
mNotifications.remove(child.getTag());
updateOverflowEllipsisVisibility();
if (mIconRow.getChildCount() == 0) {
// There are no more icons in the footer, so hide it.
PopupContainerWithArrow popup = PopupContainerWithArrow.getOpen(
BaseActionPopup popup = BaseActionPopup.getOpen(
Launcher.getLauncher(getContext()));
if (popup != null) {
if (popup instanceof PopupContainerWithArrow) {
final int newHeight = getResources().getDimensionPixelSize(
R.dimen.notification_empty_footer_height);
Animator collapseFooter = popup.reduceNotificationViewHeight(getHeight() - newHeight,
Animator collapseFooter = ((PopupContainerWithArrow) popup)
.reduceNotificationViewHeight(getHeight() - newHeight,
getResources().getInteger(R.integer.config_removeNotificationViewDuration));
collapseFooter.addListener(new AnimatorListenerAdapter() {
@Override