Questions tagged [android-darkmode]

124 questions
0
votes
1 answer

Change source color file for dark mode programmatically Android

I'm trying to implement dark mode for my application. I created two different file color.xml (the second with color of my dark mode). I saved in boolean if my switch is on/off using sharedPreferences, when I click the switch button color changed,…
0
votes
1 answer

switch dark mode like whatsapp/slack etc

I know switching dark mode on android programmatically is easy with below code. AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) I want to know how to do it like whatsapp/slack which won't restart the app. User will still…
Varun A M
  • 1,103
  • 2
  • 14
  • 29
0
votes
1 answer

Android Switching between Dark/Light themes not working

I am working on an Android project where I need to support switching between Dark/Light themes based on system setting preference. I have changed App Theme from Theme.AppCompat.Light.NoActionBar to Theme.AppCompat.DayNight.NoActionBar. I am using…
Prashanth
  • 156
  • 1
  • 4
  • 14
0
votes
0 answers

Java, Android - App opens in Dark Mode first time launch of app when the device is set to Dark theme

I am not sure if this is answered. When i install my app in a device with dark theme enabled, the first time launch is in dark mode. Is it because i use ?: