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 get a contact image using a phone number in android?
What is ANR? How to avoid and resolve it?
Open PDF in Google Drive with Intent in Android - RRutors
Hide/Disable soft keyboard on Activity launch: Android
How do I generate random numbers in Dart?
Explain Fragment Life Cycle
How to Generate signed apk with android studio
How to stop EditText focus at Activity startup in Android?
FCM Not Receiving Notifications in Android - RRutors
How to copy database from assets folder in android using kotlin
What is the Different Between val and var in Kotlin?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is Application?
How do I check in SQLite whether a table exists?
Add Jar/Library Files as Dependency in Android Studio
Android Studio project R can't find
How to avoid multiple button click at same time in android?
How to Get bitmap from drawable: Android
Set Activity to Fullscreen Mode in Android - RRutors
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to install/ uninstall apk by command line ADB
How to get screen size (width,height) in Android?
How to reduce APK package size?
How to convert DP to Pixel and Pixel to Dp?
What are the notifications available in android?
How To Set Text Color Programmatically Android TextView?
How to convert milli seconds to hours, minutes and seconds in Android?
Check List for Generate Signed APK Android
What is Context?
How to start a new activity on button click
What is Android?
ERR_ACCESS_DENIED in Android Webview with sdk 30
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to check Android version?
How do i load image from drawable folder in Jetpack Compose?
What is ANR in android?
Extract Date and Time from Long Type Variable - RRutors
How to save activity State in Android?
How to Use Deprecated Handler() in Android - RRutors Guide
Invoke-customs are only supported starting with android 0 --min-api 26