Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +10 −3 Original line number Diff line number Diff line Loading @@ -1421,7 +1421,8 @@ public class NotificationStackScrollLayout extends ViewGroup */ private int targetScrollForView(ExpandableView v, int positionInLinearLayout) { return positionInLinearLayout + v.getIntrinsicHeight() + getImeInset() - getHeight() + getTopPadding(); getImeInset() - getHeight() + ((!isExpanded() && isPinnedHeadsUp(v)) ? mHeadsUpInset : getTopPadding()); } @Override Loading Loading @@ -2052,9 +2053,15 @@ public class NotificationStackScrollLayout extends ViewGroup } private int getScrollRange() { int scrollRange = Math.max(0, mContentHeight - mMaxLayoutHeight); // In current design, it only use the top HUN to treat all of HUNs // although there are more than one HUNs int contentHeight = mContentHeight; if (!isExpanded() && mHeadsUpManager.hasPinnedHeadsUp()) { contentHeight = mHeadsUpInset + getTopHeadsUpPinnedHeight(); } int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight); int imeInset = getImeInset(); scrollRange += Math.min(imeInset, Math.max(0, mContentHeight - (getHeight() - imeInset))); scrollRange += Math.min(imeInset, Math.max(0, contentHeight - (getHeight() - imeInset))); return scrollRange; } Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +9 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,15 @@ public class StackScrollAlgorithm { childState.yTranslation = topState.yTranslation + topState.height - childState.height; } // heads up notification show and this row is the top entry of heads up // notifications. i.e. this row should be the only one row that has input field // To check if the row need to do translation according to scroll Y // heads up show full of row's content and any scroll y indicate that the // translationY need to move up the HUN. if (!mIsExpanded && isTopEntry && ambientState.getScrollY() > 0) { childState.yTranslation -= ambientState.getScrollY(); } } if (row.isHeadsUpAnimatingAway()) { childState.hidden = false; Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +10 −3 Original line number Diff line number Diff line Loading @@ -1421,7 +1421,8 @@ public class NotificationStackScrollLayout extends ViewGroup */ private int targetScrollForView(ExpandableView v, int positionInLinearLayout) { return positionInLinearLayout + v.getIntrinsicHeight() + getImeInset() - getHeight() + getTopPadding(); getImeInset() - getHeight() + ((!isExpanded() && isPinnedHeadsUp(v)) ? mHeadsUpInset : getTopPadding()); } @Override Loading Loading @@ -2052,9 +2053,15 @@ public class NotificationStackScrollLayout extends ViewGroup } private int getScrollRange() { int scrollRange = Math.max(0, mContentHeight - mMaxLayoutHeight); // In current design, it only use the top HUN to treat all of HUNs // although there are more than one HUNs int contentHeight = mContentHeight; if (!isExpanded() && mHeadsUpManager.hasPinnedHeadsUp()) { contentHeight = mHeadsUpInset + getTopHeadsUpPinnedHeight(); } int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight); int imeInset = getImeInset(); scrollRange += Math.min(imeInset, Math.max(0, mContentHeight - (getHeight() - imeInset))); scrollRange += Math.min(imeInset, Math.max(0, contentHeight - (getHeight() - imeInset))); return scrollRange; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollAlgorithm.java +9 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,15 @@ public class StackScrollAlgorithm { childState.yTranslation = topState.yTranslation + topState.height - childState.height; } // heads up notification show and this row is the top entry of heads up // notifications. i.e. this row should be the only one row that has input field // To check if the row need to do translation according to scroll Y // heads up show full of row's content and any scroll y indicate that the // translationY need to move up the HUN. if (!mIsExpanded && isTopEntry && ambientState.getScrollY() > 0) { childState.yTranslation -= ambientState.getScrollY(); } } if (row.isHeadsUpAnimatingAway()) { childState.hidden = false; Loading