summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2009-09-22 21:00:12 -0700
committerXavier Ducrohet <xav@android.com>2009-09-29 14:55:33 -0700
commitd16e0e138f1c8364f13702e34dcd0c240cc46e92 (patch)
tree2a5b36d012f9a65e4aa1ca1d957ae86cb0af63d3
parenta4e59dbb507a6548ae53dfe5d34603ca94f534d1 (diff)
downloadbase-d16e0e138f1c8364f13702e34dcd0c240cc46e92.tar.gz
Add density value to density enum.
This is going to be used as constant to both ADT classes and the layoutlib. This is integrated from the Eclair branch. DO NOT MERGE.
-rw-r--r--tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java b/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java
index fb9387f8fb4c..7128032e9523 100644
--- a/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java
+++ b/tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java
@@ -21,7 +21,20 @@ package com.android.layoutlib.api;
*/
public interface IDensityBasedResourceValue extends IResourceValue {
public static enum Density {
- HIGH, MEDIUM, LOW, NODPI;
+ HIGH(240),
+ MEDIUM(160),
+ LOW(120),
+ NODPI(0);
+
+ private final int mValue;
+
+ Density(int value) {
+ mValue = value;
+ }
+
+ public int getValue() {
+ return mValue;
+ }
}
/**