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;
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How to get an image resource by it's name in android?
How to get screen size (width,height) in Android?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is Context?
How to avoid multiple button click at same time in android?
Explain Fragment Life Cycle
Permission denied for window type 2010 in Marshmallow device
What is Android?
How to get a contact image using a phone number in android?
How To Set Text Color Programmatically Android TextView?
How to Exit android app on back pressed?
What are the notifications available in android?
Fix Play Store Rejection Due to SMS Permission - RRutors
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How do I check in SQLite whether a table exists?
How to Get bitmap from drawable: Android
What is the difference between match_parent and fill_parent?
What is Android Fragments?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to copy database from assets folder in android using kotlin
Check List for Generate Signed APK Android
How do i load image from drawable folder in Jetpack Compose?
Fix Android Emulator Kill Error When Running Your App
How to install/ uninstall apk by command line ADB
What is ANR in android?
Invoke-customs are only supported starting with android 0 --min-api 26
FCM Not Receiving Notifications in Android - RRutors
How to reduce APK package size?
What is Intent? What is the difference between an implicit intent and an explicit intent?
What are Android Versions available?
Add Jar/Library Files as Dependency in Android Studio
What is ANR? How to avoid and resolve it?
How to Generate signed apk with android studio
How to start a new activity on button click
How can i comment inside xml file in android studio?
What happens next when the device switches between portrait and landscape?
What is NetworkOnMainThread Exception?
How do I generate random numbers in Dart?
What is the Different Between val and var in Kotlin?