diff options
author | Tor Norbye <tnorbye@google.com> | 2013-03-21 15:35:02 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2013-03-22 07:36:03 -0700 |
commit | 571ea149b8dc813180040be0ce66571b6ceb2eb5 (patch) | |
tree | 9212d64b8d0e9c4755e655990ff9c6fbc44d585d /eclipse/plugins | |
parent | 1f1c499db555c5388f91447d48f24d3b19249dc2 (diff) | |
download | sdk-571ea149b8dc813180040be0ce66571b6ceb2eb5.zip sdk-571ea149b8dc813180040be0ce66571b6ceb2eb5.tar.gz sdk-571ea149b8dc813180040be0ce66571b6ceb2eb5.tar.bz2 |
Fix project files for DeviceConfig
Also round screen dimensions for Nexus devices to nearest
tenth so for the N10 we show 10.1, not 10.0055
Change-Id: I5ef7377e24713dc6e323f5152f8f515b1c12237b
Diffstat (limited to 'eclipse/plugins')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/DeviceMenuListener.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/DeviceMenuListener.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/DeviceMenuListener.java index ccfa786..4890fe5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/DeviceMenuListener.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/DeviceMenuListener.java @@ -202,6 +202,8 @@ class DeviceMenuListener extends SelectionAdapter { String name = d.getName(); Screen screen = d.getDefaultHardware().getScreen(); float length = (float) screen.getDiagonalLength(); + // Round dimensions to the nearest tenth + length = Math.round(10 * length) / 10.0f; return String.format(java.util.Locale.US, "%1$s (%3$s\", %2$s)", name, getResolutionString(d), Float.toString(length)); } |