You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i'm having some issues with capturing dialog snapshots when using the material3 theme.
I'm rendering a simple AlertDialog with an explicit container color of Color.White. However, when i capture either the screen or dialog contents, it's giving me an entirely different container color. You'll notice that the dialog container is some other color (that's not white). However, if i then set the composition local LocalTonalElevationEnabled to false, everything renders properly with the only difference being the tonal elevation enabled or not. The one on the left is the default setting, the one on the right is with me explicitly setting LocalTonalEvenvationEnabled to false.
I would chalk this up to a material 3 issue, however when i run either of these in a device (or emulator) they both look correct:
It seems like something in the capture mechanism isn't playing well with the tonal elevation.
As a side note, we generally don't want tonal elevation, so our current solution is going to be to turn this off at the root theme level anyway, but I figured i should report this behavior in case it causes others issues.
@mattinger
Thank you for reporting this. I added the test you provided, but I wasn't able to reproduce the issue. I think it might be related to the API version or something similar. Could you provide some versions to help reproduce the issue? #513
So i'm having some issues with capturing dialog snapshots when using the material3 theme.
I'm rendering a simple AlertDialog with an explicit container color of Color.White. However, when i capture either the screen or dialog contents, it's giving me an entirely different container color. You'll notice that the dialog container is some other color (that's not white). However, if i then set the composition local LocalTonalElevationEnabled to false, everything renders properly with the only difference being the tonal elevation enabled or not. The one on the left is the default setting, the one on the right is with me explicitly setting LocalTonalEvenvationEnabled to false.
I would chalk this up to a material 3 issue, however when i run either of these in a device (or emulator) they both look correct:
It seems like something in the capture mechanism isn't playing well with the tonal elevation.
The text was updated successfully, but these errors were encountered: