diff options
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 07f3045a5..f9255e6bd 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -49,7 +49,15 @@ public class BubbleTextView extends TextView { private static final int SHADOW_SMALL_COLOUR = 0xCC000000; static final float PADDING_V = 3.0f; - private HolographicOutlineHelper mOutlineHelper; + + private final Drawable mBackground; + private final CheckLongPressHelper mLongPressHelper; + private final HolographicOutlineHelper mOutlineHelper; + + // TODO: Remove custom background handling code, as no instance of BubbleTextView use any + // background. + private boolean mBackgroundSizeChanged; + private Bitmap mPressedBackground; private float mSlop; @@ -58,14 +66,8 @@ public class BubbleTextView extends TextView { private final boolean mCustomShadowsEnabled; private boolean mIsTextVisible; - // TODO: Remove custom background handling code, as no instance of BubbleTextView use any - // background. - private boolean mBackgroundSizeChanged; - private final Drawable mBackground; - private boolean mStayPressed; private boolean mIgnorePressedStateChange; - private CheckLongPressHelper mLongPressHelper; public BubbleTextView(Context context) { this(context, null, 0); @@ -90,7 +92,14 @@ public class BubbleTextView extends TextView { } else { mBackground = null; } - init(); + mLongPressHelper = new CheckLongPressHelper(this); + + mOutlineHelper = HolographicOutlineHelper.obtain(getContext()); + if (mCustomShadowsEnabled) { + setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR); + } + + setAccessibilityDelegate(LauncherAppState.getInstance().getAccessibilityDelegate()); } public void onFinishInflate() { @@ -102,15 +111,6 @@ public class BubbleTextView extends TextView { setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.iconTextSizePx); } - private void init() { - mLongPressHelper = new CheckLongPressHelper(this); - - mOutlineHelper = HolographicOutlineHelper.obtain(getContext()); - if (mCustomShadowsEnabled) { - setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR); - } - } - public void applyFromShortcutInfo(ShortcutInfo info, IconCache iconCache, boolean setDefaultPadding) { applyFromShortcutInfo(info, iconCache, setDefaultPadding, false); @@ -328,7 +328,7 @@ public class BubbleTextView extends TextView { Drawable top = getCompoundDrawables()[1]; if (top instanceof PreloadIconDrawable) { - ((PreloadIconDrawable) top).applyTheme(getPreloaderTheme()); + ((PreloadIconDrawable) top).applyPreloaderTheme(getPreloaderTheme()); } mSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop(); } |