What is the correct Device Definition for Google Glass (for a simulator in Eclipse or Android studio)?

DisplayMetrics gives this output on Glass Explorer edition:

DisplayMetrics{density=1.5, width=640, height=360, scaledDensity=1.5, xdpi=180.62222, ydpi=169.33333}

So it does indeed look like hdpi.

Also the screen size is small:

....
else if ((getResources().getConfiguration().screenLayout &      Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_SMALL) {     
               Log.d(TAG,"SMALL screen");
           }

And it is "notlong"


I created an AVD with the following specs:

Screen Size: 3" Resolution: 640x360 RAM: 682 MB Size: Small Screen Ratio: notlong Density: hdpi

and its a pretty good representation of my Glass, though its not perfect. I don't know what the exact screen size should be but with that resolution and density, looking at XML layouts in the Graphical Layout Preview look accurate.

Tags:

Google Glass