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

Commit c7081f37 authored by Jay Aliomer's avatar Jay Aliomer Committed by Automerger Merge Worker
Browse files

Merge "Animate notification shade footer" into sc-dev am: adc3f0b6

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

Change-Id: If489547502e129a37e6136172d17d35d9e3a55c3
parents a1595fc5 adc3f0b6
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -115,13 +115,18 @@ public class FooterView extends StackScrollerDecorView {
    }

    public class FooterViewState extends ExpandableViewState {
        /**
         * used to hide the content of the footer to animate.
         * #hide is applied without animation, but #hideContent has animation.
         */
        public boolean hideContent;

        @Override
        public void applyToView(View view) {
            super.applyToView(view);
            if (view instanceof FooterView) {
                FooterView footerView = (FooterView) view;
                boolean visible = this.clipTopAmount < mClearAllTopPadding;
                footerView.setContentVisible(visible && footerView.isVisible());
                footerView.setContentVisible(!hideContent);
            }
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -411,8 +411,8 @@ public class StackScrollAlgorithm {
            final float footerEnd = algorithmState.mCurrentExpandedYPosition
                    + view.getIntrinsicHeight();
            final boolean noSpaceForFooter = footerEnd > ambientState.getStackEndHeight();

            viewState.hidden = shadeClosed || isShelfShowing || noSpaceForFooter;
            ((FooterView.FooterViewState) viewState).hideContent =
                    shadeClosed || isShelfShowing || noSpaceForFooter;

        } else if (view != ambientState.getTrackedHeadsUpRow()) {
            if (ambientState.isExpansionChanging()) {