Configuring Android emulator with a large aspect ratio

2 answers

This is not an answer as such, but I found useful information in the docs.

First read this note about android.max_aspect from the original announcement :

Note: if you do not set the value and android:resizeableActivity does not match true , then the default maximum aspect ratio is 1.86 (approximately 16: 9), and your application will not use an additional screen.

Now see these docs :

You do not need to set the maximum aspect ratio if the android:resizeableActivity set to true. If your application targets API level 24 or higher, this attribute defaults to true.

This means that the letter-box problem will only occur if both of these conditions are true:

  • The device has a large aspect ratio (> 1.86: 1 or 16: 9) and
  • Application is for API 23 or lower

So, I suspect that the situation is not so bad - not many applications will be affected.

+6
source

Try the following:

  • In Android Studio, open AVD Manager
  • Create a virtual device
    • New equipment profile
    • Set Name: "18: 9 Aspect Ratio Screen"
    • Set resolution: 1080 x 2160
    • Done
  • Select "18: 9 Aspect Ratio Screen"
  • Further
  • Select Nougat System Image (API Level 25)
  • Further
  • AVD Name: "25 N.1 18x9 aspect ratio screen" [launching AVD names with API level gets a list sorted by this value]
  • Done
+4
source

Source: https://habr.com/ru/post/1266193/


All Articles