jack_the_beast
jack_the_beast

Reputation: 1971

Android: app area reduced after upgranding gradle to 7.4.0

I'm having a weird issue after I upgrated gradle to version 7.4.0 from 7.0.4.

basically it looks like the "app window" has shrink vertically, so some space appears above the navigation bar and it changes its color as seen below. it seems that the amount of space increases if the device has a taller form factor.

I can reproduce this issue only on devices with api >=26. also is not visible if the device is "short". for example is not visible on a Pixel 2 emulator or nexus 5 but is huge on a pixel 6.

below some visual examples: normal look: ( pixel 3 api 33 emulator)

enter image description here

wrong look: (pixel 3 api 33 emulator)

enter image description here

wrong look: (pixel 3 api 33 emulator with gesture navigation)

enter image description here

wrong look: (physical pixel 6a with gesture navigation) enter image description here

wrong look: (pixel 6 api 26 emulator) enter image description here

the Layout Inspector only shows the correct app area down to the bottom navigation menu, so it looks like the system is adding the extra space. also bottom sheets begin above the added space. so it looks like the app has a maximum aspect ratio and doesn't expand to the whole screen lenght

any idea what's going on?

Upvotes: 3

Views: 154

Answers (1)

jack_the_beast
jack_the_beast

Reputation: 1971

I finally solved this by adding

android:resizeableActivity="true"

to my <application> tag thanks to this question.

However it remains a mistery how this was the culprit as the issue only appeared after upgrading gradle and also according to the documentation this attribute should default to true.

Upvotes: 1

Related Questions