Collapsing Toolbar with cover image
Opened this issue · 4 comments
When image is collapsed the theme of status bar did not change . How to change the status bar theme when toolbar is collapsed .
I couldn't see any problem with the current example. It would be good if you can provide video and more information about the issue.
In this example, I don't change the status bar color because it's a translucent theme. Layouts stay behind the status bar.
You can check this source or you can do it like in the example ( setTheme() - DemoActivity.kt:58 )
https://medium.com/androiddevelopers/translucent-systembars-the-right-way-across-api-levels-and-themes-6d7ddda21396
I'm only changing status bar icon colors in onTransitionChange callback ( DemoActivity.kt:75 )
// for light icons
window?.decorView?.systemUiVisibility = 0
// for dark icons
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
Note: Status bar icon changes only works for API 23 and above
Ok sir , but this is also my personal problem can you help me to find out that how to change the theme of statusbar to light in this example or i have also seen that in collapsing toolbars when toolbar or image is collapsed the theme of status bar changes , can you tell me please how to do that . Thanku!