diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-08-12 17:57:09 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-08-12 17:57:09 +0200 |
commit | ceb28d7a768d45502a02923adf4a766f80d9aa24 (patch) | |
tree | 77daa2ceb1b0b4481f345341097a8adaaa759e19 /src/org/cyanogenmod | |
parent | 96458b6c2cdbcc0c8540b34f5f6abee3ade3a6b7 (diff) | |
download | android_packages_wallpapers_PhotoPhase-ceb28d7a768d45502a02923adf4a766f80d9aa24.tar.gz android_packages_wallpapers_PhotoPhase-ceb28d7a768d45502a02923adf4a766f80d9aa24.tar.bz2 android_packages_wallpapers_PhotoPhase-ceb28d7a768d45502a02923adf4a766f80d9aa24.zip |
Animate the recreation of the frames
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/org/cyanogenmod')
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/widgets/DispositionView.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/widgets/DispositionView.java b/src/org/cyanogenmod/wallpapers/photophase/widgets/DispositionView.java index 9573c70..c8fb33b 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/widgets/DispositionView.java +++ b/src/org/cyanogenmod/wallpapers/photophase/widgets/DispositionView.java @@ -140,14 +140,17 @@ public class DispositionView extends RelativeLayout implements OnLongClickListen * Method that sets the disposition to draw on this view * * @param dispositions The dispositions to draw + * @param cols The number of cols + * @param rows The number of rows */ - public void setDispositions(List<Disposition> dispositions, int cols, int rows) { + public void setDispositions( + List<Disposition> dispositions, int cols, int rows) { mDispositions = dispositions; mCols = cols; mRows = rows; // Remove all the current views and add the new ones - recreateDispositions(); + recreateDispositions(true); mResizeFrame.setVisibility(View.GONE); mChanged = false; } @@ -182,12 +185,14 @@ public class DispositionView extends RelativeLayout implements OnLongClickListen /** * Method that recreates all the dispositions + * + * @param animate If the recreate should be done with an animation */ - private void recreateDispositions() { + private void recreateDispositions(boolean animate) { // Remove all the current views and add the new ones removeAllViews(); for (Disposition disposition : mDispositions) { - createFrame(getLocationFromDisposition(disposition), false); + createFrame(getLocationFromDisposition(disposition), animate); } mOldResizeFrameLocation = null; mTarget = null; @@ -469,7 +474,7 @@ public class DispositionView extends RelativeLayout implements OnLongClickListen // Compute the removed dispositions computeRemovedDispositions(mode); - recreateDispositions(); + recreateDispositions(false); computeNewDispositions(mode); // Finish resize (select the target and create the new dispositions) |