An open API service indexing awesome lists of open source software.

https://github.com/mcnaveen/android-webview-darkmode-with-javascript

This POC is implemented to explain how dark mode js can be used inside Android Webview Component
https://github.com/mcnaveen/android-webview-darkmode-with-javascript

android androidwebview dark-theme darkmode java webview-app webviewdemo

Last synced: 10 months ago
JSON representation

This POC is implemented to explain how dark mode js can be used inside Android Webview Component

Awesome Lists containing this project

README

          

## 🌓 Dark Mode Switch inside Android Webview
![Build](https://github.com/mcnaveen/Android-Webview-Darkmode-with-JavaScript/workflows/Build/badge.svg)

This POC is implemented to explain how dark mode js can be used inside Android Webview Component [using DOMStorage API](https://github.com/mcnaveen/Android-Webview-Darkmode-with-JavaScript/blob/71b8714c31039dc2e02ba443bcfd996a4b6b1f0e/app/src/main/java/github/mcnaveen/webviewDarkMode/MainActivity.java#L34)

## 🦄 Resources Used
- Android Webview
- [Coliff's Dark Mode Switch JS](https://github.com/coliff/dark-mode-switch)
- [Demo Page of Coliff's Dark Mode Switch](https://coliff.github.io/dark-mode-switch/)

## 🏃 Test yourself
- [Download the APK from the Releases Tab](https://github.com/mcnaveen/Android-Webview-Darkmode-with-JavaScript/releases/)

### ⚠️ Warning
This App uses the Deprecated API `webSetting.setDomStorageEnabled(true);`. But this is the only possible working solution. Even though it's deprecated it can be safely used.

## License
- MIT