Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1247e75b authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Hide footer in place instead of scrolling it offscreen" into sc-dev am: 01d373ce

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14391006

Change-Id: Iae3be3985aca1f76597f4e3cf71cc15ba1d2d267
parents b58db722 01d373ce
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -400,10 +400,14 @@ public class StackScrollAlgorithm {
        }

        if (view instanceof FooterView) {
            viewState.yTranslation = Math.min(viewState.yTranslation,
                    ambientState.getStackHeight());
            // Hide footer if shelf is showing
            viewState.hidden = algorithmState.firstViewInShelf != null;
            final boolean isShelfShowing = algorithmState.firstViewInShelf != null;

            final float footerEnd = viewState.yTranslation + view.getIntrinsicHeight();
            final boolean noSpaceForFooter = footerEnd > ambientState.getStackHeight();

            viewState.hidden = isShelfShowing
                    || (!ambientState.isExpansionChanging() && noSpaceForFooter);

        } else if (view != ambientState.getTrackedHeadsUpRow()) {
            if (ambientState.isExpansionChanging()) {
                // Show all views. Views below the shelf will later be clipped (essentially hidden)