All Questions
Tagged with android-dark-theme react-native
9 questions
0
votes
2
answers
1k
views
My React Native app is lagging in the light mode, but is superfast in the dark
I am creating a React Native app with light and dark modes. The colors of all components in the app are controlled with my custom hook:
export const useColors = (): UseColorsResult => {
const ...
2
votes
2
answers
2k
views
dark mode interfering with background color
I'm trying to apply background colors to my app and for some reason I can't get the right colors
for example:
<View style={{backgroundColor:'yellow'}}></View>
but I'm getting
the first ...
0
votes
2
answers
2k
views
React-native dark theme in class based project
i am having trouble adding a dark-theme support to my react-native app.
theme-context.js
import React from 'react';
const themes = {
dark: {
backgroundColor: 'gray',
...
0
votes
1
answer
1k
views
How to set a theme based on the dark mode choice of the device?
I have two themes set up in styles.xml. When the app launches I want to set the appropriate theme
based on the dark mode choice of the device. Let's say I want to have different colors for ...
2
votes
3
answers
5k
views
React Native Appearance.addChangeListener() does nothing
I am writing my first react-native app and would like to switch themes like GMail does.
Indeed GMail get darker colors when we change the theme mode, or set automatic dark theme during nights, into ...
1
vote
2
answers
351
views
I'm trying to implement dark mode in react native
When trying to assign the variable "theme" (which receives the useColorScheme library) as a style, the following error is presented.
Error image
Light and dark styles were created in styles.js.
...
0
votes
1
answer
931
views
React-native: Is there way to listen to Color Scheme (Dark Mode) change?
The official guideline suggests checking if Dark Theme is enabled on each component render. This seems grossly wrong. Is there better way of keeping the dark mode up to date?
7
votes
1
answer
5k
views
react native force light mode in android app
when I run my react native app in the emulator (pixel android 10), I noticed that the app change the white background to black when the phone set to dark mode.
this made hard to read the black text or ...
1
vote
2
answers
4k
views
How to activate the dark mode in react native app when android theme set to dark mode?
I am developing a react native app which supports dark theme.
I used react navigation and created custom theme using React context. Now I can toggle between dark mode and light mode using a button. ...