Feature #145
closed
I'm not quite sure how Lightning does this, but the source can be found here: https://github.com/anthonycr/Lightning-Browser
Another potential example would be one of the Facebook wrappers, as to my knowledge, they are just apps that render the web version of Facebook within Webview. A good example here would be MaterialFBook: https://github.com/ZeeRooo/MaterialFBook
Hermit Lite Apps also does this and gives the user options on color themes for night mode. This one is not open source, but it does have open source components - I'm not sure if the night mode rendering options are in the open or closed source parts, though: https://github.com/chimbori/lite-apps
There's another app I've discovered that has a great Night Mode rendering called FAQr: https://play.google.com/store/apps/details?id=com.faqr&hl=en. It's currently not open source, but I have reached out to the developer and he's said he's considered making it so. In addition, he was very responsive, so if you have questions about his implementation, it might be worth contacting him.
It does download pages locally, so that might be why it is able to render the night mode so smoothly, but I'm not sure.
Thanks for the information. I'll look into it.
MaterialFBook is altering the CSS of the website to match the color scheme. They are able to do this because they are only loading one website (Facebook) and thus can hardcode the CSS tags that need to be modified. This approach would not work for browsing the internet at large.
After playing with a number of settings, it is possible to tweak a small number of CSS settings that provide a nice Night Mode experience for almost all web pages. Doing so requires JavaScript to be enabled, because JavaScript is required to inject the CSS changes.
- Status changed from New to Closed
- Priority changed from 3 to Next Release
Also available in: Atom
PDF