am 027f66c8: am b232383f: Fixing issue where newly added shortcuts were not being animated in (Bug. 11023745)
* commit '027f66c838e5ea093309c1a62cc878e21c763284': Fixing issue where newly added shortcuts were not being animated in (Bug. 11023745)
This commit is contained in:
@@ -3745,20 +3745,24 @@ public class Launcher extends Activity
|
|||||||
if (newShortcutsScreenId > -1) {
|
if (newShortcutsScreenId > -1) {
|
||||||
long currentScreenId = mWorkspace.getScreenIdForPageIndex(mWorkspace.getNextPage());
|
long currentScreenId = mWorkspace.getScreenIdForPageIndex(mWorkspace.getNextPage());
|
||||||
final int newScreenIndex = mWorkspace.getPageIndexForScreenId(newShortcutsScreenId);
|
final int newScreenIndex = mWorkspace.getPageIndexForScreenId(newShortcutsScreenId);
|
||||||
|
final Runnable startBounceAnimRunnable = new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
anim.playTogether(bounceAnims);
|
||||||
|
anim.start();
|
||||||
|
}
|
||||||
|
};
|
||||||
if (newShortcutsScreenId != currentScreenId) {
|
if (newShortcutsScreenId != currentScreenId) {
|
||||||
// We post the animation slightly delayed to prevent slowdowns
|
// We post the animation slightly delayed to prevent slowdowns
|
||||||
// when we are loading right after we return to launcher.
|
// when we are loading right after we return to launcher.
|
||||||
mWorkspace.postDelayed(new Runnable() {
|
mWorkspace.postDelayed(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
mWorkspace.snapToPage(newScreenIndex);
|
mWorkspace.snapToPage(newScreenIndex);
|
||||||
mWorkspace.postDelayed(new Runnable() {
|
mWorkspace.postDelayed(startBounceAnimRunnable,
|
||||||
public void run() {
|
NEW_APPS_ANIMATION_DELAY);
|
||||||
anim.playTogether(bounceAnims);
|
|
||||||
anim.start();
|
|
||||||
}
|
|
||||||
}, NEW_APPS_ANIMATION_DELAY);
|
|
||||||
}
|
}
|
||||||
}, NEW_APPS_PAGE_MOVE_DELAY);
|
}, NEW_APPS_PAGE_MOVE_DELAY);
|
||||||
|
} else {
|
||||||
|
mWorkspace.postDelayed(startBounceAnimRunnable, NEW_APPS_ANIMATION_DELAY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user