and one more questions. How do I set dark theme fo...
# fleet
g
and one more questions. How do I set dark theme for previews?
Tried something like
Copy code
@Preview()
@Composable
private fun preview() {
    MaterialTheme(darkColors()) {
        Text("testt")
    }
}
but preview is still white with black text
w
Hi Giorgi! It's currently not possible to change the background of a preview. You can find the workaround, track/vote for the issue, and share your thoughts here. Details: Currently all the preview does is render your preview constraint to the size of the tool window, and then we draw it over a white background. This white background is not configurable at this moment. So the workaround is to make sure that your preview is not transparent :)
g
thanks for reply. I have upvoted the issue