GithubHelp home page GithubHelp logo

Comments (6)

zoontek avatar zoontek commented on July 18, 2024 1

@kevinranks Just published 5.5.0-rc.1 that use system dark mode setting instead of the Appearance module. Try it! 🙂

from react-native-bootsplash.

zoontek avatar zoontek commented on July 18, 2024

Hi @kevinranks! First, thanks for buying a license, it helps a lot 🙏

Like I said in #484, it's not possible to use the user preferred theme (at least the one enforced in the app) as the system starts showing the splash screen (using android:windowSplashScreenBackground, android:windowSplashScreenBrandingImage, etc), then your app starts. This allow instant opening response, but makes advanced customization impossible.

Screenshot 2024-03-28 at 10 46 16

But there's also something I miss: I tend to never use per-app system settings overrides and I didn't know that the Appearance module was able to override that (for me, this should be done user-side: Appearance.getColorScheme() should return the system preference, but you could be able to override it and saves it in MMKV, AsyncStorage or else)

Knowing that, I will replace the useColorScheme library usage with an exported constant and always respect the system setting instead. Expect a 5.5.0.rc-1 that contain the fix this week-end.

from react-native-bootsplash.

kevinranks avatar kevinranks commented on July 18, 2024

Hi @kevinranks! First, thanks for buying a license, it helps a lot 🙏

Like I said in #484, it's not possible to use the user preferred theme (at least the one enforced in the app) as the system starts showing the splash screen (using android:windowSplashScreenBackground, android:windowSplashScreenBrandingImage, etc), then your app starts. This allow instant opening response, but makes advanced customization impossible.

Screenshot 2024-03-28 at 10 46 16 But there's also something I miss: I tend to never use per-app system settings overrides and I didn't know that the `Appearance` module was able to override that (for me, this should be done user-side: `Appearance.getColorScheme()` should return the system preference, but you could be able to override it and saves it in `MMKV`, `AsyncStorage` or else)

Knowing that, I will replace the useColorScheme library usage with an exported constant and always respect the system setting instead. Expect a 5.5.0.rc-1 that contain the fix this week-end.

Thank you! Yeah, Appearance.setColorScheme() allows you to set a local app preferred scheme that overrides what useColorSCheme and getColorSCheme returns. So if this library grabbed the preferred scheme directly from the system instead, it should never end up with the issue of the splash screen switching between screens. And it would still allow developers to use the local color scheme for their app UI.

Will keep an eye on the releases. Thanks again

from react-native-bootsplash.

zoontek avatar zoontek commented on July 18, 2024

Available in 5.5.0

from react-native-bootsplash.

fahadJariwala avatar fahadJariwala commented on July 18, 2024

Hi @zoontek
First of all Thanks for the Amazing library, I have just switched raect-native-splash screen to react-native-bootsplash.
I am getting stuck on setting the system theme instead of the systemColorScheme.
Could you please give me some examples to set systemTheme instead of systemColorScheme

from react-native-bootsplash.

zoontek avatar zoontek commented on July 18, 2024

@fahadJariwala It uses the system theme, not the one defined / overwritten in your app.

As the splash screen starts BEFORE your app (for faster launch), you can't enforce light / dark mode. It follows the system setting.

from react-native-bootsplash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.