I am using Tipsi-Stripe and NativeBase in my react-native, app, but I have not changed any theme variables (to my knowledge), but the components displayed from tipsi stripe seem be in some sort of "dark/night" theme.
Does anybody know where I should be looking to update these theme variables? I have looked at node_modules/native-base/src/theme/variables/ files, but they all appear to be nativebase defaults.
Screenshot:
NativeBase does not provide light or dark themes. It comes with commonColor, platform, material themes.
Though you can create light or dark themes on your own
Related
I am creating a flutter app which has different color themes.
like example theme based on dark, theme based on light, theme based on blue etc. Is there any package or any way of doing this.
Thank you!
I am migrating from AppCompat to MaterialComponents, and I would like to keep some widgets (like the Bottom Navigation Bar) AppCompat-themed. However, when I want to apply MaterialComponents theming to Buttons and TextFields, I must set my app theme to MaterialComponents.... and therefore all my widgets are MaterialComponents-themed. How can I make only some widgets MaterialComponents-themed ? I have been looking for an answer on StackOverflow but couldn't find anything.
You can use Bridge themes like :
Theme.MaterialComponents.Bridge
Theme.MaterialComponents.Light.Bridge
Theme.MaterialComponents.NoActionBar.Bridge
Theme.MaterialComponents.Light.NoActionBar.Bridge
Theme.MaterialComponents.Light.DarkActionBar.Bridge
Bridge themes inherit from AppCompat themes, but also define the new Material Components theme attributes for you. If you use a bridge theme, you can start using Material Design components without changing your app theme. (From documentaion)
Have a look : Get started - Material Design
Android Q launched by Google, Dark Theme was released with it. Dark Mode applies to both the system UI and the apps running in it.
I want to implement this feature to application, any good suggestions ?
Help will be appreciated !
Make sure you import the latest version of the google material library
com.google.android.material:material:version.latest
Then you can set your apps theme to Theme.MaterialComponents.DayNight....
This will switch your UI to a dark theme variant when the user toggles it in their system
https://developer.android.com/guide/topics/ui/look-and-feel/darktheme
In order to support Dark theme, you must set your app's theme (usually found in res/values/styles.xml) to inherit from a DayNight theme:
<style name="AppTheme" parent="Theme.AppCompat.DayNight">
for more information
I've added dark theme support for my application using 2 different themes declared in styles.xml.
On official android developer site:
In order to support Dark theme, you must set your app's theme (usually
found in res/values/styles.xml) to inherit from a DayNight theme
and this is what I've done. I've also created colors-night.xml to avoid modifying colors that cannot be modified in styles.xml by coding and this works too: when dark mode is activated from device system, colors changes automatically.
At this point, I was wondering which is the best way to implements dark theme: creating 2 different themes, using colors-night (and drawable-night) or a combination of these 2 ways?
First up is the youtube video below pretty much tells you what the current best practices are with regards to theming.
https://www.youtube.com/watch?v=Owkf8DhAOSo
They talked about splitting your styles into
themes.xml -> theme related styles
styles.xml -> component related styles
type.xml -> text appearances styles
All your colors should then be in one colors.xml which lives in values.
You will then have the following structure:
values/themes.xml
values/colors.xml
values/type.xml
values/styles.xml
values-night/themes.xml
In practice, I find that it is still hard to contain all the colors in just one colors.xml. I still create values-night/colors.xml as some colors don't necessarily fall into a style.
See this in practice in this repo. Observer that Google themselves didn't follow their point on just using one colors.xml.
https://github.com/material-components/material-components-android/tree/master/material-theme-builder
I created my own style which I use as theme for my app. It's based on android default holo light with some modification. As main color I use everywhere #android:color/holo_blue_light It worked ok with older versions of Android but when I got Android 4.2.2 device I noticed that it's possible to change the theme in device settings to ex. Mint. Then part of my app interface is in mint color (the things I didn't changed in default holo light theme) and part is in holo_blue_light.
The question is how to modify my style, instead of using #android:color/holo_blue_light to have main theme color (which in some cases will be blue light but in some cases ex. mint) (what label to use to get main theme color?).
Thanks for help.
Yar this links may helpful for you change your theme color and even to change actionbar follow