In March 2017, an announcement was made that two Android devices — the Samsung Galaxy S8 and the LG G6 — were being introduced with new, longer, screen aspect ratios of 18:9 and 18.5:9.
According to the announcement, legacy apps with no android.max_aspect
or android.resizeableActivity
value in their manifest would take on a maximum aspect ratio of 1.86 (roughly 16:9) by default. The announcement shows an image of such an app running on one of the new device screens with its content "letterboxed" in the display with black bars shown along the top and bottom of the screen.
How can I set up the Android emulator to display one of the new, longer 18:9 screens? Manually setting the emulator screen resolution doesn’t show the letterboxed effect.
With Android Studio 2 now you can resize your window simply by dragging a corner.
Use weight for all layouts instead of giving constant values, Because weight is a type of % for screen.In manifest by default support screen view is true. Show activity on this post. These links will help you to create application for multiple screens : http://developer.android.com/training/multiscreen/screensizes.html.
This is not an answer per se, but I did find some helpful information in the docs.
First, read this note about android.max_aspect
from the original announcement:
Note: if you don't set a value, and
android:resizeableActivity
is not true, then the maximum aspect ratio defaults to 1.86 (roughly 16:9) and your app will not take advantage of the extra screen space.
Now see these docs:
You do not need to set a maximum aspect ratio if an activity's
android:resizeableActivity
attribute is set to true. If your app targets API level 24 or higher, this attribute defaults to true.
This means the "letter-boxing" issue will only happen if both of these conditions are true:
So I suspect the situation is not too bad - not many apps will be affected.
Try these steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With