From 8245a8685fc9f4802c9fa29a989854b2522fc588 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Tue, 1 Feb 2011 17:53:59 -0800 Subject: Adding hardware layers to All Apps - splitting up the "holo" outlines and the icons into separate views - enabling hardware layers on each of the views --- src/com/android/launcher2/PagedViewIcon.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/com/android/launcher2/PagedViewIcon.java') diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java index 0af7b8aa3..702e227d5 100644 --- a/src/com/android/launcher2/PagedViewIcon.java +++ b/src/com/android/launcher2/PagedViewIcon.java @@ -65,6 +65,8 @@ public class PagedViewIcon extends CachedTextView implements Checkable { private int mHoloBlurColor; private int mHoloOutlineColor; + HolographicPagedViewIcon mHolographicOutlineView; + private static final HandlerThread sWorkerThread = new HandlerThread("pagedviewicon-helper"); static { sWorkerThread.start(); @@ -90,7 +92,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable { public void run() { icon.mHolographicOutline = holographicOutline; icon.mIconCache.addOutline(icon.mIconCacheKey, holographicOutline); - icon.invalidate(); + icon.getHolographicOutlineView().invalidate(); } }); } @@ -127,6 +129,15 @@ public class PagedViewIcon extends CachedTextView implements Checkable { setFocusable(true); setBackgroundDrawable(null); + mHolographicOutlineView = new HolographicPagedViewIcon(context, this); + } + + protected HolographicPagedViewIcon getHolographicOutlineView() { + return mHolographicOutlineView; + } + + protected Bitmap getHolographicOutline() { + return mHolographicOutline; } private void queueHolographicOutlineCreation() { -- cgit v1.2.3