summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-10-03 15:22:09 -0700
committerWinson Chung <winsonc@google.com>2013-10-03 16:05:32 -0700
commitb232383fd5b0e8cb36990307d7392499729afa23 (patch)
tree60cf93462ab0e7ed085ee74ccde6e2561b775bb7 /src
parentf0481bf3c9571dd7f6ec734f400706ea6439766c (diff)
downloadandroid_packages_apps_Trebuchet-b232383fd5b0e8cb36990307d7392499729afa23.tar.gz
android_packages_apps_Trebuchet-b232383fd5b0e8cb36990307d7392499729afa23.tar.bz2
android_packages_apps_Trebuchet-b232383fd5b0e8cb36990307d7392499729afa23.zip
Fixing issue where newly added shortcuts were not being animated in (Bug. 11023745)
Change-Id: I63d3a5fb3b41f5fc58ee44db9270772ce8458ee9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/Launcher.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5e10e8b78..681ed24a0 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3745,20 +3745,24 @@ public class Launcher extends Activity
if (newShortcutsScreenId > -1) {
long currentScreenId = mWorkspace.getScreenIdForPageIndex(mWorkspace.getNextPage());
final int newScreenIndex = mWorkspace.getPageIndexForScreenId(newShortcutsScreenId);
+ final Runnable startBounceAnimRunnable = new Runnable() {
+ public void run() {
+ anim.playTogether(bounceAnims);
+ anim.start();
+ }
+ };
if (newShortcutsScreenId != currentScreenId) {
// We post the animation slightly delayed to prevent slowdowns
// when we are loading right after we return to launcher.
mWorkspace.postDelayed(new Runnable() {
public void run() {
mWorkspace.snapToPage(newScreenIndex);
- mWorkspace.postDelayed(new Runnable() {
- public void run() {
- anim.playTogether(bounceAnims);
- anim.start();
- }
- }, NEW_APPS_ANIMATION_DELAY);
+ mWorkspace.postDelayed(startBounceAnimRunnable,
+ NEW_APPS_ANIMATION_DELAY);
}
}, NEW_APPS_PAGE_MOVE_DELAY);
+ } else {
+ mWorkspace.postDelayed(startBounceAnimRunnable, NEW_APPS_ANIMATION_DELAY);
}
}
}