AlexGladkov / Odyssey

Odyssey it's a declarative multiplatform navigation library for Multiplatform Compose

Home Page:https://youtube.com/c/MobileDeveloper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screen transition dynamic color change bug

maltsev-gorskij opened this issue · comments

In one of my applications, there was a need to implement a dynamic theme change. But i stumbled upon a problem during attempts to change screens transition background color programmatically together with changing application theme.

In the Odyssey library, the background color when animating the transition between screens is set by a separate parameter backgroundColor in the OdysseyConfiguration class, which is passed to setNavigationContent when constructing the navigation graph.
Example was found here

In this minimal example i tried to simulate the dynamic transition background color change.

Initially, there is no problem, but after the first transition background color change, the screen is becoming colored with the solid color of the current backgroundColor value. The content on the screen disappears.

Way to reproduce: Click on Set Dark Transition Background button on first screen in this example project.
image
image

Please help me figure out how to dynamically change the color of screens transition in runtime.

Change your screens on content background color (Do not change the background color on config)