How can I get the Android emulator to report a specific screen size

I'm trying to imitate the HTC Flyer, and for this I need an emulator for self-reporting as a "large" screen size. I specified the resolution and the correct dpi, but it displays as "xlarge". The android documentation ( http://developer.android.com/guide/practices/screens_support.html#range ) indicates that it should be β€œxlarge”, but the HTC Flyer says β€œbig”. Here are some debugging data with some numbers:

flyer device DisplayMetrics{density=1.0, width=600, height=1024, scaledDensity=1.0, xdpi=169.99738, ydpi=169.33333}, densityDpi, 160, density, 1.0, screen size, large, flyer emulator DisplayMetrics{density=1.0, width=600, height=1024, scaledDensity=1.0, xdpi=160.0, ydpi=160.0}, densityDpi, 160, density, 1.0, screen size, xlarge, 

Pay attention to the screen size. Everything else is the same, but the device reports "large" and the emulator is "xlarge". Is there a way to make the emulator report β€œlarge”?

Here is the java that gave me the result:

  DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); int screenLayout = getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK; String screenLayoutStr; switch (screenLayout){ case Configuration.SCREENLAYOUT_SIZE_SMALL: screenLayoutStr = "small"; break; case Configuration.SCREENLAYOUT_SIZE_NORMAL: screenLayoutStr = "normal"; break; case Configuration.SCREENLAYOUT_SIZE_LARGE: screenLayoutStr = "large"; break; case 4: screenLayoutStr = "xlarge"; break; default: screenLayoutStr = "unknown: " + screenLayout; } LogIt.d(this,metrics,"densityDpi",metrics.densityDpi,"density",metrics.density,"screen size",screenLayoutStr); 
+4
source share

All Articles