diff options
author | Winson Chung <winsonc@google.com> | 2013-10-14 16:42:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-14 16:42:25 -0700 |
commit | 3eb3b27a58c958aab0b284683d9858e742287efe (patch) | |
tree | 3dc75b2270d9f5e4d7cb709b2b8bd67937862da5 | |
parent | 2cc2e4ab3031e5f21c33d06b0953e4615213cc3f (diff) | |
parent | 540004905a555087e72691aad4479aa52ab5460e (diff) | |
download | android_packages_apps_Trebuchet-3eb3b27a58c958aab0b284683d9858e742287efe.tar.gz android_packages_apps_Trebuchet-3eb3b27a58c958aab0b284683d9858e742287efe.tar.bz2 android_packages_apps_Trebuchet-3eb3b27a58c958aab0b284683d9858e742287efe.zip |
am 54000490: Ensuring that we are calling setCompoundDrawable() instead of using intrinsic bounds. (Bug 11203738)
* commit '540004905a555087e72691aad4479aa52ab5460e':
Ensuring that we are calling setCompoundDrawable() instead of using intrinsic bounds. (Bug 11203738)
-rw-r--r-- | src/com/android/launcher3/BubbleTextView.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Folder.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/PagedViewIcon.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 1 |
4 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index eb65a0a9c..8dab9432a 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -109,7 +109,7 @@ public class BubbleTextView extends TextView { LauncherAppState app = LauncherAppState.getInstance(); DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); - setCompoundDrawablesWithIntrinsicBounds(null, + setCompoundDrawables(null, Utilities.createIconDrawable(b), null, null); setCompoundDrawablePadding((int) ((grid.folderIconSizePx - grid.iconSizePx) / 2f)); setText(info.title); diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index ce2edbed2..69d9a3d4b 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -532,7 +532,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList protected boolean createAndAddShortcut(ShortcutInfo item) { final BubbleTextView textView = (BubbleTextView) mInflater.inflate(R.layout.application, this, false); - textView.setCompoundDrawablesWithIntrinsicBounds(null, + textView.setCompoundDrawables(null, Utilities.createIconDrawable(item.getIcon(mIconCache)), null, null); textView.setText(item.title); textView.setTag(item); diff --git a/src/com/android/launcher3/PagedViewIcon.java b/src/com/android/launcher3/PagedViewIcon.java index 561215721..8bfe42d24 100644 --- a/src/com/android/launcher3/PagedViewIcon.java +++ b/src/com/android/launcher3/PagedViewIcon.java @@ -69,7 +69,7 @@ public class PagedViewIcon extends TextView { PagedViewIcon.PressedCallback cb) { mIcon = info.iconBitmap; mPressedCallback = cb; - setCompoundDrawablesWithIntrinsicBounds(null, Utilities.createIconDrawable(mIcon), + setCompoundDrawables(null, Utilities.createIconDrawable(mIcon), null, null); setText(info.title); setTag(info); diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index fe8655029..21c546d04 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -70,6 +70,7 @@ final class Utilities { */ static Drawable createIconDrawable(Bitmap icon) { FastBitmapDrawable d = new FastBitmapDrawable(icon); + d.setFilterBitmap(true); resizeIconDrawable(d); return d; } |