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;
How to Use Deprecated Handler() in Android - RRutors Guide
Open PDF in Google Drive with Intent in Android - RRutors
Key Points to remember while develop the Android Application.
How to Exit android app on back pressed?
What are Android Versions available?
Invoke-customs are only supported starting with android 0 --min-api 26
Android Studio project R can't find
How to Get bitmap from drawable: Android
How to find Android Device UDID or unique ID?
How to get complete address from latitude and longitude?
How do I check in SQLite whether a table exists?
What is Android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
What is "shared preferences" in Android ?
What are the notifications available in android?
How to copy database from assets folder in android using kotlin
How to install/ uninstall apk by command line ADB
How do i load image from drawable folder in Jetpack Compose?
What is the Different Between val and var in Kotlin?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Permission denied for window type 2010 in Marshmallow device
What is ANR? How to avoid and resolve it?
How to get screen size (width,height) in Android?
What is ANR in android?
How to convert milli seconds to hours, minutes and seconds in Android?
Extract Date and Time from Long Type Variable - RRutors
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Fix Play Store Rejection Due to SMS Permission - RRutors
What is Application?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How can i comment inside xml file in android studio?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to convert DP to Pixel and Pixel to Dp?
How to get a contact image using a phone number in android?
How to start a new activity on button click
Set Activity to Fullscreen Mode in Android - RRutors
Fix Android Emulator Kill Error When Running Your App
How to Generate signed apk with android studio