breezy-weather / breezy-weather

A Material Design Weather Application
GNU Lesser General Public License v3.0
5.34k stars 162 forks source link

Update SDK to 35 #837

Open papjul opened 6 months ago

papjul commented 6 months ago

Behavior changes when compileSdk = 35

https://developer.android.com/about/versions/15/behavior-changes-all

Behavior changes when targetSdk = 35

https://developer.android.com/about/versions/15/behavior-changes-15

New SDK 35 features

To be completed

Deprecated in API level 35

To be completed

Last year schedule (SDK 34)

Current schedule (SDK 35)

min7-i commented 2 days ago

Regarding the window inset changes, I tested it on Android 15 both with the target and compileSdk set to 34 and 35. In both cases, the insets were handled identically to previous Android versions. I didn't notice any new issues here.[1]

The only issue is that the color of the system bars cannot be customized anymore:

system bars on Android 15 (SDK 34 vs SDK 35) In both cases, the icon color of the navigation bar is dark. In previous versions it was light with a shaded dark background. | SDK 34 | SDK 35 | | --- | --- | | The shade is still applied properly to the status bar. | The shade is not applied anymore. | | ![A15_target34_Screenshot_20240922_201229](https://github.com/user-attachments/assets/fb05ccc6-d32e-4306-bb42-37c633facb48) | ![A15_target35_Screenshot_20240922_194638](https://github.com/user-attachments/assets/0e9ef8ca-d1bd-481f-91cd-ac3511c07c4d) |

There is an extensive article about insets handling which mentions this in 7. Background protect system bars only when necessary:

However, there are some cases where you wish to preserve the background color of the system bars, but the APIs to set the status and navigation bar colors are deprecated. We are planning to release an AndroidX library to support this use case.

The suggested workaround is to "place a composable or view behind the system bar". Although I'm still undecided if I like that approach.


[1]In landscape mode with three-button navigation some system bar insets are applied twice (by the root layout and by compose), but this is a different issue and not related to changing the SDK.

papjul commented 2 days ago

So it will be possible once the AndroidX library update is released?

I don't think SDK 35 is ready yet. It was just released on AOSP and it's not even there yet on Pixels. Let's just wait a bit more ;)