nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
218 stars 80 forks source link

Dark Mode/theme Support #51

Open vchimev opened 5 years ago

vchimev commented 5 years ago

Android 10 and iOS 13 introduce system-wide dark appearance for all user interface elements, known as Dark theme for Android and Dark Mode for iOS.

The components can take advantage of MaterialComponents’ dark theme for Android: https://material.io/develop/android/theming/dark/

farfromrefug commented 5 years ago

@vchimev How would you see that happening here? I mean do you want me to apply a custom theme? If i am not mistaken this could be completly handled in {N}. If the ns themes for light/dark have css entries for material components it would work out of the box. Well maybe not all components. For Dialogs the user would have to change it's android style as you mentioned

PasVegan commented 1 month ago

Any update ? The theme doesn't changed based on the android theme.

farfromrefug commented 1 month ago

@PasVegan You need to implement it on the app side. https://github.com/material-components/material-components-android/blob/master/docs/theming/Dark.md

You can also look at all my apps as they all support dark mode: https://github.com/farfromrefug

PasVegan commented 1 month ago

@farfromrefug It works but I need to manually restart the application to apply the theme change

farfromrefug commented 1 month ago

@PasVegan It is working fine in my apps. Not sure what the issue could be but you can use them as exampel