tasjapr
tasjapr

Reputation: 1240

ForceDarkAllowed for specific Compose component or how to fix weird text color in dark mode on some Xiaomi phones?

I have trouble with text color in dark mode on some Xiaomi devices with android 10. The component is clickable Box with text, if item selected - the text color is back and box is white and vise versa. The colors specified directly. Also I use custom color scheme and theme for my app (not a material theme).

Note: I have 5 Xiaomi devices with android 10+ and only one of them have issue with text color in the selected item. On this device the color is white (instead of black) on light background

I can't provide the code of this component

So I have few questions:

P.S. I almost fixed this issue by placing my component inside a Surface with shadowElevation, but this has effect only before user interactions with this component, after click on the other component like this - text is white again

Upvotes: 2

Views: 166

Answers (0)

Related Questions