diff options
author | Michael Jurka <mikejurka@google.com> | 2011-05-05 15:05:07 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-05-05 15:13:11 -0700 |
commit | b9b8ce94ff958792dd6ef81b0e50784fe8ad98a6 (patch) | |
tree | e2d585e5aa07afacbc0878d916a3909628291ab5 /src | |
parent | fd6e4511b0b44c29e7718a474f71715dab8de4ce (diff) | |
download | android_packages_apps_Trebuchet-b9b8ce94ff958792dd6ef81b0e50784fe8ad98a6.tar.gz android_packages_apps_Trebuchet-b9b8ce94ff958792dd6ef81b0e50784fe8ad98a6.tar.bz2 android_packages_apps_Trebuchet-b9b8ce94ff958792dd6ef81b0e50784fe8ad98a6.zip |
Fix: restoring holo outlines in paged views on tablet
Change-Id: Ifb319731f76c8154e2dff5336641862b7427d836
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/AllAppsPagedView.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher2/CellLayoutChildren.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher2/CustomizePagedView.java | 3 | ||||
-rw-r--r-- | src/com/android/launcher2/PagedViewIcon.java | 9 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 1 |
6 files changed, 9 insertions, 13 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java index 7af5392e6..1c4b9dbdb 100644 --- a/src/com/android/launcher2/AllAppsPagedView.java +++ b/src/com/android/launcher2/AllAppsPagedView.java @@ -556,7 +556,8 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All final int index = i - startIndex; final ApplicationInfo info = mFilteredApps.get(i); PagedViewIcon icon = (PagedViewIcon) layout.getChildOnPageAt(index); - icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1)); + icon.applyFromApplicationInfo( + info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1)); PagedViewCellLayout.LayoutParams params = (PagedViewCellLayout.LayoutParams) icon.getLayoutParams(); diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index 2bd2e91bd..d0e96c6e4 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -503,7 +503,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen ApplicationInfo info = mApps.get(i); PagedViewIcon icon = (PagedViewIcon) mLayoutInflater.inflate( R.layout.apps_customize_application, layout, false); - icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1)); + icon.applyFromApplicationInfo( + info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1)); icon.setOnClickListener(this); icon.setOnLongClickListener(this); icon.setOnTouchListener(this); diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java index eea38f142..f9adce0c3 100644 --- a/src/com/android/launcher2/CellLayoutChildren.java +++ b/src/com/android/launcher2/CellLayoutChildren.java @@ -16,12 +16,9 @@ package com.android.launcher2; -import java.util.ArrayList; - import android.app.WallpaperManager; import android.content.Context; import android.graphics.Rect; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java index ca60361b3..7bcfaadb2 100644 --- a/src/com/android/launcher2/CustomizePagedView.java +++ b/src/com/android/launcher2/CustomizePagedView.java @@ -1078,7 +1078,8 @@ public class CustomizePagedView extends PagedViewWithDraggableItems final ApplicationInfo info = mApps.get(i); PagedViewIcon icon = (PagedViewIcon) mInflater.inflate( R.layout.all_apps_paged_view_application, layout, false); - icon.applyFromApplicationInfo(info, mPageViewIconCache, true, (numPages > 1)); + icon.applyFromApplicationInfo( + info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1)); icon.setOnClickListener(this); icon.setOnTouchListener(this); icon.setOnLongClickListener(this); diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java index 95bb72f49..d9852adcf 100644 --- a/src/com/android/launcher2/PagedViewIcon.java +++ b/src/com/android/launcher2/PagedViewIcon.java @@ -33,7 +33,6 @@ import android.os.Message; import android.util.AttributeSet; import android.view.KeyEvent; import android.widget.Checkable; -import android.widget.TextView; @@ -57,7 +56,6 @@ public class PagedViewIcon extends CachedTextView implements Checkable { private int mAlpha = 255; private int mHolographicAlpha; - private boolean mHolographicEffectsEnabled; private boolean mIsChecked; private ObjectAnimator mCheckedAlphaAnimator; private float mCheckedAlpha = 1.0f; @@ -133,7 +131,6 @@ public class PagedViewIcon extends CachedTextView implements Checkable { } mHolographicOutlineView = new HolographicPagedViewIcon(context, this); - mHolographicEffectsEnabled = isHardwareAccelerated(); } protected HolographicPagedViewIcon getHolographicOutlineView() { @@ -166,7 +163,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable { mIconCache = cache; mIconCacheKey = new PagedViewIconCache.Key(info); mHolographicOutline = mIconCache.getOutline(mIconCacheKey); - if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) { + if (!queueHolographicOutlineCreation()) { getHolographicOutlineView().invalidate(); } } @@ -184,7 +181,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable { mIconCache = cache; mIconCacheKey = new PagedViewIconCache.Key(info); mHolographicOutline = mIconCache.getOutline(mIconCacheKey); - if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) { + if (!queueHolographicOutlineCreation()) { getHolographicOutlineView().invalidate(); } } @@ -220,7 +217,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable { // draw any blended overlays if (mCheckedOutline == null) { - if (mHolographicEffectsEnabled && mHolographicOutline != null + if (canvas.isHardwareAccelerated() && mHolographicOutline != null && mHolographicAlpha > 0) { mPaint.setAlpha(mHolographicAlpha); overlay = mHolographicOutline; diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 8a2009cb7..d394016f3 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -155,7 +155,6 @@ public class Workspace extends SmoothPagedView private int[] mTempCell = new int[2]; private int[] mTempEstimate = new int[2]; private float[] mDragViewVisualCenter = new float[2]; - private float[] mTempOriginXY = new float[2]; private float[] mTempDragCoordinates = new float[2]; private float[] mTempTouchCoordinates = new float[2]; private float[] mTempCellLayoutCenterCoordinates = new float[2]; |