summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2012-06-08 15:30:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-06-08 15:30:48 -0700
commitf75a2cf06c67ec376c435ff0c88785de6dd2d822 (patch)
tree4edfa29da93cd71ae10111c39778fd203d54fb76
parent001a17fcf5b825801bc9987cebab9411ce329f9d (diff)
parent8ec2303379eb467e063113385c9514063abed787 (diff)
downloadandroid_packages_apps_Trebuchet-f75a2cf06c67ec376c435ff0c88785de6dd2d822.zip
android_packages_apps_Trebuchet-f75a2cf06c67ec376c435ff0c88785de6dd2d822.tar.gz
android_packages_apps_Trebuchet-f75a2cf06c67ec376c435ff0c88785de6dd2d822.tar.bz2
am 8ec23033: Fix subtle folder jank related to previous change
* commit '8ec2303379eb467e063113385c9514063abed787': Fix subtle folder jank related to previous change
-rw-r--r--src/com/android/launcher2/Launcher.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 7da5b56..63af10a 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2062,24 +2062,29 @@ public final class Launcher extends Activity
lp.customPosition = true;
lp.x = mRectForFolderAnimation.left;
lp.y = mRectForFolderAnimation.top;
+ lp.width = width;
+ lp.height = height;
mFolderIconCanvas.drawColor(0, PorterDuff.Mode.CLEAR);
fi.draw(mFolderIconCanvas);
mFolderIconImageView.setImageBitmap(mFolderIconBitmap);
- mFolderIconImageView.setPivotX(fi.mFolder.getPivotXForIconAnimation());
- mFolderIconImageView.setPivotY(fi.mFolder.getPivotYForIconAnimation());
-
+ if (fi.mFolder != null) {
+ mFolderIconImageView.setPivotX(fi.mFolder.getPivotXForIconAnimation());
+ mFolderIconImageView.setPivotY(fi.mFolder.getPivotYForIconAnimation());
+ }
// Just in case this image view is still in the drag layer from a previous animation,
// we remove it and re-add it.
if (mDragLayer.indexOfChild(mFolderIconImageView) != -1) {
mDragLayer.removeView(mFolderIconImageView);
}
mDragLayer.addView(mFolderIconImageView, lp);
+ if (fi.mFolder != null) {
+ fi.mFolder.bringToFront();
+ }
}
private void growAndFadeOutFolderIcon(FolderIcon fi) {
if (fi == null) return;
-
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 0);
PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat("scaleX", 1.5f);
PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat("scaleY", 1.5f);
@@ -2103,7 +2108,6 @@ public final class Launcher extends Activity
private void shrinkAndFadeInFolderIcon(final FolderIcon fi) {
if (fi == null) return;
-
PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 1.0f);
PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat("scaleX", 1.0f);
PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat("scaleY", 1.0f);
@@ -2113,7 +2117,6 @@ public final class Launcher extends Activity
// We remove and re-draw the FolderIcon in-case it has changed
mDragLayer.removeView(mFolderIconImageView);
copyFolderIconToImage(fi);
-
ObjectAnimator oa = ObjectAnimator.ofPropertyValuesHolder(mFolderIconImageView, alpha,
scaleX, scaleY);
oa.setDuration(getResources().getInteger(R.integer.config_folderAnimDuration));