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 happens next when the device switches between portrait and landscape?
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
Decompile APK Files: How to Get Source Code - RRutors Guide
How to get complete address from latitude and longitude?
How to save activity State in Android?
Explain Fragment Life Cycle
How to check Android version?
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to copy database from assets folder in android using kotlin
How to stop EditText focus at Activity startup in Android?
How To Set Text Color Programmatically Android TextView?
What is Context?
What is NetworkOnMainThread Exception?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Invoke-customs are only supported starting with android 0 --min-api 26
What is ANR? How to avoid and resolve it?
How to reduce APK package size?
What is the difference between match_parent and fill_parent?
What is Android Fragments?
What is the Different Between val and var in Kotlin?
How to get screen size (width,height) in Android?
How do i load image from drawable folder in Jetpack Compose?
What are Android Versions available?
How to Use Deprecated Handler() in Android - RRutors Guide
How to avoid multiple button click at same time in android?
How to validate email address in Android with Kotlin?
How do I generate random numbers in Dart?
How to Exit android app on back pressed?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to get an image resource by it's name in android?
How to install/ uninstall apk by command line ADB
Key Points to remember while develop the Android Application.
How can i comment inside xml file in android studio?
How to Get bitmap from drawable: Android
How to get a contact image using a phone number in android?
What is ANR in android?
Add Jar/Library Files as Dependency in Android Studio
Check List for Generate Signed APK Android
What is Application?
Fix Android Emulator Kill Error When Running Your App