From 16fed41e5e680c547b23e108788eb85f1b04d36d Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Fri, 1 Oct 2010 16:12:03 -0700 Subject: - getting rid of "dimmed" effect for icons and widgets - re-enabling drawing cache for icons and widgets --- res/layout-xlarge-land/application.xml | 2 +- res/layout-xlarge-port/application.xml | 4 ++-- .../android/launcher2/LauncherAppWidgetHost.java | 6 +----- src/com/android/launcher2/Workspace.java | 21 ++++----------------- 4 files changed, 8 insertions(+), 25 deletions(-) diff --git a/res/layout-xlarge-land/application.xml b/res/layout-xlarge-land/application.xml index d0c8d9bf6..ed8fa8ccc 100644 --- a/res/layout-xlarge-land/application.xml +++ b/res/layout-xlarge-land/application.xml @@ -14,5 +14,5 @@ limitations under the License. --> - \ No newline at end of file diff --git a/res/layout-xlarge-port/application.xml b/res/layout-xlarge-port/application.xml index ec6697658..af7a8a4df 100644 --- a/res/layout-xlarge-port/application.xml +++ b/res/layout-xlarge-port/application.xml @@ -14,5 +14,5 @@ limitations under the License. --> - + diff --git a/src/com/android/launcher2/LauncherAppWidgetHost.java b/src/com/android/launcher2/LauncherAppWidgetHost.java index 9352ec218..46e66e7ac 100644 --- a/src/com/android/launcher2/LauncherAppWidgetHost.java +++ b/src/com/android/launcher2/LauncherAppWidgetHost.java @@ -34,10 +34,6 @@ public class LauncherAppWidgetHost extends AppWidgetHost { @Override protected AppWidgetHostView onCreateView(Context context, int appWidgetId, AppWidgetProviderInfo appWidget) { - if (LauncherApplication.isScreenXLarge()) { - return new DimmableAppWidgetHostView(context); - } else { - return new LauncherAppWidgetHostView(context); - } + return new LauncherAppWidgetHostView(context); } } diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index d80edae8f..eeb496dee 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -392,26 +392,17 @@ public class Workspace extends SmoothPagedView protected void pageBeginMoving() { if (mNextPage != INVALID_PAGE) { // we're snapping to a particular screen - // there's an issue where the alpha of neighboring pages doesn't get updated - // if drawing cache is enabled on children-- we only use that on xlarge devices, - // so disable drawing cache in those cases - if (!LauncherApplication.isScreenXLarge()) { - enableChildrenCache(mCurrentPage, mNextPage); - } + enableChildrenCache(mCurrentPage, mNextPage); } else { // this is when user is actively dragging a particular screen, they might // swipe it either left or right (but we won't advance by more than one screen) - if (!LauncherApplication.isScreenXLarge()) { - enableChildrenCache(mCurrentPage - 1, mCurrentPage + 1); - } + enableChildrenCache(mCurrentPage - 1, mCurrentPage + 1); } showOutlines(); } protected void pageEndMoving() { - if (!LauncherApplication.isScreenXLarge()) { - clearChildrenCache(); - } + clearChildrenCache(); hideOutlines(); } @@ -754,8 +745,7 @@ public class Workspace extends SmoothPagedView new PropertyValuesHolder("scaleX", SHRINK_FACTOR * rotationScaleX), new PropertyValuesHolder("scaleY", SHRINK_FACTOR * rotationScaleY), new PropertyValuesHolder("backgroundAlpha", 1.0f), - new PropertyValuesHolder("dimmableProgress", 1.0f), - new PropertyValuesHolder("alpha", 0.0f), + new PropertyValuesHolder("alpha", 1.0f), new PropertyValuesHolder("rotationY", rotation)).start(); } else { cl.setX((int)newX); @@ -763,7 +753,6 @@ public class Workspace extends SmoothPagedView cl.setScaleX(SHRINK_FACTOR * rotationScaleX); cl.setScaleY(SHRINK_FACTOR * rotationScaleY); cl.setBackgroundAlpha(1.0f); - cl.setDimmableProgress(1.0f); cl.setAlpha(0.0f); cl.setRotationY(rotation); } @@ -832,7 +821,6 @@ public class Workspace extends SmoothPagedView new ObjectAnimator(duration, cl, "scaleY", 1.0f), new ObjectAnimator(duration, cl, "backgroundAlpha", 0.0f), new ObjectAnimator(duration, cl, "alpha", finalAlphaValue), - new ObjectAnimator(duration, cl, "dimmableProgress", 0.0f), new ObjectAnimator(duration, cl, "rotationY", rotation)); } else { cl.setTranslationX(0.0f); @@ -840,7 +828,6 @@ public class Workspace extends SmoothPagedView cl.setScaleX(1.0f); cl.setScaleY(1.0f); cl.setBackgroundAlpha(0.0f); - cl.setDimmableProgress(0.0f); cl.setAlpha(finalAlphaValue); cl.setRotationY(rotation); } -- cgit v1.2.3