Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +16 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView private static final int COLORED_DIVIDER_ALPHA = 0x7B; private static final int MENU_VIEW_INDEX = 0; public interface LayoutListener { public void onLayout(); } private LayoutListener mLayoutListener; private final NotificationInflater mNotificationInflater; private int mIconTransformContentShift; private int mIconTransformContentShiftNoIcon; Loading Loading @@ -1608,6 +1613,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView mIsSystemChildExpanded = expanded; } public void setLayoutListener(LayoutListener listener) { mLayoutListener = listener; } public void removeListener() { mLayoutListener = null; } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); Loading @@ -1616,6 +1629,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView mMenuRow.onHeightUpdate(); } updateContentShiftHeight(); if (mLayoutListener != null) { mLayoutListener.onLayout(); } } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +10 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,8 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener { public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener, ExpandableNotificationRow.LayoutListener { private static final boolean DEBUG = false; private static final String TAG = "swipe"; Loading Loading @@ -167,13 +168,14 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl @Override public void onConfigurationChanged() { mParent.post(new Runnable() { mParent.setLayoutListener(this); } @Override public void run() { public void onLayout() { mIconsPlaced = false; // Force icons to be re-placed setMenuLocation(); } }); mParent.removeListener(); } private void createMenuViews() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +16 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView private static final int COLORED_DIVIDER_ALPHA = 0x7B; private static final int MENU_VIEW_INDEX = 0; public interface LayoutListener { public void onLayout(); } private LayoutListener mLayoutListener; private final NotificationInflater mNotificationInflater; private int mIconTransformContentShift; private int mIconTransformContentShiftNoIcon; Loading Loading @@ -1608,6 +1613,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView mIsSystemChildExpanded = expanded; } public void setLayoutListener(LayoutListener listener) { mLayoutListener = listener; } public void removeListener() { mLayoutListener = null; } @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); Loading @@ -1616,6 +1629,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView mMenuRow.onHeightUpdate(); } updateContentShiftHeight(); if (mLayoutListener != null) { mLayoutListener.onLayout(); } } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationMenuRow.java +10 −8 Original line number Diff line number Diff line Loading @@ -44,7 +44,8 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener { public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnClickListener, ExpandableNotificationRow.LayoutListener { private static final boolean DEBUG = false; private static final String TAG = "swipe"; Loading Loading @@ -167,13 +168,14 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl @Override public void onConfigurationChanged() { mParent.post(new Runnable() { mParent.setLayoutListener(this); } @Override public void run() { public void onLayout() { mIconsPlaced = false; // Force icons to be re-placed setMenuLocation(); } }); mParent.removeListener(); } private void createMenuViews() { Loading