javaandroidandroid-themeandroid-dark-themeandroid-night-mode

Android - theme.xml and theme.xml(night)


In newer version of Android Studio In values directory there is theme.xml and theme.xml(night) Can any point out differences between them ?? Does it replace styles.xml ??


Solution

  • As specified in the latest Android Studio 4.1 features :

    Every new project will be having two theme xml files : one for light and other one for dark mode.

    Actually, in the older versions of Android studio, if you want to enable dark mode in your app, you have to manually create and define the properties in your dark theme XML file, but now it is automatically generated as mostly all new apps are moving towards dark mode in their applications.

    You can still delete these files from your Android studio project if it doesn't fit in your use-case.