Naeem Ullah
Naeem Ullah

Reputation: 43

how to forced UI of android app to light mode

if device mode is dark mode then how to forced to our android App UI select light mode .. in my app background is white and text color is black , but in some devices dark mode is enable then background is show as black and text color is also black . how we forced android app to light mode

Upvotes: 3

Views: 3972

Answers (1)

Umair Iqbal
Umair Iqbal

Reputation: 2069

Paste this line of code in Application class or Splash class

(you can write it in any class which is first to launch as app is opened)

AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);

Upvotes: 11

Related Questions