Matti MK
10/21/2021, 7:07 AMSystem UI Controller
on the root of every screenmaciejciemiega
10/21/2021, 7:14 AMTopAppBar
higher to fill that space (by adding e.g. .statusBarsPadding()
from Accompanist).Matti MK
10/21/2021, 7:16 AMmaciejciemiega
10/21/2021, 7:16 AMMatti MK
10/21/2021, 7:17 AMMatti MK
10/21/2021, 7:17 AMmaciejciemiega
10/21/2021, 7:40 AMsetStatusBarColor
on different screens anyway (as you are using it now). You are asking for the most elegant way - we haven't encountered this issue yet because so far in all our new (Compose) screens we use the same icons color.
I would probably just create a reusable "root" composable that would always set this color and use it as a root for every screen (we have our customized Scaffold anyway).
If you really want to define these colors on NavHost
level I guess you can do it by creating your own version of composable()
destination that would wrap the content
and set these colors there every time.