Dark theme configuration change in Android Q

前端 未结 1 578
伪装坚强ぢ
伪装坚强ぢ 2021-01-06 04:41

I want to implement android 10 dark theme in my app , I have these following cases:

SYSTEM_DEFAULT, NIGHT_MODE, LIGHT_MODE

The problem is when I

1条回答
  •  轮回少年
    2021-01-06 05:00

    You don't need to set the theme in your activity and recreate it. It's done automatically if you've setup your app theme right.

    To use the Dark in your app, you should extend the DayNight theme as your app theme.