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;
What is Android Fragments?
How to validate email address in Android with Kotlin?
How do I check in SQLite whether a table exists?
What is "shared preferences" in Android ?
Fix Play Store Rejection Due to SMS Permission - RRutors
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is Intent? What is the difference between an implicit intent and an explicit intent?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
Add Jar/Library Files as Dependency in Android Studio
How to Use Deprecated Handler() in Android - RRutors Guide
Extract Date and Time from Long Type Variable - RRutors
How to install/ uninstall apk by command line ADB
Fix Android Emulator Kill Error When Running Your App
Explain Fragment Life Cycle
What is the difference between match_parent and fill_parent?
How to Get bitmap from drawable: Android
ERR_ACCESS_DENIED in Android Webview with sdk 30
Symmetric vs Asymmetric Encryption in Android Server - RRutors
How to save activity State in Android?
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 get a contact image using a phone number in android?
Key Points to remember while develop the Android Application.
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What are the notifications available in android?
How to convert milli seconds to hours, minutes and seconds in Android?
What is ANR in android?
How to convert DP to Pixel and Pixel to Dp?
How to check Android version?
How to get complete address from latitude and longitude?
What is Android?
What is NetworkOnMainThread Exception?
How to get screen size (width,height) in Android?
Permission denied for window type 2010 in Marshmallow device
Hide/Disable soft keyboard on Activity launch: Android
How to find Android Device UDID or unique ID?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to Exit android app on back pressed?
How to avoid multiple button click at same time in android?
How to start a new activity on button click