summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/PagedViewWidget.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/PagedViewWidget.java')
-rw-r--r--src/com/android/launcher2/PagedViewWidget.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index 2dcceaea0..14ac9aee1 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -180,7 +180,9 @@ public class PagedViewWidget extends LinearLayout implements Checkable {
FastBitmapDrawable preview, int maxWidth, int[] cellSpan,
PagedViewIconCache cache, boolean createHolographicOutline) {
final ImageView image = (ImageView) findViewById(R.id.widget_preview);
- image.setMaxWidth(maxWidth);
+ if (maxWidth > -1) {
+ image.setMaxWidth(maxWidth);
+ }
image.setImageDrawable(preview);
mPreviewImageView = image;
final TextView name = (TextView) findViewById(R.id.widget_name);