Skip to content

xLexip/Adaptive-Theme

Repository files navigation

Adaptive Theme – Auto Dark Mode

Latest Version Stars Play Store Download Count

Adaptive Theme uses your device's ambient light sensor to intelligently switch between light and dark mode — optimizing readability, eye comfort, and battery life based on actual lighting conditions.


Get it on Google Play    GitHub Releases    Shizuku   

Featured On

Android Authority: "A brilliant app that once installed makes you wonder how you lived without it. [...] This app gives Android the automatic dark mode feature it desperately needs." – Andy Walker

HowToMen (YouTube): "No tapping, no schedules needed. It just does it on its own. [...] And don't worry, it's not killing your battery either." – Facundo Holzmeister

Computerworld: "This is how Android's dark mode should have worked since the start. Ready for an overdue injection of extra intelligence?" – JR Raphael

How-To Geek: "With a simple app, you can make dark mode (and light mode) switch with the lighting around you." – Joe Fedewa


Setup

  1. Install Adaptive Theme from Google Play or GitHub Releases.
  2. Grant the permission using the web setup tool, or Shizuku, or Root, or manual ADB.
  3. Set your lux threshold or pick a preset, and you're done.

The one-time permission grant is required because Android restricts apps from changing the system theme by default. The permission only allows changing system settings such as the dark mode toggle — it does not grant root access or read any user data, and is fully reversible by uninstalling the app.


Features

  • Sensor-driven switching: Uses the physical ambient light sensor – not a clock or sunset schedule – to intelligently switch the system theme.
  • Custom lux threshold: Dial in exactly when the theme flips, or choose a preset (e.g.indoor, outdoor, sunlight).
  • Night lock: Optionally hold dark mode during a fixed time window, e.g. 9 PM – 6 AM.
  • Battery friendly & Event-driven: The sensor is only checked once when you turn the screen on. Zero background drain.
  • 50+ languages: Fully localized for a global audience.
  • No root required: Works on stock Android. Root is supported as an optional setup method.
  • Shizuku support: Includes native Shizuku integration as one of several setup options.
  • Free, open-source, no ads

How It Works

To avoid screen flicker and unnecessary background work, Adaptive Theme follows a strict, event-driven model:

  • Screen-on trigger — The light sensor is only sampled right after the screen turns on, not continuously.
  • Obstruction check — Validates that the sensor is not covered (e.g. by a hand or pocket).
  • Instant apply — The theme is switched before you start interacting.

This design ensures mid-session theme changes never interrupt your use, since some apps handle live theme changes poorly.


Support the Project

Adaptive Theme is completely free, ad-free, and developed in my spare time. If you find it useful, consider to:

  • Star this repository at the top to help others find it.
  • Leave a rating on Google Play — it makes a real difference in discoverability.
  • Share the app with anyone who might benefit.
  • Follow me @xLexip if you like .
  • Buy me a coffee if you're feeling generous.

Issues, questions, and feature ideas are welcome — please open an issue or use the in-app feedback option.


Architecture & Tech Stack

Android Kotlin Jetpack-Compose Material-Design SonarQube

  • Modern UI: Written in Kotlin using Jetpack Compose and Material 3 (Material You).
  • Architecture: Follows the MVVM pattern with a Single-Activity architecture.
  • Reactive Data: ViewModels expose data via Kotlin Flows and manage concurrency with Coroutines.
  • Persistence: Type-safe settings storage utilizing Jetpack DataStore.
  • Background Work: Sensor operations run event-driven – only upon screen-on broadcasts – ensuring zero unnecessary battery drain in the background.

FAQ

What is the minimum Android version? Adaptive Theme works on Android 14 and above.

Why didn't the theme change right away? By design, the theme only switches immediately after the screen turns on. This prevents flicker, saves battery, and avoids interrupting an active app session.

Does it work on tablets? No. Due to a technical limitation, Adaptive Theme is currently limited to smartphones.

Does this require root? No. It works on stock devices. Root is supported as an optional setup method.

Does it work with custom skins (MIUI, OneUI, etc.)? In most cases, yes — any system that respects the native Android dark mode implementation is supported.


References & Credits

International Press

YouTube Videos

Acknowledgements

  • AlbertCaro — Spanish translation strings
  • Nunito font — SIL Open Font License 1.1, Copyright 2014 The Nunito Project Authors

Made with 🥨 in Germany