How to determine if an Android app is using light mode or dark mode

Oscar de la Hera Gomez
Two flowers that represent Kotlin and Android Studio side by side, beneath them sits the text "Dark Mode or Light Mode?"

To check if an Android app is using Dark Mode or Light Mode in Kotlin, use the function isSystemInDarkTheme().

A screenshot of Android Studio showing the Theme.kt file. Highlighted is the updated theme code.

A sample use of isSystemInDarkTheme() can be found in the Theme.kt file within our Open Source Repository.

isSystemInDarkTheme()

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details