diff options
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 7c7d93e4d..868e3acad 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -45,7 +45,7 @@ public class BubbleTextView extends TextView { private int mPrevAlpha = -1; - private final HolographicOutlineHelper mOutlineHelper = HolographicOutlineHelper.obtain(); + private HolographicOutlineHelper mOutlineHelper; private final Canvas mTempCanvas = new Canvas(); private final Rect mTempRect = new Rect(); private boolean mDidInvalidateForPressedState; @@ -80,6 +80,8 @@ public class BubbleTextView extends TextView { mLongPressHelper = new CheckLongPressHelper(this); mBackground = getBackground(); + mOutlineHelper = HolographicOutlineHelper.obtain(getContext()); + final Resources res = getContext().getResources(); mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor = res.getColor(android.R.color.holo_blue_light); @@ -189,7 +191,7 @@ public class BubbleTextView extends TextView { * Responsibility for the bitmap is transferred to the caller. */ private Bitmap createGlowingOutline(Canvas canvas, int outlineColor, int glowColor) { - final int padding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS; + final int padding = mOutlineHelper.mMaxOuterBlurRadius; final Bitmap b = Bitmap.createBitmap( getWidth() + padding, getHeight() + padding, Bitmap.Config.ARGB_8888); @@ -269,7 +271,7 @@ public class BubbleTextView extends TextView { } int getPressedOrFocusedBackgroundPadding() { - return HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS / 2; + return mOutlineHelper.mMaxOuterBlurRadius / 2; } @Override |