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 Generate signed apk with android studio
Android FCM not receiving notifications when app is removed from background
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
ERROR Android emulator gets killed when I try to run my application and choose an emulator it ret
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
How to get an image resource by it's name in android?
Permission denied for window type 2010 in Marshmallow device
What is Android?
How do I check in SQLite whether a table exists?
How to copy database from assets folder in android using kotlin
How to convert DP to Pixel and Pixel to Dp?
What is "shared preferences" in Android ?
How to Exit android app on back pressed?
How to validate email address in Android with Kotlin?
How to install/ uninstall apk by command line ADB
How to convert milli seconds to hours, minutes and seconds in Android?
Is There A Way To Get The Source Code From An APK File? (or) How to decompile apk?
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to check Android version?
How do i load image from drawable folder in Jetpack Compose?
What is ANR in android?
What are Android Versions available?
What happens next when the device switches between portrait and landscape?
What is Application?
Duplicate files during packaging of APK” build.gradle issue: Android Studio
What is Context?
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to start a new activity on button click
How can i comment inside xml file in android studio?
What is the Different Between val and var in Kotlin?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
Android Studio project R can't find
What are symmetric and asymmetric encryption in the way Android interacts with the server?
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
What is ANR? How to avoid and resolve it?
How to stop EditText focus at Activity startup in Android?
How to Get bitmap from drawable: Android
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How do I generate random numbers in Dart?