Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
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

enter image description here enter image description here

the first one in system dark mode and second one in light mode ( settings & phone model )

so how do I get consistent colors in any mode?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I'm not quite sure if I understand you right. But I assume you don't want your App to be able to force dark mode right? Some of our users with the same Redmi Phone you mentioned also had the problem with forced dark mode which made the appearance pretty ugly.

If so, add the item 'forceDarkAllowed' set to false inside your /android/app/src/main/res/values/styles.xml

<resources>
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
    <item name="android:windowBackground">@drawable/launch_screen_bitmap</item>
    <item name="android:forceDarkAllowed">false</item>
about 4 years ago · Juan Pablo Isaza Denunciar

0

You should not hardcode the color like this. try to use color dynamically based on the light or dark theme.

Use the package like this :

react-native-appearance

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda