Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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, low density, normal screen)
  • HVGA (320×480, medium density, normal screen)
  • WVGA800 (480×800, high density, normal screen)
  • WVGA854 (480×854 high density, normal screen)

How do I know which type my device screen resolution is?

like image 634
user430926 Avatar asked Jan 12 '11 08:01

user430926


People also ask

Can you change screen resolution on Android?

1 Go to the Settings menu > Display. 2 Tap on Screen resolution. 3 Select a resolution by sliding the circle. Tap on Apply once you have selected your preferred screen resolution.

What is the best screen resolution for Android?

WQHD is the highest screen resolution at 2560×1440 pixels. Resolutions may vary depending on the make and model of your phone or tablet. More pixels means higher resolution.


1 Answers

Use DisplayMetrics to get screen info from your device.

Sample code:

DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);

final int height = dm.heightPixels;
final int width = dm.widthPixels;
like image 112
Wroclai Avatar answered Oct 31 '22 12:10

Wroclai