From 0dca1ec41479a74f8da080224fa0c7eacab674d6 Mon Sep 17 00:00:00 2001 From: Andrew Flynn Date: Wed, 29 Feb 2012 13:33:22 -0800 Subject: New small/large screen division for Launcher. Previously the dp division between the two was set at 600dp (7" tablets). This has now been bumped up to 720dp (10" tablets). Change-Id: I1f0419e504fc3bb606156c1cf6fbe03956274184 --- src/com/android/launcher2/BubbleTextView.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/com/android/launcher2/BubbleTextView.java') diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java index dc498a403..ad3954124 100644 --- a/src/com/android/launcher2/BubbleTextView.java +++ b/src/com/android/launcher2/BubbleTextView.java @@ -176,6 +176,7 @@ 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.translate(-getScrollX() + padding / 2, -getScrollY() + padding / 2); destCanvas.clipRect(clipRect, Op.REPLACE); draw(destCanvas); @@ -286,6 +287,14 @@ public class BubbleTextView extends TextView { canvas.translate(-scrollX, -scrollY); } } + + // If text is transparent, don't draw any shadow + if (getCurrentTextColor() == android.R.color.transparent) { + getPaint().clearShadowLayer(); + super.draw(canvas); + return; + } + // We enhance the shadow by drawing the shadow twice getPaint().setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR); super.draw(canvas); -- cgit v1.2.3