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

Commit 08a79197 authored by Jason Monk's avatar Jason Monk
Browse files

QS: Tweak animation paths when few icons

Avoid having them clip off the panel

Change-Id: Ie4a96893899d86a8c455a750794be073342dabcc
Fixes: 30530062
parent 41e185e7
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -233,10 +233,14 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
                    .addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1)
                    .addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
            mAllViews.add(mQsPanel.getFooter().getView());
            Path path = new Path();
            path.moveTo(0, 0);
            path.cubicTo(0, 0, 0, 1, 1, 1);
            PathInterpolatorBuilder interpolatorBuilder = new PathInterpolatorBuilder(0, 0, 0, 1);
            float px = 0;
            float py = 1;
            if (tiles.size() <= 3) {
                px = 1;
            } else if (tiles.size() <= 6) {
                px = .4f;
            }
            PathInterpolatorBuilder interpolatorBuilder = new PathInterpolatorBuilder(0, 0, px, py);
            translationXBuilder.setInterpolator(interpolatorBuilder.getXInterpolator());
            translationYBuilder.setInterpolator(interpolatorBuilder.getYInterpolator());
            mTranslationXAnimator = translationXBuilder.build();