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 Intent? What is the difference between an implicit intent and an explicit intent?
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
What is Application?
Android FCM not receiving notifications when app is removed from background
What is "shared preferences" in Android ?
How to add jar/library files as a dependency in Android studio gradle file
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
How do I generate random numbers in Dart?
How to start a new activity on button click
What happens next when the device switches between portrait and landscape?
Android Studio project R can't find
How to convert DP to Pixel and Pixel to Dp?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to stop EditText focus at Activity startup in Android?
Invoke-customs are only supported starting with android 0 --min-api 26
How to validate email address in Android with Kotlin?
How to get screen size (width,height) in Android?
How to find Android Device UDID or unique ID?
What is ANR? How to avoid and resolve it?
How to check Android version?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
How to get a contact image using a phone number in android?
How to Get bitmap from drawable: Android
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
How to install/ uninstall apk by command line ADB
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to avoid multiple button click at same time in android?
Duplicate files during packaging of APK” build.gradle issue: Android Studio
What is the difference between match_parent and fill_parent?
What is ANR in android?
What is Android Fragments?
What is Context?
Explain Fragment Life Cycle
How to get an image resource by it's name in android?
What is NetworkOnMainThread Exception?
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
What are Android Versions available?
How to extract date and time from Long type variable in Kotlin on Android "