QS: Tweak animation paths when few icons
am: 08a79197da
Change-Id: I102725783d456fe18560e60a2e3371bc16f52065
This commit is contained in:
@@ -233,10 +233,14 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
|
|||||||
.addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1)
|
.addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1)
|
||||||
.addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
|
.addFloat(mQsPanel.getFooter().getView(), "alpha", 0, 1).build();
|
||||||
mAllViews.add(mQsPanel.getFooter().getView());
|
mAllViews.add(mQsPanel.getFooter().getView());
|
||||||
Path path = new Path();
|
float px = 0;
|
||||||
path.moveTo(0, 0);
|
float py = 1;
|
||||||
path.cubicTo(0, 0, 0, 1, 1, 1);
|
if (tiles.size() <= 3) {
|
||||||
PathInterpolatorBuilder interpolatorBuilder = new PathInterpolatorBuilder(0, 0, 0, 1);
|
px = 1;
|
||||||
|
} else if (tiles.size() <= 6) {
|
||||||
|
px = .4f;
|
||||||
|
}
|
||||||
|
PathInterpolatorBuilder interpolatorBuilder = new PathInterpolatorBuilder(0, 0, px, py);
|
||||||
translationXBuilder.setInterpolator(interpolatorBuilder.getXInterpolator());
|
translationXBuilder.setInterpolator(interpolatorBuilder.getXInterpolator());
|
||||||
translationYBuilder.setInterpolator(interpolatorBuilder.getYInterpolator());
|
translationYBuilder.setInterpolator(interpolatorBuilder.getYInterpolator());
|
||||||
mTranslationXAnimator = translationXBuilder.build();
|
mTranslationXAnimator = translationXBuilder.build();
|
||||||
|
|||||||
Reference in New Issue
Block a user