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
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index dc498a4..ad39541 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -176,6 +176,7 @@
// 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 @@
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);