zoontek / react-native-bootsplash

🚀 Show a splash screen during app startup. Hide it when you are ready.
MIT License
3.74k stars 258 forks source link

Expose constants, so one can use it for ones own animations. #622

Closed ronickg closed 2 months ago

ronickg commented 2 months ago

Summary

I am currently implementing my own animation using Reanimated 3 instead of react native's default animation. And currently there isn't an easy way to get the correct positions for the logo or brand text when on android, as some devices may have a nav bar or not. And as the library already has its own native modules to get these constants, it would be very helpful if they could also be used in ones code.

Compatibility

OS Implemented
iOS
Android

Checklist

zoontek commented 2 months ago

No need for that. useHideAnimation takes statusBarTranslucent and navigationBarTranslucent. The objects returned by the hook are just View / Image props, no need to recreate the logic on your side.

Here's an example with reanimated and masked view.

ronickg commented 2 months ago

No need for that. useHideAnimation takes statusBarTranslucent and navigationBarTranslucent.

The objects returned by the hook are just View / Image props, no need to recreate the logic on your side.

Here's an example with reanimated and masked view.

Ahh, mb was looking for a reanimated example but didn't find one. Thanks !