OSDN Git Service

Add density value to density enum.
authorXavier Ducrohet <xav@android.com>
Wed, 23 Sep 2009 04:00:12 +0000 (21:00 -0700)
committerXavier Ducrohet <xav@android.com>
Wed, 23 Sep 2009 04:00:12 +0000 (21:00 -0700)
This is going to be used as constant to both ADT classes and the
layoutlib.

Change-Id: Id9befe83c5c2be3fbc5f045c7ed21aa8ee0108cc

tools/layoutlib/api/src/com/android/layoutlib/api/IDensityBasedResourceValue.java

index fb9387f..7128032 100644 (file)
@@ -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;
+        }
     }
 
     /**