Skip to content Skip to sidebar Skip to footer

Android Screen Resolution

There are some screen resolutions already defined in Android. They are: QVGA (240×320, low density, small screen) WQVGA (240×400, low density, normal screen) FWQVGA (240×432, l

Solution 1:

Use DisplayMetrics to get screen info from your device.

Sample code:

DisplayMetricsdm=newDisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);

finalintheight= dm.heightPixels;
finalintwidth= dm.widthPixels;

Solution 2:

Have you tried to search the specifications of your device? i.e. from Wikipedia's Nexus One article, you can find Nexus one screen resolution:

Display 480 x 800 px (PenTile RGBG), 3.7 in (94 mm), 254 ppi, 3:5 aspect ratio, WVGA, 24-bit color AMOLED with 100,000:1 contrast ratio and 1 ms response rate

That's a starting point...

Post a Comment for "Android Screen Resolution"