summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BubbleTextView.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-11-08 10:40:34 -0800
committerTony Wickham <twickham@google.com>2016-11-11 10:59:17 -0800
commit6b910a235db74b1965c5f5bb16c7fe44b1dc4cdd (patch)
tree8f0d535e757499437fed6f356714302aae4a62f4 /src/com/android/launcher3/BubbleTextView.java
parentf4a0d1886fe5fcce3a3b722f675832b44f6e31c4 (diff)
downloadandroid_packages_apps_Trebuchet-6b910a235db74b1965c5f5bb16c7fe44b1dc4cdd.tar.gz
android_packages_apps_Trebuchet-6b910a235db74b1965c5f5bb16c7fe44b1dc4cdd.tar.bz2
android_packages_apps_Trebuchet-6b910a235db74b1965c5f5bb16c7fe44b1dc4cdd.zip
Keep disabled FastBitmapDrawables disabled while fast scrolling.
Previously, they were animating to be colored because they were set to have a FAST_SCROLL_UNLHIGHLIGHTED state. Now they retain their disabled color when changing fast scroll states. Specfically, we remove the DISABLED state and instead make it a property of the FastBitmapDrawable. Bug: 32642959 Change-Id: I6cb2da134a550c267eebfc756eff8c91a33f028c
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r--src/com/android/launcher3/BubbleTextView.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index bb4b2cec1..dbb797dc5 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -191,9 +191,7 @@ public class BubbleTextView extends TextView
private void applyIconAndLabel(Bitmap icon, ItemInfo info) {
FastBitmapDrawable iconDrawable = mLauncher.createIconDrawable(icon);
- if (info.isDisabled()) {
- iconDrawable.setState(FastBitmapDrawable.State.DISABLED);
- }
+ iconDrawable.setIsDisabled(info.isDisabled());
setIcon(iconDrawable);
setText(info.title);
if (info.contentDescription != null) {
@@ -262,10 +260,7 @@ public class BubbleTextView extends TextView
private void updateIconState() {
if (mIcon instanceof FastBitmapDrawable) {
FastBitmapDrawable d = (FastBitmapDrawable) mIcon;
- if (getTag() instanceof ItemInfo
- && ((ItemInfo) getTag()).isDisabled()) {
- d.animateState(FastBitmapDrawable.State.DISABLED);
- } else if (isPressed() || mStayPressed) {
+ if (isPressed() || mStayPressed) {
d.animateState(FastBitmapDrawable.State.PRESSED);
} else {
d.animateState(FastBitmapDrawable.State.NORMAL);