Setting tab bar widths automatically

- will make launcher adapt better to different screen sizes
- also, moved customization tray tab setup code from Launcher to CustomizeTrayTabHost
This commit is contained in:
Michael Jurka committed 2011-05-13 14:35:47 -07:00
1 parent 2701ec91e1
commit 12ac0d60cc
14 files changed
+215 -178

No files matched your search

+8
View File
@@ -51,6 +51,7 @@ final class Utilities {
private static int sIconWidth = -1;
private static int sIconHeight = -1;
private static int sIconContentSize = -1;
private static int sIconTextureWidth = -1;
private static int sIconTextureHeight = -1;
@@ -90,6 +91,10 @@ final class Utilities {
static int sColors[] = { 0xffff0000, 0xff00ff00, 0xff0000ff };
static int sColorIndex = 0;
static int getIconContentSize() {
return sIconContentSize;
}
/**
* Returns a bitmap suitable for the all apps view. The bitmap will be a power
* of two sized ARGB_8888 bitmap that can be used as a gl texture.
@@ -236,6 +241,9 @@ final class Utilities {
final float density = metrics.density;
sIconWidth = sIconHeight = (int) resources.getDimension(R.dimen.app_icon_size);
if (LauncherApplication.isScreenXLarge()) {
sIconContentSize = (int) resources.getDimension(R.dimen.app_icon_content_size);
}
sIconTextureWidth = sIconTextureHeight = sIconWidth + 2;
sBlurPaint.setMaskFilter(new BlurMaskFilter(5 * density, BlurMaskFilter.Blur.NORMAL));