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?
What happens next when the device switches between portrait and landscape?
How to check Android version?
How to reduce APK package size?
Key Points to remember while develop the Android Application.
Permission denied for window type 2010 in Marshmallow device
Extract Date and Time from Long Type Variable - RRutors
FCM Not Receiving Notifications in Android - RRutors
How can i comment inside xml file in android studio?
Set Activity to Fullscreen Mode in Android - RRutors
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to convert DP to Pixel and Pixel to Dp?
How to convert milli seconds to hours, minutes and seconds in Android?
What are Android Versions available?
Open PDF in Google Drive with Intent in Android - RRutors
How do I check in SQLite whether a table exists?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Fix Android Emulator Kill Error When Running Your App
How to Exit android app on back pressed?
What is Application?
What is ANR in android?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How do i load image from drawable folder in Jetpack Compose?
Explain Fragment Life Cycle
How to Get bitmap from drawable: Android
How to stop EditText focus at Activity startup in Android?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Check List for Generate Signed APK Android
Add Jar/Library Files as Dependency in Android Studio
How to start a new activity on button click
What are the notifications available in android?
How to install/ uninstall apk by command line ADB
Decompile APK Files: How to Get Source Code - RRutors Guide
What is Context?
How to avoid multiple button click at same time in android?
How To Set Text Color Programmatically Android TextView?
Fix Play Store Rejection Due to SMS Permission - RRutors
Android Studio project R can't find
How to copy database from assets folder in android using kotlin