There are some screen resolutions already defined in Android. They are:
How do I know which type my device screen resolution is?
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.
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.
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;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With