summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/BubbleTextView.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-03-02 17:14:58 -0800
committerWinson Chung <winsonc@google.com>2012-03-08 13:37:46 -0800
commiteecf02da58adef5486bf0c9ff7127ea891f457a4 (patch)
treeaa96fab5fb3528fdd838b4547922b8577112df7f /src/com/android/launcher2/BubbleTextView.java
parent633f1aad55aea7afbefd8409ccfd1f693b27870b (diff)
downloadandroid_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.tar.gz
android_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.tar.bz2
android_packages_apps_Trebuchet-eecf02da58adef5486bf0c9ff7127ea891f457a4.zip
Fixing some issues/regressions related to scaled icons.
- Fixes issue with folder icons being clipped in landscape in sw720dp (Bug: 6118397) - Fixes issue with divider being in wrong orientation in sw720dp - Fixes issue with scaled icons not being drawn with filtering - Fixes issue with side pages showing under the hotseat when in landscape in phone UI - Animates the drag view on pick up and drop Change-Id: Iad26427ec63fcbc9bdb3b29a4645689ba445d5c8
Diffstat (limited to 'src/com/android/launcher2/BubbleTextView.java')
-rw-r--r--src/com/android/launcher2/BubbleTextView.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 623c6ff0b..4a3a7a452 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -47,8 +47,6 @@ public class BubbleTextView extends TextView {
static final float PADDING_H = 8.0f;
static final float PADDING_V = 3.0f;
- private Paint mPaint;
- private float mBubbleColorAlpha;
private int mPrevAlpha = -1;
private final HolographicOutlineHelper mOutlineHelper = new HolographicOutlineHelper();
@@ -88,9 +86,6 @@ public class BubbleTextView extends TextView {
final Resources res = getContext().getResources();
int bubbleColor = res.getColor(R.color.bubble_dark_background);
- mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
- mPaint.setColor(bubbleColor);
- mBubbleColorAlpha = Color.alpha(bubbleColor) / 255.0f;
mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor =
res.getColor(android.R.color.holo_blue_light);
@@ -178,7 +173,8 @@ public class BubbleTextView extends TextView {
// The translate of scrollX and scrollY is necessary when drawing TextViews, because
// they set scrollX and scrollY to large values to achieve centered text
destCanvas.save();
- destCanvas.scale(getScaleX(), getScaleY(), getWidth() / 2, getHeight() / 2);
+ destCanvas.scale(getScaleX(), getScaleY(),
+ (getWidth() + padding) / 2, (getHeight() + padding) / 2);
destCanvas.translate(-getScrollX() + padding / 2, -getScrollY() + padding / 2);
destCanvas.clipRect(clipRect, Op.REPLACE);
draw(destCanvas);
@@ -328,7 +324,6 @@ public class BubbleTextView extends TextView {
protected boolean onSetAlpha(int alpha) {
if (mPrevAlpha != alpha) {
mPrevAlpha = alpha;
- mPaint.setAlpha((int) (alpha * mBubbleColorAlpha));
super.onSetAlpha(alpha);
}
return true;