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;
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve
What is ANR? How to avoid and resolve it?
Explain Fragment Life Cycle
How to copy database from assets folder in android using kotlin
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
How to avoid multiple button click at same time in android?
What are Android Versions available?
What is ANR in android?
How to extract date and time from Long type variable in Kotlin on Android "
Intent for Drive PDF Viewer - How to open PDF in Google Drive with intent
What is Intent? What is the difference between an implicit intent and an explicit intent?
How to validate email address in Android with Kotlin?
What are symmetric and asymmetric encryption in the way Android interacts with the server?
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?
What happens next when the device switches between portrait and landscape?
What are the notifications available in android?
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
How to get an image resource by it's name in android?
How to reduce APK package size?
How to save activity State in Android?
What is NetworkOnMainThread Exception?
Permission denied for window type 2010 in Marshmallow device
How to stop EditText focus at Activity startup in Android?
How to add jar/library files as a dependency in Android studio gradle file
ERR_ACCESS_DENIED in Android Webview with sdk 30
How To Set Text Color Programmatically Android TextView?
ERROR Android emulator gets killed when I try to run my application and choose an emulator it ret
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
How do i load image from drawable folder in Jetpack Compose?
How to get screen size (width,height) in Android?
How do I generate random numbers in Dart?
Key Points to remember while develop the Android Application.
Check List for Generate Signed APK Android
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
What is the difference between match_parent and fill_parent?
What is Application?
Android Studio project R can't find
How to convert milli seconds to hours, minutes and seconds in Android?