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;
What is ANR in android?
How to avoid multiple button click at same time in android?
How to get an image resource by it's name in android?
Fix Play Store Rejection Due to SMS Permission - RRutors
What is ANR? How to avoid and resolve it?
How to convert milli seconds to hours, minutes and seconds in Android?
Explain Fragment Life Cycle
How to validate email address in Android with Kotlin?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
What is Android Fragments?
Add Jar/Library Files as Dependency in Android Studio
How to get screen size (width,height) in Android?
How to Use Deprecated Handler() in Android - RRutors Guide
What is Context?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What are Android Versions available?
How do I generate random numbers in Dart?
Permission denied for window type 2010 in Marshmallow device
What is the Different Between val and var in Kotlin?
Android Studio project R can't find
What are the notifications available in android?
How to find Android Device UDID or unique ID?
How do i load image from drawable folder in Jetpack Compose?
How do I check in SQLite whether a table exists?
How to get complete address from latitude and longitude?
How to Get bitmap from drawable: Android
How to install/ uninstall apk by command line ADB
What is the difference between match_parent and fill_parent?
FCM Not Receiving Notifications in Android - RRutors
What is NetworkOnMainThread Exception?
How To Set Text Color Programmatically Android TextView?
What is Application?
What is Android?
How to check Android version?
What is "shared preferences" in Android ?
How to Exit android app on back pressed?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Decompile APK Files: How to Get Source Code - RRutors Guide
What happens next when the device switches between portrait and landscape?