mehcode / rn-splash-screen

A JavaScript-controlled splash-screen for React Native designed to be run directly after the native splash-screen.
MIT License
350 stars 95 forks source link

Android: Allow custom background color #46

Open ox-michaelradionov opened 7 years ago

ox-michaelradionov commented 7 years ago

Adds third optional argument to SplashScreen.show() on Android to allow customization of background color. It is important for me because this color appears for a second when keyboard animation happens (it is displayed when space for keyboard is already reserved but opening animation is still happening). By default white background color is used.

Usage:

import android.graphics.Color;

SplashScreen.show(this, getReactInstanceManager(), Color.rgb(255, 0, 0));
mehcode commented 7 years ago

@ox-michaelradionov Would it be possible to get this color from the theme? Or something similar declaratively? I'll merge this if that's non-trivial or doesn't make sense to you.

ox-michaelradionov commented 7 years ago

@mehcode I'm not sure if it is possible, I'll check

ox-michaelradionov commented 7 years ago

@mehcode I've updated the PR to use themes as you suggested.