Have Android 14 changed how display size bucket is calculated?

178 Views Asked by At

I have an emulator with a 1920x1200px display at 10.1 inches. In Android 13 this is identified as xlarge and all the resources under xlarge is loaded. If I change to Android 14 the display is now considered large and therefore the large resources are loaded instead.

I can't find any info on this change. Is this a bug or have this been documented somewhere?

Edit: The app still has api level 33 as target.

1

There are 1 best solutions below

0
ΓDΛ On

Values for the smallest width qualifier are dp, because what matters is the amount of screen space available after the system accounts for pixel density (not the raw pixel resolution).

When I try with Android Studio Iguana for your values

enter image description here

It is set to hdpi.

However, when I set it with Android Studio Giraffe, it does not give the same result.

enter image description here

It is set to 220dpi.

Documentation Note:

The sizes you specify using resource qualifiers like smallest width are not the actual screen sizes. Rather, the sizes specify the width or height in dp units that are available to your app's window. The Android system might use some of the screen for system UI (such as the system bar at the bottom of the screen or the status bar at the top), so some of the screen might not be available for your layout.

And;

enter image description here