Before we were only clipping it to the bottom on the shelf,
but if we're already fully in the shelf (and made visible again
by another clause) then we still need to clip to the top.
Test: manual, observe normal clipping for last item
Change-Id: Ie1bc7afb78534bd89d771808eba8e02251d3a3cc
Fixes:
63264213
boolean aboveShelf = ViewState.getFinalTranslationZ(row) > baseZHeight;
boolean isLastChild = child == lastChild;
float rowTranslationY = row.getTranslationY();
- if (isLastChild || aboveShelf || backgroundForceHidden) {
+ if ((isLastChild && !child.isInShelf()) || aboveShelf || backgroundForceHidden) {
notificationClipEnd = shelfStart + getIntrinsicHeight();
} else {
notificationClipEnd = shelfStart - mPaddingBetweenElements;