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

Commit 5f2c415f authored by Selim Cinek's avatar Selim Cinek Committed by Android (Google) Code Review
Browse files

Merge "Enabled appear and dissappear animations for the overflow card" into mnc-dev

parents d9d52949 2cd45dfb
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -540,9 +540,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView

    private void startAppearAnimation(boolean isAppearing, float translationDirection, long delay,
            long duration, final Runnable onFinishedRunnable) {
        if (mAppearAnimator != null) {
            mAppearAnimator.cancel();
        }
        cancelAppearAnimation();
        mAnimationTranslationY = translationDirection * getActualHeight();
        if (mAppearAnimationFraction == -1.0f) {
            // not initialized yet, we start anew
@@ -613,6 +611,17 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
        mAppearAnimator.start();
    }

    private void cancelAppearAnimation() {
        if (mAppearAnimator != null) {
            mAppearAnimator.cancel();
        }
    }

    public void cancelAppearDrawing() {
        cancelAppearAnimation();
        enableAppearDrawing(false);
    }

    private void updateAppearRect() {
        float inverseFraction = (1.0f - mAppearAnimationFraction);
        float translationFraction = mCurrentAppearInterpolator.getInterpolation(inverseFraction);
+2 −5
Original line number Diff line number Diff line
@@ -1848,11 +1848,8 @@ public abstract class BaseStatusBar extends SystemUI implements
            }
        }

        if (onKeyguard && mKeyguardIconOverflowContainer.getIconsView().getChildCount() > 0) {
            mKeyguardIconOverflowContainer.setVisibility(View.VISIBLE);
        } else {
            mKeyguardIconOverflowContainer.setVisibility(View.GONE);
        }
        mStackScroller.updateOverflowContainerVisibility(onKeyguard
                && mKeyguardIconOverflowContainer.getIconsView().getChildCount() > 0);

        mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 1);
        mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 2);
+9 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public abstract class ExpandableView extends FrameLayout {
    private ArrayList<View> mMatchParentViews = new ArrayList<View>();
    private int mClipTopOptimization;
    private static Rect mClipRect = new Rect();
    private boolean mWillBeGone;

    public ExpandableView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -374,6 +375,14 @@ public abstract class ExpandableView extends FrameLayout {
        updateClipping();
    }

    public boolean willBeGone() {
        return mWillBeGone;
    }

    public void setWillBeGone(boolean willBeGone) {
        mWillBeGone = willBeGone;
    }

    /**
     * A listener notifying when {@link #getActualHeight} changes.
     */
+0 −9
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@ public abstract class StackScrollerDecorView extends ExpandableView {
    protected View mContent;
    private boolean mIsVisible;
    private boolean mAnimating;
    private boolean mWillBeGone;

    public StackScrollerDecorView(Context context, AttributeSet attrs) {
        super(context, attrs);
@@ -134,13 +133,5 @@ public abstract class StackScrollerDecorView extends ExpandableView {
        mContent.animate().cancel();
    }

    public boolean willBeGone() {
        return mWillBeGone;
    }

    public void setWillBeGone(boolean willBeGone) {
        mWillBeGone = willBeGone;
    }

    protected abstract View findContentView();
}
+1 −1
Original line number Diff line number Diff line
@@ -707,7 +707,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
                        R.layout.status_bar_notification_keyguard_overflow, mStackScroller, false);
        mKeyguardIconOverflowContainer.setOnActivatedListener(this);
        mKeyguardIconOverflowContainer.setOnClickListener(mOverflowClickListener);
        mStackScroller.addView(mKeyguardIconOverflowContainer);
        mStackScroller.setOverflowContainer(mKeyguardIconOverflowContainer);

        SpeedBumpView speedBump = (SpeedBumpView) LayoutInflater.from(mContext).inflate(
                        R.layout.status_bar_notification_speed_bump, mStackScroller, false);
Loading