summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Utilities.java
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-02-23 11:48:32 -0800
committerMichael Jurka <mikejurka@google.com>2011-03-23 11:34:39 -0700
commit7ef959b9177e1e715b0afe010904455a3d961fc4 (patch)
tree271602f6c6c508a9275519eae373903c32dc8d54 /src/com/android/launcher2/Utilities.java
parent26976d9b53161f80faf822d482ac771b8621cf31 (diff)
downloadandroid_packages_apps_Trebuchet-7ef959b9177e1e715b0afe010904455a3d961fc4.tar.gz
android_packages_apps_Trebuchet-7ef959b9177e1e715b0afe010904455a3d961fc4.tar.bz2
android_packages_apps_Trebuchet-7ef959b9177e1e715b0afe010904455a3d961fc4.zip
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 Change-Id: I27a1acdacd231150bf191548d155c0e94d855796
Diffstat (limited to 'src/com/android/launcher2/Utilities.java')
-rw-r--r--src/com/android/launcher2/Utilities.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java
index 60f71f575..8ab22ebc8 100644
--- a/src/com/android/launcher2/Utilities.java
+++ b/src/com/android/launcher2/Utilities.java
@@ -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));