With the Display object we can get the Screen width and height Display display = getWindowManager().getDefaultDisplay(); But getWidth(),getHeight() are deprecated from Android API Level 13 and introduced getSize() method Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
Permission denied for window type 2010 in Marshmallow device
Duplicate files during packaging of APK” build.gradle issue: Android Studio
What is the difference between match_parent and fill_parent?
How to get complete address from latitude and longitude?
What are symmetric and asymmetric encryption in the way Android interacts with the server?
How to Exit android app on back pressed?
What is Application?
How to convert DP to Pixel and Pixel to Dp?
How to convert milli seconds to hours, minutes and seconds in Android?
How can i comment inside xml file in android studio?
How to get a contact image using a phone number in android?
What is ANR? How to avoid and resolve it?
How to check Android version?
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
Explain Fragment Life Cycle
What is NetworkOnMainThread Exception?
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
Hide/Disable soft keyboard on Activity launch: Android
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
How to find Android Device UDID or unique ID?
Key Points to remember while develop the Android Application.
How to save activity State in Android?
What is the Different Between val and var in Kotlin?
How do I generate random numbers in Dart?
How to get an image resource by it's name in android?
How to Get bitmap from drawable: Android
Check List for Generate Signed APK Android
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
Android Studio project R can't find
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What are the notifications available in android?
What is Android Fragments?
How to validate email address in Android with Kotlin?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to start a new activity on button click
What is "shared preferences" in Android ?
Invoke-customs are only supported starting with android 0 --min-api 26
How to reduce APK package size?
How to install/ uninstall apk by command line ADB
How to stop EditText focus at Activity startup in Android?