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
This commit is contained in:
Andrew Flynn
2012-02-29 13:33:22 -08:00
parent 79b79dd579
commit 0dca1ec414
51 changed files with 327 additions and 205 deletions

View File

@@ -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);