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 Set Text Color Programmatically Android TextView?
How to install/ uninstall apk by command line ADB
How to get screen size (width,height) in Android?
How to Exit android app on back pressed?
Permission denied for window type 2010 in Marshmallow device
How to find Android Device UDID or unique ID?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
What are Android Versions available?
How to Get bitmap from drawable: Android
How to reduce APK package size?
Explain Fragment Life Cycle
Key Points to remember while develop the Android Application.
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Open PDF in Google Drive with Intent in Android - RRutors
How do I generate random numbers in Dart?
Invoke-customs are only supported starting with android 0 --min-api 26
How do i load image from drawable folder in Jetpack Compose?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
What is Android?
How to validate email address in Android with Kotlin?
How to get an image resource by it's name in android?
Hide/Disable soft keyboard on Activity launch: Android
What is "shared preferences" in Android ?
How to Generate signed apk with android studio
What is the difference between match_parent and fill_parent?
How to stop EditText focus at Activity startup in Android?
What is Application?
What is ANR? How to avoid and resolve it?
Check List for Generate Signed APK Android
What happens next when the device switches between portrait and landscape?
FCM Not Receiving Notifications in Android - RRutors
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is ANR in android?
What is the Different Between val and var in Kotlin?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to avoid multiple button click at same time in android?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
How do I check in SQLite whether a table exists?
Decompile APK Files: How to Get Source Code - RRutors Guide
How to Use Deprecated Handler() in Android - RRutors Guide