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;
Check List for Generate Signed APK Android
How to convert DP to Pixel and Pixel to Dp?
How to get an image resource by it's name in android?
What is the Different Between val and var in Kotlin?
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
What are the notifications available in android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is Android?
What is Context?
Permission denied for window type 2010 in Marshmallow device
How do I check in SQLite whether a table exists?
How to start a new activity on button click
How to find Android Device UDID or unique ID?
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to install/ uninstall apk by command line ADB
How to get a contact image using a phone number in android?
Key Points to remember while develop the Android Application.
Android FCM not receiving notifications when app is removed from background
Explain Fragment Life Cycle
Hide/Disable soft keyboard on Activity launch: Android
What is Android Fragments?
ERR_ACCESS_DENIED in Android Webview with sdk 30
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
What is NetworkOnMainThread Exception?
Android Studio project R can't find
How To Set Text Color Programmatically Android TextView?
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
How to Generate signed apk with android studio
How do i load image from drawable folder in Jetpack Compose?
What happens next when the device switches between portrait and landscape?
How to add jar/library files as a dependency in Android studio gradle file
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
What is "shared preferences" in Android ?
How to copy database from assets folder in android using kotlin
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
How to Exit android app on back pressed?
How can i comment inside xml file in android studio?
How to validate email address in Android with Kotlin?
How to convert milli seconds to hours, minutes and seconds in Android?