diff --git a/res/layout-land/workspace_screen.xml b/res/layout-land/workspace_screen.xml
index 5207d7b..531bac2 100644
--- a/res/layout-land/workspace_screen.xml
+++ b/res/layout-land/workspace_screen.xml
@@ -21,8 +21,8 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
 
-    launcher:cellWidth="106dip"
-    launcher:cellHeight="73dip"
+    launcher:cellWidth="@dimen/workspace_cell_width"
+    launcher:cellHeight="@dimen/workspace_cell_height"
     launcher:longAxisStartPadding="0dip"
     launcher:longAxisEndPadding="55dip"
     launcher:shortAxisStartPadding="0dip"
diff --git a/res/layout-port/workspace_screen.xml b/res/layout-port/workspace_screen.xml
index 6bbf6e9..531bac2 100644
--- a/res/layout-port/workspace_screen.xml
+++ b/res/layout-port/workspace_screen.xml
@@ -21,8 +21,8 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
 
-    launcher:cellWidth="80dip"
-    launcher:cellHeight="100dip"
+    launcher:cellWidth="@dimen/workspace_cell_width"
+    launcher:cellHeight="@dimen/workspace_cell_height"
     launcher:longAxisStartPadding="0dip"
     launcher:longAxisEndPadding="55dip"
     launcher:shortAxisStartPadding="0dip"
diff --git a/res/raw/rollo.c b/res/raw/rollo.c
index 70d3954..5ed562a 100644
--- a/res/raw/rollo.c
+++ b/res/raw/rollo.c
@@ -128,12 +128,12 @@
                 if (alpha > 0) {
                     color(1.0f, 1.0f, 1.0f, alpha);
 
-                    float ty = 605.f - y * 150.f;
+                    float ty = 654.f - y * 150.f;
 
                     ty = ty + 0.25f;
 
                     bindTexture(NAMED_PFText, 0, loadI32(3, index));
-                    drawRect(tx, ty, tx + 128.f, ty + 32.f, 0.5f);
+                    drawRect(tx, ty, tx + 128.f, ty + 64.f, 0.5f);
                 }
                 iconCount--;
                 index++;
diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml
new file mode 100644
index 0000000..a9d5082
--- /dev/null
+++ b/res/values-land/dimens.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="workspace_cell_width">106dip</dimen>
+    <dimen name="workspace_cell_height">73dip</dimen>
+</resources>
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
new file mode 100644
index 0000000..65a3fd3
--- /dev/null
+++ b/res/values-port/dimens.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <dimen name="workspace_cell_width">80dip</dimen>
+    <dimen name="workspace_cell_height">100dip</dimen>
+</resources>
diff --git a/src/com/android/launcher2/AllAppsView.java b/src/com/android/launcher2/AllAppsView.java
index dc24220..7bf0c7c 100644
--- a/src/com/android/launcher2/AllAppsView.java
+++ b/src/com/android/launcher2/AllAppsView.java
@@ -40,7 +40,6 @@
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.Paint;
-import android.graphics.Typeface;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Handler;
@@ -232,6 +231,7 @@
     }
 
     public class RolloRS {
+
         //public static final int STATE_SELECTED_ID = 0;
         public static final int STATE_DONE = 1;
         //public static final int STATE_PRESSURE = 2;
@@ -243,7 +243,6 @@
         public static final int STATE_COUNT = 8;
         public static final int STATE_TOUCH = 9;
 
-
         public RolloRS() {
         }
 
@@ -253,6 +252,7 @@
             mWidth = width;
             mHeight = height;
             initNamed();
+            initIcons(29);
             initRS();
         }
 
@@ -297,15 +297,15 @@
         private ProgramVertex.MatrixAllocation mPVAlloc;
         private ProgramVertex mPVOrtho;
         private ProgramVertex.MatrixAllocation mPVOrthoAlloc;
-        private Allocation[] mIcons;
-        private Allocation[] mLabels;
 
         private int[] mAllocStateBuf;
         private Allocation mAllocState;
 
+        private Allocation[] mIcons;
         private int[] mAllocIconIDBuf;
         private Allocation mAllocIconID;
 
+        private Allocation[] mLabels;
         private int[] mAllocLabelIDBuf;
         private Allocation mAllocLabelID;
 
@@ -377,52 +377,48 @@
             mAllocScratch.data(mAllocScratchBuf);
 
             Log.e("rs", "Done loading named");
