google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.34k stars 593 forks source link

[System UI Controller] Deprecation and Activity.enableEdgeToEdge #1716

Closed leinardi closed 5 months ago

leinardi commented 10 months ago

I understand that, to properly deal with edge-to-edge and status/notification bar color changes we can now use the Activity.enableEdgeToEdge method, as explained here but, what is the advised migration strategy for other features that System UI Controller is providing, like SystemUiController.systemBarsBehavior or SystemUiController.isStatusBarVisible?

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

leinardi commented 8 months ago

comment or this will be closed in 5 days

Mwhite69 commented 8 months ago

Help

On Mon, Nov 13, 2023, 3:32 AM Roberto Leinardi @.***> wrote:

comment or this will be closed in 5 days

— Reply to this email directly, view it on GitHub https://github.com/google/accompanist/issues/1716#issuecomment-1807673579, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6VPCDS6KUSBP7BCJKMTZLTYEHLLPAVCNFSM6AAAAAA5HM56HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGY3TGNJXHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

leinardi commented 6 months ago

comment or this will be closed in 5 days

Digipom commented 5 months ago

I'm having this issue too. Activity's edge-to-edge doesn't seem to have an equivalent to isNavigationBarContrastEnforced = false

Digipom commented 5 months ago

https://issuetracker.google.com/issues/324115590

Digipom commented 5 months ago

Workaround for isNavigationBarContrastEnforced: https://issuetracker.google.com/issues/324115590#comment3

alexvanyo commented 5 months ago

For the window flags that aren't controlled by the opinionated enableEdgeToEdge, you can read and write them directly using the relevant Window, or via the WindowInsetsControllerCompat for that Window.

For isStatusBarVisible, you should be able to use [WindowInsets.areStatusBarsVisible](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/package-summary#(androidx.compose.foundation.layout.WindowInsets.Companion).areStatusBarsVisible())