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 copy database from assets folder in android using kotlin
How to reduce APK package size?
Hide/Disable soft keyboard on Activity launch: Android
How to validate email address in Android with Kotlin?
How can i comment inside xml file in android studio?
What is ANR? How to avoid and resolve it?
How to Use Deprecated Handler() in Android - RRutors Guide
Fix Play Store Rejection Due to SMS Permission - RRutors
What happens next when the device switches between portrait and landscape?
What is ANR in android?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
Android Studio project R can't find
Add Jar/Library Files as Dependency in Android Studio
What is Context?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to Generate signed apk with android studio
ERR_ACCESS_DENIED in Android Webview with sdk 30
Permission denied for window type 2010 in Marshmallow device
What is Android Fragments?
How to get an image resource by it's name in android?
What are Android Versions available?
How to get a contact image using a phone number in android?
Open PDF in Google Drive with Intent in Android - RRutors
How to convert milli seconds to hours, minutes and seconds in Android?
What are the notifications available in android?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is "shared preferences" in Android ?
Key Points to remember while develop the Android Application.
What is Application?
Extract Date and Time from Long Type Variable - RRutors
How to start a new activity on button click
What is the Different Between val and var in Kotlin?
How do I check in SQLite whether a table exists?
How do i load image from drawable folder in Jetpack Compose?
Invoke-customs are only supported starting with android 0 --min-api 26
Check List for Generate Signed APK Android
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
What is Android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to Get bitmap from drawable: Android