Animate size and position of page indicator when adding/removing page

Change-Id: I85f37a4e0aeb8c3fd0bd8da3b90338d0333a84d5
This commit is contained in:
Tony Wickham
2016-05-31 16:55:01 -07:00
parent d4b28d2e1b
commit 034bc3c01c
2 changed files with 103 additions and 26 deletions
+6 -1
View File
@@ -2050,7 +2050,12 @@ public class Workspace extends PagedView
@Override
public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
if (mPageIndicator instanceof PageIndicatorLine) {
((PageIndicatorLine) mPageIndicator).setShouldAutoHide(mState != State.SPRING_LOADED);
boolean isNewStateSpringLoaded = mState == State.SPRING_LOADED;
((PageIndicatorLine) mPageIndicator).setShouldAutoHide(!isNewStateSpringLoaded);
if (isNewStateSpringLoaded) {
// Show the page indicator at the same time as the rest of the transition.
showPageIndicatorAtCurrentScroll();
}
}
}