Home
last modified time | relevance | path

Searched refs:metrics (Results 1 – 2 of 2) sorted by relevance

/sdk/apps/DeviceConfig/src/com/example/android/deviceconfig/
DMyActivity.java102 DisplayMetrics metrics = getResources().getDisplayMetrics(); in onCreate() local
107 int a = metrics.heightPixels; in onCreate()
108 int b = metrics.widthPixels; in onCreate()
114 tv.setText(String.format("%f", metrics.xdpi)); in onCreate()
118 tv.setText(String.format("%f", metrics.ydpi)); in onCreate()
123 tv.setText(String.format("%f", metrics.scaledDensity)); in onCreate()
DConfigGenerator.java168 DisplayMetrics metrics = resources.getDisplayMetrics(); in generateConfig() local
220 double xin = metrics.widthPixels / metrics.xdpi; in generateConfig()
221 double yin = metrics.heightPixels / metrics.ydpi; in generateConfig()
229 switch (metrics.densityDpi) { in generateConfig()
271 xDimension.appendChild(doc.createTextNode(Integer.toString(metrics.widthPixels))); in generateConfig()
275 yDimension.appendChild(doc.createTextNode(Integer.toString(metrics.heightPixels))); in generateConfig()
279 xdpi.appendChild(doc.createTextNode(Double.toString(metrics.xdpi))); in generateConfig()
283 ydpi.appendChild(doc.createTextNode(Double.toString(metrics.ydpi))); in generateConfig()