From fccc8dfc8a442b8d5ea415e1cba7ffde349319d9 Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Thu, 1 Oct 2009 14:30:16 -0700 Subject: [PATCH] Center the text in the textures. --- src/com/android/launcher2/Utilities.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java index a7eabe39aa..71ac343619 100644 --- a/src/com/android/launcher2/Utilities.java +++ b/src/com/android/launcher2/Utilities.java @@ -403,6 +403,8 @@ final class Utilities { mBitmapWidth = roundToPow2((int)(mBubbleRect.width() + 0.5f)); mBitmapHeight = roundToPow2((int)((MAX_LINES * mLineHeight) + leading + 0.5f)); + mBubbleRect.offsetTo((mBitmapWidth-mBubbleRect.width())/2, 0); + Log.d(TAG, "mBitmapWidth=" + mBitmapWidth + " mBitmapHeight=" + mBitmapHeight + " w=" + ((int)(mBubbleRect.width() + 0.5f)) + " h=" + ((int)((MAX_LINES * mLineHeight) + leading + 0.5f))); @@ -425,7 +427,10 @@ final class Utilities { //c.drawRoundRect(bubbleRect, mCornerRadius, mCornerRadius, mRectPaint); //} for (int i=0; i