Merge "Update alignment for gear / snooze icons to shift when expanded" into oc-dr1-dev

This commit is contained in:
TreeHugger Robot
2017-07-20 20:13:30 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -1973,6 +1973,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
if (mGuts != null) { if (mGuts != null) {
mGuts.setActualHeight(height); mGuts.setActualHeight(height);
} }
if (mMenuRow.getMenuView() != null) {
mMenuRow.onHeightUpdate();
}
} }
@Override @Override

View File

@@ -431,7 +431,7 @@ public class NotificationMenuRow implements NotificationMenuRowPlugin, View.OnCl
if (mParent == null || mMenuItems.size() == 0 || mMenuContainer == null) { if (mParent == null || mMenuItems.size() == 0 || mMenuContainer == null) {
return; return;
} }
int parentHeight = mParent.getCollapsedHeight(); int parentHeight = mParent.getActualHeight();
float translationY; float translationY;
if (parentHeight < mVertSpaceForIcons) { if (parentHeight < mVertSpaceForIcons) {
translationY = (parentHeight / 2) - (mHorizSpaceForIcon / 2); translationY = (parentHeight / 2) - (mHorizSpaceForIcon / 2);