diff options
author | Winson Chung <winsonc@google.com> | 2015-03-10 16:28:47 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2015-03-12 18:57:02 -0700 |
commit | 93f98eaf1800024cb2f28379bdd997f3debae63a (patch) | |
tree | 5b9efef68c1b651ec13b69ede29bb20bd67cb64f /src/com/android/launcher3/BubbleTextView.java | |
parent | 74081b02730bb7205f5cfe43f206039df38a20db (diff) | |
download | android_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.tar.gz android_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.tar.bz2 android_packages_apps_Trebuchet-93f98eaf1800024cb2f28379bdd997f3debae63a.zip |
Adding app grid layout with fastscroller.
- Adding filtering and using alphabetic index for app grouping.
Change-Id: I745b644fa8f90f5ff24a8642ac377ef1c65d8aff
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 5ea84aeb2..fabae5702 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -63,6 +63,7 @@ public class BubbleTextView extends TextView { private float mSlop; + private final boolean mDeferShadowGenerationOnTouch; private final boolean mCustomShadowsEnabled; private final boolean mLayoutHorizontal; private final int mIconSize; @@ -96,6 +97,8 @@ public class BubbleTextView extends TextView { grid.iconDrawablePaddingPx); mTextSize = a.getDimensionPixelSize(R.styleable.BubbleTextView_textSizeOverride, grid.allAppsIconTextSizePx); + mDeferShadowGenerationOnTouch = + a.getBoolean(R.styleable.BubbleTextView_deferShadowGeneration, false); a.recycle(); if (mCustomShadowsEnabled) { @@ -218,7 +221,7 @@ public class BubbleTextView extends TextView { // So that the pressed outline is visible immediately on setStayPressed(), // we pre-create it on ACTION_DOWN (it takes a small but perceptible amount of time // to create it) - if (mPressedBackground == null) { + if (!mDeferShadowGenerationOnTouch && mPressedBackground == null) { mPressedBackground = mOutlineHelper.createMediumDropShadow(this); } @@ -247,6 +250,10 @@ public class BubbleTextView extends TextView { mStayPressed = stayPressed; if (!stayPressed) { mPressedBackground = null; + } else { + if (mPressedBackground == null) { + mPressedBackground = mOutlineHelper.createMediumDropShadow(this); + } } // Only show the shadow effect when persistent pressed state is set. |