android / views-widgets-samples

Multiple samples showing the best practices in views-widgets on Android.
Apache License 2.0
5.04k stars 3.01k forks source link

Custom dark theme #155

Closed gcoleman799 closed 3 years ago

gcoleman799 commented 4 years ago

This PR implements a custom dark theme for the WebView component using the CSS media query prefers-color-scheme. When prefers-color-scheme is not set to dark for any reason then the default theme is light. Below is an image of how the application appears when dark mode is turned on and available.

Main Page: image

nfischer commented 3 years ago

Could you share a screenshot? Does this also fix the light-colored dropdown menu we see in #153?

It would still be good to fix the (unexpanded) dropdown menu. It looks lightly colored in the screenshot, with dark text. Can we change it to have a dark background with light text?