summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Launcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/Launcher.java')
-rw-r--r--src/com/android/launcher3/Launcher.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index d668d2a74..df856c1b6 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -465,7 +465,11 @@ public class Launcher extends Activity
} else {
// We only load the page synchronously if the user rotates (or triggers a
// configuration change) while launcher is in the foreground
- mModel.startLoader(mWorkspace.getRestorePage());
+ if (!mModel.startLoader(mWorkspace.getRestorePage())) {
+ // If we are not binding synchronously, show a fade in animation when
+ // the first page bind completes.
+ mDragLayer.setAlpha(0);
+ }
}
}
@@ -4003,6 +4007,32 @@ public class Launcher extends Activity
}
}
+ @Override
+ public void finishFirstPageBind(final ViewOnDrawExecutor executor) {
+ Runnable r = new Runnable() {
+ public void run() {
+ finishFirstPageBind(executor);
+ }
+ };
+ if (waitUntilResume(r)) {
+ return;
+ }
+
+ Runnable onComplete = new Runnable() {
+ @Override
+ public void run() {
+ if (executor != null) {
+ executor.onLoadAnimationCompleted();
+ }
+ }
+ };
+ if (mDragLayer.getAlpha() < 1) {
+ mDragLayer.animate().alpha(1).withEndAction(onComplete).start();
+ } else {
+ onComplete.run();
+ }
+ }
+
/**
* Callback saying that there aren't any more items to bind.
*