+        }
+        
+        private void initIcons(int count) {
+            mIcons = new Allocation[count];
+            mAllocIconIDBuf = new int[count];
+            mAllocIconID = Allocation.createSized(mRS,
+                Element.USER_I32, mAllocIconIDBuf.length);
 
+            mLabels = new Allocation[count];
+            mAllocLabelIDBuf = new int[mLabels.length];
+            mAllocLabelID = Allocation.createSized(mRS,
+                Element.USER_I32, mLabels.length);
 
+            Element ie8888 = Element.RGBA_8888;
 
-            {
-                mIcons = new Allocation[29];
-                mAllocIconIDBuf = new int[mIcons.length];
-                mAllocIconID = Allocation.createSized(mRS,
-                    Element.USER_I32, mAllocIconIDBuf.length);
+            final Utilities.BubbleText bubble = new Utilities.BubbleText(getContext());
 
-                mLabels = new Allocation[29];
-                mAllocLabelIDBuf = new int[mLabels.length];
-                mAllocLabelID = Allocation.createSized(mRS,
-                    Element.USER_I32, mLabels.length);
-
-                Element ie8888 = Element.RGBA_8888;
-
-                for (int i=0; i<mIcons.length; i++) {
-                    mIcons[i] = Allocation.createFromBitmapResource(
-                            mRS, mRes, R.raw.maps, ie8888, true);
-                    mLabels[i] = makeTextBitmap("Maps");
-                }
-
-                for(int ct=0; ct < mIcons.length; ct++) {
-                    mIcons[ct].uploadToTexture(0);
-                    mLabels[ct].uploadToTexture(0);
-                    mAllocIconIDBuf[ct] = mIcons[ct].getID();
-                    mAllocLabelIDBuf[ct] = mLabels[ct].getID();
-                }
-                mAllocIconID.data(mAllocIconIDBuf);
-                mAllocLabelID.data(mAllocLabelIDBuf);
+            for (int i=0; i<count; i++) {
+                mIcons[i] = Allocation.createFromBitmapResource(
+                        mRS, mRes, R.raw.maps, ie8888, true);
+                mLabels[i] = makeTextBitmap(bubble, i%9==0 ? "Google Maps" : "Maps");
             }
 
+            for(int ct=0; ct < count; ct++) {
+                mIcons[ct].uploadToTexture(0);
+                mLabels[ct].uploadToTexture(0);
+                mAllocIconIDBuf[ct] = mIcons[ct].getID();
+                mAllocLabelIDBuf[ct] = mLabels[ct].getID();
+            }
+            mAllocIconID.data(mAllocIconIDBuf);
+            mAllocLabelID.data(mAllocLabelIDBuf);
+
+            Log.e("rs", "Done loading icons");
         }
 
-        Allocation makeTextBitmap(String t) {
-            Bitmap b = Bitmap.createBitmap(128, 32, Bitmap.Config.ARGB_8888);
-            Canvas c = new Canvas(b);
-            Paint p = new Paint();
-            p.setTypeface(Typeface.DEFAULT_BOLD);
-            p.setTextSize(20);
-            p.setColor(0xffffffff);
-            c.drawText(t, 2, 26, p);
-            return Allocation.createFromBitmap(mRS, b, Element.RGBA_8888, true);
+        Allocation makeTextBitmap(Utilities.BubbleText bubble, String label) {
+            Bitmap b = bubble.createTextBitmap(label);
+            Allocation a = Allocation.createFromBitmap(mRS, b, Element.RGBA_8888, true);
+            b.recycle();
+            return a;
         }
 
-
         private void initRS() {
             ScriptC.Builder sb = new ScriptC.Builder(mRS);
             sb.setScript(mRes, R.raw.rollo);
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index c357cb2..de375b6 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -31,9 +31,9 @@
  * too aggressive.
  */
 public class BubbleTextView extends TextView {
-    private static final float CORNER_RADIUS = 8.0f;
-    private static final float PADDING_H = 5.0f;
-    private static final float PADDING_V = 1.0f;
+    static final float CORNER_RADIUS = 8.0f;
+    static final float PADDING_H = 5.0f;
+    static final float PADDING_V = 1.0f;
 
     private final RectF mRect = new RectF();
     private Paint mPaint;
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index dc61be3..c710615 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -20,12 +20,18 @@
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.PaintDrawable;
 import android.graphics.Bitmap;
-import android.graphics.PixelFormat;
 import android.graphics.Canvas;
-import android.graphics.PaintFlagsDrawFilter;
 import android.graphics.Paint;
+import android.graphics.PaintFlagsDrawFilter;
+import android.graphics.PixelFormat;
 import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.Typeface;
+import android.text.Layout.Alignment;
+import android.text.StaticLayout;
+import android.text.TextPaint;
 import android.util.DisplayMetrics;
+import android.util.Log;
 import android.content.res.Resources;
 import android.content.Context;
 
@@ -201,4 +207,111 @@
 
         return bitmap;
     }
+
+    static class BubbleText {
+        private static final int MAX_LINES = 2;
+        private TextPaint mTextPaint;
+        private Paint mRectPaint;
+
+        private float mBubblePadding;
+        private float mCornerRadius;
+        private RectF mBubbleRect = new RectF();
+
+        private float mTextWidth;
+        private int mLeading;
+        private int mFirstLineY;
+        private int mLineHeight;
+
+        private int mBitmapWidth;
+        private int mBitmapHeight;
+
+        BubbleText(Context context) {
+            final Resources resources = context.getResources();
+
+            final float scale = resources.getDisplayMetrics().density;
+
+            final float paddingLeft = 5.0f * scale;
+            final float paddingRight = 5.0f * scale;
+            final float cellWidth = resources.getDimension(R.dimen.workspace_cell_width);
+            final float bubbleWidth = cellWidth - paddingLeft - paddingRight;
+            mBubblePadding = 5.0f * scale;
+
+            RectF bubbleRect = mBubbleRect;
+            bubbleRect.left = 0;
+            bubbleRect.top = 0;
+            bubbleRect.right = (int)(bubbleWidth+0.5f);
+
+            mCornerRadius = BubbleTextView.CORNER_RADIUS * scale;
+            mTextWidth = bubbleWidth - mBubblePadding - mBubblePadding;
+
+            Paint rectPaint = mRectPaint = new Paint();
+            rectPaint.setColor(0xff000000);
+
+            TextPaint textPaint = mTextPaint = new TextPaint();
+            textPaint.setTypeface(Typeface.DEFAULT_BOLD);
+            textPaint.setTextSize(20);
+            textPaint.setColor(0xffffffff);
+
+            float ascent = -textPaint.ascent();
+            float descent = textPaint.descent();
+            float leading = (ascent+descent) * 0.1f;
+            mLeading = (int)(leading + 0.5f);
+            mFirstLineY = (int)(leading + ascent + 0.5f);
+            mLineHeight = (int)(leading + ascent + descent + 0.5f);
+
+            roundToPow2(64);
+            mBitmapWidth = roundToPow2((int)(mBubbleRect.width() + 0.5f));
+            mBitmapHeight = roundToPow2((int)((MAX_LINES * mLineHeight) + mLeading + 0.5f));
+
+            Log.d(Launcher.LOG_TAG, "mBitmapWidth=" + mBitmapWidth + " mBitmapHeight="
+                    + mBitmapHeight + " w=" + ((int)(mBubbleRect.width() + 0.5f))
+                    + " h=" + ((int)((MAX_LINES * mLineHeight) + mLeading + 0.5f)));
+        }
+
+        /** You own the bitmap after this and you must call recycle on it. */
+        Bitmap createTextBitmap(String text) {
+            Bitmap b = Bitmap.createBitmap(mBitmapWidth, mBitmapHeight, Bitmap.Config.ARGB_8888);
+            Canvas c = new Canvas(b);
+
+            StaticLayout layout = new StaticLayout(text, mTextPaint, (int)mTextWidth,
+                    Alignment.ALIGN_CENTER, 1, 0, true);
+            int lineCount = layout.getLineCount();
+            if (lineCount > MAX_LINES) {
+                lineCount = MAX_LINES;
+            }
+            if (lineCount > 0) {
+                RectF bubbleRect = mBubbleRect;
+                bubbleRect.bottom = (int)((lineCount * mLineHeight) + mLeading + mLeading + 0.0f);
+                c.drawRoundRect(bubbleRect, mCornerRadius, mCornerRadius, mRectPaint);
+                Log.d(Launcher.LOG_TAG, "bubbleRect=" + bubbleRect);
+            }
+            for (int i=0; i<lineCount; i++) {
+                int x = (int)((mBubbleRect.width() - layout.getLineMax(i)) / 2.0f);
+                int y = mFirstLineY + (i * mLineHeight);
+                c.drawText(text.substring(layout.getLineStart(i), layout.getLineEnd(i)),
+                        x, y, mTextPaint);
+            }
+
+            return b;
+        }
+    }
+
+    /** Only works for positive numbers. */
+    static int roundToPow2(int n) {
+        int orig = n;
+        n >>= 1;
+        int mask = 0x8000000;
+        while (mask != 0 && (n & mask) == 0) {
+            mask >>= 1;
+        }
+        while (mask != 0) {
+            n |= mask;
+            mask >>= 1;
+        }
+        n += 1;
+        if (n != orig) {
+            n <<= 1;
+        }
+        return n;
+    }
 }
