Android Theme - Releted

I have created TicTacToe game. I have created Light Colours UI. But when I am opening this app in my mobile due to Dark Theme of my mobile colours are converted into Dark Colours UI. How to prevent this. I want to keep Light UI created by me in Android Studio in all the device fixed, It should not depend on the device’s dark or light theme. How to do this?

@dhruv18999 Are you using a MI mobile

In some devices, the system forces the theme to the system default theme.
If your device is set to dark mode, your device forces the app to use the Dark mode.
Even if you’ve not enabled the dark mode within your app

Try using the below line in the AppTheme in themes.xml

    <item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like