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 install/ uninstall apk by command line ADB
How to avoid multiple button click at same time in android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Hide/Disable soft keyboard on Activity launch: Android
Decompile APK Files: How to Get Source Code - RRutors Guide
What is NetworkOnMainThread Exception?
How to get an image resource by it's name in android?
What is Application?
Fix Android Emulator Kill Error When Running Your App
How to reduce APK package size?
FCM Not Receiving Notifications in Android - RRutors
How can i comment inside xml file in android studio?
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to convert DP to Pixel and Pixel to Dp?
Key Points to remember while develop the Android Application.
How to save activity State in Android?
What is ANR in android?
What is Android Fragments?
Permission denied for window type 2010 in Marshmallow device
How to get a contact image using a phone number in android?
What is "shared preferences" in Android ?
Set Activity to Fullscreen Mode in Android - RRutors
How To Set Text Color Programmatically Android TextView?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How do i load image from drawable folder in Jetpack Compose?
Extract Date and Time from Long Type Variable - RRutors
How to get complete address from latitude and longitude?
How do I check in SQLite whether a table exists?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to check Android version?
What is Context?
How to Exit android app on back pressed?
Explain Fragment Life Cycle
How to Generate signed apk with android studio
How to validate email address in Android with Kotlin?
How to convert milli seconds to hours, minutes and seconds in Android?
What is Intent? What is the difference between an implicit intent and an explicit intent?
What are the notifications available in android?
What is ANR? How to avoid and resolve it?
Fix Duplicate Files in APK Build.gradle Issue - RRutors