diff options
author | Patrick Dubroy <dubroy@google.com> | 2010-10-14 13:21:48 -0700 |
---|---|---|
committer | Patrick Dubroy <dubroy@google.com> | 2010-10-20 14:37:49 -0700 |
commit | 8e58e916061cbe2623697efac0924f2aa3753a92 (patch) | |
tree | a0350aadf47041a62cf81aa1230a3a6769b6bb97 /src/com/android/launcher2/LauncherApplication.java | |
parent | ce34a9768b01115def95f000a6a8f35870f10d3a (diff) | |
download | android_packages_apps_Trebuchet-8e58e916061cbe2623697efac0924f2aa3753a92.tar.gz android_packages_apps_Trebuchet-8e58e916061cbe2623697efac0924f2aa3753a92.tar.bz2 android_packages_apps_Trebuchet-8e58e916061cbe2623697efac0924f2aa3753a92.zip |
Various cleanups in the drag viz code.
Most importantly:
- Don't allocate a new Paint object in CellLayout.onDraw
- Scale holographic outlines based on the screen density
Diffstat (limited to 'src/com/android/launcher2/LauncherApplication.java')
-rw-r--r-- | src/com/android/launcher2/LauncherApplication.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher2/LauncherApplication.java b/src/com/android/launcher2/LauncherApplication.java index ca08378d8..8a18317bc 100644 --- a/src/com/android/launcher2/LauncherApplication.java +++ b/src/com/android/launcher2/LauncherApplication.java @@ -29,6 +29,7 @@ public class LauncherApplication extends Application { public LauncherModel mModel; public IconCache mIconCache; private static boolean sIsScreenXLarge; + private static float sScreenDensity; private static final boolean ENABLE_ROTATION = false; @Override @@ -40,6 +41,7 @@ public class LauncherApplication extends Application { mIconCache = new IconCache(this); mModel = new LauncherModel(this, mIconCache); sIsScreenXLarge = (getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_XLARGE; + sScreenDensity = getResources().getDisplayMetrics().density; // Register intent receivers IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); @@ -101,4 +103,8 @@ public class LauncherApplication extends Application { public static boolean isScreenXLarge() { return sIsScreenXLarge; } + + public static float getScreenDensity() { + return sScreenDensity; + } } |