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 do I generate random numbers in Dart?
Set Activity to Fullscreen Mode in Android - RRutors
Add Jar/Library Files as Dependency in Android Studio
How to copy database from assets folder in android using kotlin
What is the difference between match_parent and fill_parent?
How to find Android Device UDID or unique ID?
How to install/ uninstall apk by command line ADB
How to get an image resource by it's name in android?
How to convert DP to Pixel and Pixel to Dp?
Fix Play Store Rejection Due to SMS Permission - RRutors
Open PDF in Google Drive with Intent in Android - RRutors
What is the Different Between val and var in Kotlin?
How can i comment inside xml file in android studio?
How do i load image from drawable folder in Jetpack Compose?
What is Intent? What is the difference between an implicit intent and an explicit intent?
Permission denied for window type 2010 in Marshmallow device
FCM Not Receiving Notifications in Android - RRutors
ERR_ACCESS_DENIED in Android Webview with sdk 30
Android Studio project R can't find
How to save activity State in Android?
How to Use Deprecated Handler() in Android - RRutors Guide
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to start a new activity on button click
How to get screen size (width,height) in Android?
How to get a contact image using a phone number in android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Check List for Generate Signed APK Android
Key Points to remember while develop the Android Application.
How to Generate signed apk with android studio
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to check Android version?
Fix Duplicate Files in APK Build.gradle Issue - RRutors
Hide/Disable soft keyboard on Activity launch: Android
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
What is ANR? How to avoid and resolve it?
How to Get bitmap from drawable: Android
What happens next when the device switches between portrait and landscape?
What is NetworkOnMainThread Exception?
Extract Date and Time from Long Type Variable - RRutors