React Navigation: Transparent header has no height - react-native

If I set headerTransparent: true the other content which was usually rendered below it moves underneath it. How can I avoid that?
My code:
export class RegisterScreen extends Component {
static navigationOptions = {
title: strings.header,
headerTitleStyle: { color: '#fff' },
headerTintColor: '#fff',
headerTransparent: true,
};
render() {
return <Display onSignUpPressed={() => {}} onHelpPressed={() => {}} />;
}
}
With transparent header (it overlaps :( ):
Without transparent header:
I'd like to have the content aligned as if the header had a height. So I want the content to be like in the second picture, but with a transparent header like in the first.

You can now use the headerStyle property to give your header a transparent background, while keeping its height:
static navigationOptions = {
title: strings.header,
headerTitleStyle: { color: '#fff' },
headerTintColor: '#fff',
headerStyle: { backgroundColor: 'transparent' },
};

Header overlaps with the content underneath if headerTransparent: true is set. You need to manually add a top margin or padding according to your situation to your content if you dont want it overlapped. React Navigation won't do it automatically but it provides a hook that gets header height
import { useHeaderHeight } from '#react-navigation/stack';
Now, you can get the height in your component like this:
const headerHeight = useHeaderHeight();

You will need to give you screen component a top padding equivalent to the height of the header ,

On React Native v6.x
Instead of doing
screenOptions={{headerTransparent: true}}
You can apply it in the backgroundColor in the header style like so
screenOptions={{
headerStyle: {
backgroundColor: 'transparent';
}
}}
This is if you wanna keep the padding

Add headerBackground to navigationOptions like this
static navigationOptions = {
title: strings.header,
headerTitleStyle: { color: '#fff' },
headerTintColor: '#fff',
headerTransparent: true,
headerBackground: Platform.select({
ios: <BlurView style={{ flex: 1 }} intensity={98} />,
android: (
<View style={{ flex: 1, backgroundColor: 'rgba(255,255,255,0.7)' }} />
),
}),
};

We can make transparent header with the help of
headerTransparent: true
but with this we also need to give headerStyle like this to make transparent header.
static navigationOptions = {
headerTransparent: true,
headerStyle: { borderBottomWidth: 0 }
};
In my case I make it possible by giving this style to my header.
style:{ position: 'absolute', backgroundColor: 'transparent', zIndex:
100, top: 0, left: 0, right: 0}

Related

Transparent background for header using createStackNavigator, React Native

I created a project using CRNA that uses React-Navigation. In one of the screen I have a background image that cover the entire screen and I want to including the header.
Like this image :
Should I just hide the header and use a View that contains the element that I want? If yes will this cause any trouble in case of deep linking?
Solution
React Navigation offers a cool props called headerTransparent that can be used in
order to render something under the header.
So the code at the should look like this :
static navigationOptions = {
headerTransparent: true
}
Right now with React Navigation 5 we can do something like this:
{
headerShown: true,
headerTransparent: true,
}
For example:
const Screen = ({ navigation }) => {
navigation.setOptions({
headerShown: true,
headerTransparent: true,
});
return (
<View>
<Text>Render your component</Text>
</View>
);
};
this worked for me :
navigationOptions: {
...
headerTransparent: true,
headerStyle: {
backgroundColor: 'transparent',
...
}
}
To achieve this effect you need to follow those steps:
Change the style of the navigation header with absolute position, transparent background and no border.
Use ImageBackground component as parent component for your screen with the image that you want to use as background.
Add padding top to this ImageBackground to fix the overlapping.
So your code should looks something similar to this:
import React, {Component} from 'react';
import {
StyleSheet,
Button,
ImageBackground,
Platform,
} from 'react-native';
import {
createStackNavigator,
} from 'react-navigation';
class HomeScreen extends Component {
render() {
return (
<ImageBackground
style={styles.container}
source={require('./images/bg.png')}
>
<Button
onPress={() => {}}
title="Just a button"
/>
</ImageBackground>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
paddingTop: Platform.OS === 'ios' ? 60 : 80,
}
});
const App = createStackNavigator({
Home: {
screen: HomeScreen,
navigationOptions: {
title: 'Home',
headerStyle: {
position: 'absolute',
backgroundColor: 'transparent',
zIndex: 100,
top: 0,
left: 0,
right: 0,
elevation: 0,
shadowOpacity: 0,
borderBottomWidth: 0,
}
},
}
})
export default App;
Solution:
navigationOptions: {
headerTransparent: {
position: 'absolute',
backgroundColor: 'transparent',
zIndex: 100,
top: 0,
left: 0,
right: 0
}
If using React Navigation 6.x, the option is the same headerTransparent:
<Stack.Screen
name="BottomTab"
component={BottomTabNavigator}
options={{
headerTransparent: true,
}}
/>
You need to use headerTransparent and headerShadowVisible otherwise if you just use headerTransparent a shadow will be left. This works with React Navigation 6.x. See de docs here https://reactnavigation.org/docs/native-stack-navigator/#headershadowvisible
<Stack.Screen name='Main' component={Main}
options={{
title: 'MainPage',
headerTransparent: true,
headerShadowVisible: false
}}
/>
I have achieved it setting the navigation options like this:
BirdDetails.navigationOptions = () => {
return {
...NavStyle,
headerStyle: {
backgroundColor: 'transparent',
},
headerTransparent: {
position: 'absolute',
},
headerLeft: <Back></Back>,
headerRight: <HeaderDetailsRight></HeaderDetailsRight>,
};
};
With V5
<NavigationContainer>
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerShown: true,
headerTransparent:true
}}
>
<Stack.Screen name="Home" component={HomeScreen}/>
<Stack.Screen name="Detail" component={DetailScreen}/>
<Stack.Screen name="Setting" component={SettingScreen}/>
</Stack.Navigator>
</NavigationContainer>
this worked for me:
headerStyle: {elevation:0, backgroundColor:"transparent"}
set elevation to 0 so there is no shadow.
I did it this way, it has one flaw though, in the the background color must be hard-coded. This approach is specifically for ScrollView and starts out transparent becoming opaque (keeping the original text).
Since this was designed for native stack navigator to leverage iOS' large text the headerHeight also needs to be adjusted to the proper values.
const navigation = useNavigation();
return (
<ScrollView
onLayout={(e) => {
navigation.setOptions({
headerStyle: {
backgroundColor: "transparent",
},
});
}}
onScroll={(e) => {
const headerOpacity =
Math.min(
Math.max(e.nativeEvent.contentOffset.y, 0) / headerHeight,
1.0
) ?? 0.0;
navigation.setOptions({
headerStyle: {
elevation: headerOpacity,
backgroundColor: `rgba(255,0,0,${headerOpacity})`,
},
});
}}
scrollEventThrottle={16}
contentInsetAdjustmentBehavior="never"
>

How do you make the react-native react-navigation tab bar transparent

Is there a way to make the tab bar transparent? I tried the following but it just showed a white background. Do I need to implement my own tabBarComponent? If so, is there any documentation on that class and what interface I need to implement?
const MainTabNavigator = TabNavigator(
{
MessageCenter: { screen: MessageCenterStack },
Camera: { screen: CameraStack },
},
{
tabBarPosition: 'bottom',
swipeEnabled: true,
animationEnabled: true,
tabBarOptions: {
style: {
backgroundColor: 'transparent',
},
}
}
);
I have to set position absolute and give it a left right and bottom for it the backgroundColor transparent to take effect.
tabBarOptions: {
showIcon: true,
showLabel: false,
lazyLoad: true,
style: {
backgroundColor: 'transparent',
borderTopWidth: 0,
position: 'absolute',
left: 50,
right: 50,
bottom: 20,
height: 100
}
}
I finally got it working on android and ios by adding a container view for the custom tab bar component and make the container absolute positioned and leave the tab bar as it is
Here is the custom tab bar component
const TabBarComponent = (props) => (<BottomTabBar {...props} />)
Here is the tab bar options
{
tabBarComponent: props => {
return (
<View style={{
position: 'absolute',
left: 0,
right: 0,
bottom: 0,
}}>
<TabBarComponent {...props} />
</View>
)
},
tabBarOptions: {
style: {
borderTopWidth: 0,
backgroundColor: '#FFFFFF',
borderTopRightRadius: 20,
borderTopLeftRadius: 20,
height: 55,
paddingBottom: 5,
}
},
initialRouteName: 'HomeScreen',
}
And the final result
position: 'absolute' is a solution for this, but you may notice it'll not look perfectly with the android side, however working perfectly for the android side.
Finally, I found the solution to this after long hard work.
elevation: 0
Set this on tab bar style will fix this issue.
Example -
tabBarOptions={{
showIcon: true,
showLabel: true,
activeTintColor: COLORS.tabSelected,
inactiveTintColor: COLORS.tabNormal,
style: {
backgroundColor:'transparent',
borderTopWidth: 0,
position: 'absolute',
elevation: 0 // <-- this is the solution
},
labelStyle: {
fontSize: 12,
},
}}>
Here are the output screenshots.
A lot of the answers here seem to be a little convoluted for the question. So for others looking how to do so, here's a simple answer:
Within the tab bar options change position to absolute and background colour to transparent such that it looks like:
tabBarOptions: {
style: {
backgroundColor: 'transparent',
position: 'absolute',
left: 0,
bottom: 0,
right: 0
}
}
This is how I solved this for react-navigation v6
import {
createBottomTabNavigator,
BottomTabBar,
} from '#react-navigation/bottom-tabs';
We need to use BottomTabBar to customize the layout and make it transparent
const Tab = createBottomTabNavigator();
<Tab.Navigator
// Here under tabBar we customize the view and set the bg to transparent
tabBar={props => (
<View style={{ backgroundColor: 'transparent', position: 'absolute', left: 0, bottom: 0, right: 0 }}>
<BottomTabBar {...props} />
</View>
)}>
...
If you do it under
screenOptions={({ route }) => ({
tabBarStyle:{
position:absolute,
...
}
})
}
it doesn't work as excpected
For React Navigation v6, you would want to set up screenOptions on the TabNavigator. (I use it in combination with custom / transparent bottom tab bar).
import {
BottomTabBar,
createBottomTabNavigator,
} from '#react-navigation/bottom-tabs';
const Tab = createBottomTabNavigator();
<Tab.Navigator
screenOptions={{
tabBarStyle: {backgroundColor: 'blue'},
}}
tabBar={props => {
return (
<View>
<BottomTabBar {...props} />
</View>
);
}}
initialRouteName={SCREEN_NAMES.APP.HOME_TAB}
...
</Tab.Navigator>
Mohammed Tawfik's answer worked for me but I had to import <BottomTabBar>component from react-navigation-tabs instead of suggested react-navigation.
In React Navigation v5
tabBarOptions={{
style: {
borderTopWidth: 0,
backgroundColor: 'transparent',
elevation: 0, // this solved the triangle type view problem in android
},
}}>
actually, It is getting its color from NavigationContainer theme backgroundColor you can give transparent color to NavigationContainer like this
import { NavigationContainer } from "#react-navigation/native";
import { createBottomTabNavigator } from "#react-navigation/bottom-tabs";
const Tab = createBottomTabNavigator();
const theme = { //like this
colors: {
background: "transparent",
},
};
<NavigationContainer theme={theme}>
<Tab.Navigator>
<Tab.Screen component={ComponentA} name="A" />
<Tab.Screen component={ComponentB} name="B" />
</Tab.Navigator>
</NavigationContainer>
The solution is simple, think about all component rendering placing in-app,
header: navigation header
body: app content
footer: tab-bar
In-app all the above three-component have their own specific place to render one after one like position relative(default).
and where you want to show the tab-bar top of the body (ignoring its position and placing), then you have to bring it on top of the body by styling tabbarOption "position: 'absolute'",
now it's working, but one new problem arise, due to position absolute body goes all the way bottom, and some of the body content is hidden behind the tab-bar
to fix that need to add padding or add some dummy with some height as per bottom tab bar inside all body screens.

How to open keyboard automatically in React Native when component mounts?

My page has only a single TextInput, and I have passed in the autoFocus prop: autoFocus: true.
<TextInput
style={styles.textInput}
placeholder="Quiz Deck Title"
autoFocus={true}
value={this.state.title}
onChangeText={(title) => this.controlledTextInput(title)}
/>
What I am trying to avoid is requiring the user to "click" in the TextInput box before the keyboard pops up.
But I would also like to have the soft keyboard also open automatically (if the device does not have a hardware keyboard).
Is there way to make this happen in react native? I am developing for both ios and android.
If it matters, my page is navigated to via TabNavigator.
I mention this because a comment to another similar SO question (see below) suggests they had a similar issue when they arrived at their page using StackNavigator.
Note on Similar SO questions:
How to open keyboard automatically in React Native?
: does not provide a solution, and comments by others suggest the same results as myself: input is focused, but keyboard does not automatically open.
Close/hide the Android Soft Keyboard
and Android: show soft keyboard automatically when focus is on an EditText
: are using native android code (java), not react native code (javascript).
Note: I am developing using the android emulator Nexus 6P with android 23 (as recommended), and ios simulator with iPhone 6s, as I do not have physical devices.
Edit: Adding Requested Code
NewDeck.js (the view I want the keyboard to auto pop up on):
import React from 'react';
import { connect } from 'react-redux';
import { View, Text, TouchableOpacity,
TextInput, KeyboardAvoidingView,
StyleSheet, Platform,
} from 'react-native';
import StyledButton from '../components/StyledButton';
import { saveDeck } from '../store/decks/actionCreators';
import { getDeckList } from '../store/decks/selectors';
import { fetchDecks } from '../utils/api';
import { saveDeckTitle } from '../utils/api';
} from '../utils/colors';
import { titleCase, stripInvalidChars, makeStringUnique }
from '../utils/helpers';
import { white, gray, primaryColor, primaryColorDark, primaryColorLight,
class NewDeck extends React.Component {
state = {
title: '',
canSubmit: false,
}
componentDidMount () {
this.textInputRef.focus()
}
controlledTextInput(title){
title = titleCase(stripInvalidChars(title));
const canSubmit = this.isValidInput(title);
this.setState({ title, canSubmit });
}
isValidInput(text){
return text.trim() !== '';
}
onBlur(){
title = this.state.title.trim();
const unique = makeStringUnique(title, this.props.existingTitles);
this.setState({ title: unique });
}
onSubmit(){
let title = this.state.title.trim();
title = makeStringUnique(title, this.props.existingTitles)
saveDeckTitle(title)
this.props.navigation.navigate('Home');
}
render() {
return (
<View style={styles.container}>
<View style={[styles.cardContainer, {flex: 1}]}>
<Text style={styles.instructionsText}
>
Title for your New Quiz Deck
</Text>
<KeyboardAvoidingView {...keyboardAvoidingViewProps}>
<TextInput
style={styles.textInput}
placeholder="Quiz Deck Title"
value={this.state.title}
onChangeText={(title) => this.controlledTextInput(title)}
/* autoFocus={true} */
ref={ref => this.textInputRef = ref}
/>
</KeyboardAvoidingView>
</View>
<KeyboardAvoidingView
{...keyboardAvoidingViewProps}
style={[styles.buttonsContainer, styles.buttonContainer]}
>
<StyledButton
style={[styles.item, style={flex: 2}]}
onPress={() => this.onSubmit()}
disabled={!this.state.canSubmit}
>
<Text>
Submit
</Text>
</StyledButton>
</KeyboardAvoidingView>
</View>
);
}
}
const keyboardAvoidingViewProps = {
behavior: 'padding',
};
// ...styles definition here, - I posted it in a later code block, to minimize
// clutter, in the event that it is irrelevant to this issue
function mapStoreToProps(store){
const decks = getDeckList(store) || null;
// ensure titles are unique (better UX than if just make id unique)
const existingTitles = decks && decks.map(deck => {
return deck.title
}) || [];
return {
existingTitles,
}
}
export default connect(mapStoreToProps)(NewDeck);
TabNavigator and StackNavigator code (in App.js):
// ... the TabNavigator I'm using:
import { TabNavigator, StackNavigator } from 'react-navigation';
//... the class's render method, uses StackNavigator (as MainNavigation)
render(){
return (
<Provider store={createStore(rootReducer)}>
<View style={{flex:1}}>
<AppStatusBar
backgroundColor={primaryColor}
barStyle="light-content"
/>
<MainNavigation />
</View>
</Provider>
);
}
}
// ...
const Tabs = TabNavigator(
{
DeckList: {
screen: DeckList,
navigationOptions: {
tabBarLabel: 'Quiz Decks',
tabBarIcon: ({ tintColor }) => // icons only show in ios
<Ionicons name='ios-bookmarks' size={30} color={tintColor} />
},
},
NewDeck: {
screen: NewDeck,
navigationOptions: {
tabBarLabel: 'Create New Deck',
tabBarIcon: ({ tintColor }) => // icons only show in ios
<FontAwesome name='plus-square' size={30} color={tintColor} />
},
},
},
{
navigationOptions: {
// do-not-display page headers for Tab Navigation
header: null
},
tabBarOptions: {
// ios icon and text color; android text color
activeTintColor: Platform.OS === 'ios' ? primaryColor : white,
pressColor: white,
indicatorStyle: {
backgroundColor: primaryColorDark,
height: 3,
},
style: {
height: 56,
backgroundColor: Platform.OS === 'ios' ? white : primaryColor,
shadowColor: 'rgba(0, 0, 0, 0.24)',
shadowOffset: {
width: 0,
height: 3
},
shadowRadius: 6,
shadowOpacity: 1
}
}
}
);
//... StackNavigator uses TabNavigator (as Tabs)
const stackScreenNavigationOptions = {
headerTintColor: white,
headerStyle: {
backgroundColor: primaryColor,
}
};
const MainNavigation = StackNavigator(
// RouteConfigs: This is analogous to defining Routes in a web app
{
Home: {
screen: Tabs, // Which also loads the first Tab (DeckList)
},
Deck: {
screen: Deck,
navigationOptions: stackScreenNavigationOptions,
},
Quiz: {
screen: Quiz,
navigationOptions: stackScreenNavigationOptions,
},
NewDeck: {
screen: NewDeck,
navigationOptions: stackScreenNavigationOptions,
},
NewCard: {
screen: NewCard,
navigationOptions: stackScreenNavigationOptions,
},
},
);
This is the styles definition for NewDeck.js
const styles = StyleSheet.create({
// CONTAINER styles
wrapper: {
// this was the previous container style
flex: 1,
backgroundColor: white,
alignItems: 'center',
justifyContent: 'center',
},
container: {
flex: 1,
backgroundColor: white,
alignItems: 'center',
justifyContent: 'space-between',
padding: 10,
paddingTop: 30,
paddingBottom: 5,
},
cardContainer: {
flex: 1,
justifyContent: 'flex-start',
alignSelf: 'stretch',
backgroundColor: '#fefefe',
padding: 20,
marginLeft: 30,
marginRight: 30,
marginTop: 10,
borderRadius: Platform.OS === 'ios' ? 20 : 10,
shadowRadius: 3,
shadowOpacity: 0.8,
shadowColor: 'rgba(0, 0, 0, 0.24)',
shadowOffset: {
width: 0,
height: 3,
},
marginBottom:20,
},
buttonsContainer: {
flex: 3,
alignSelf: 'stretch',
justifyContent: 'flex-start',
},
buttonContainer: {
justifyContent: 'center',
margin: 10,
},
// TEXT Styles
instructionsText: {
flex: 1,
fontSize: 20,
color: gray,
alignSelf: 'center',
textAlign: 'center',
},
// INPUTTEXT styles
textInput: {
fontSize: 27,
color: primaryColor,
alignSelf: 'stretch',
flexWrap: 'wrap',
textAlign: 'center',
marginTop: 10,
},
});
StyledButton.js (Basically, TouchableOpacity with platform-specific styling, for universal use across the app):
import React from 'react';
import { Text, TouchableOpacity, StyleSheet, Platform } from 'react-native';
import { white, gray, primaryColor, primaryColorLight, primaryColorDark} from '../utils/colors';
export default function TextButton({ children, onPress, customColor, disabled=false }) {
const disabledColor = disabled ? gray : null;
const backgroundColor = Platform.OS==='ios' ? white : disabledColor || customColor || primaryColorLight;
const borderColor = Platform.OS==='ios' ? disabledColor || customColor || primaryColorDark
const textColor = Platform.OS==='ios' ? disabledColor || customColor || primaryColor : white;
const btnStyle = Platform.OS==='ios' ? styles.iosBtn : styles.androidBtn;
const txtStyle = styles.txtDefault;
const btnColor = { backgroundColor, borderColor };
const txtColor = { color: textColor };
return (
<TouchableOpacity
onPress={onPress}
disabled={disabled}
style={[btnStyle, btnColor]}
>
<Text
style={[styles.txtDefault, txtColor]}
>
{children}
</Text>
</TouchableOpacity>
);
}
const styles = StyleSheet.create({
txtDefault: {
textAlign: 'center',
// because of bleeding of white text to colored background on android,
// enlarge text (or increase fontWeight) for better readability
fontSize: Platform.OS==='ios' ? 15 : 18,
padding: 10,
},
iosBtn: {
height: 45,
borderRadius: 7,
alignSelf: 'center',
justifyContent: 'center',
alignItems: 'center',
// ios only settings
borderColor: primaryColorDark,
borderWidth: 1,
borderRadius: 3,
paddingLeft: 25,
paddingRight: 25,
},
androidBtn: {
height: 45,
borderRadius: 5,
alignSelf: 'center',
justifyContent: 'center',
alignItems: 'center',
// android- only settings
// (padding accepts clicks, vs. margin === no-click zone)
padding: 20,
paddingLeft: 15,
paddingRight: 15,
},
});
// ios has white buttons with colored outlines and colored text
// android has colored buttons with white text
// Pass in a button color, or it defaults to the App's primary colors
just wrap the ref inside timeout
setTimeout(()=>{this.textInputRef.focus()},100)
Old Issue, but if anyone is searching through here for an answer..
It looks like the keyboard doesn't come up if you're stuck in an animation (e.g. if coming from another screen).
You can use a ref to focus on your input, but must wrap in within InteractionManager.runAfterInteractions for it to work correctly.
This is how I solved it:
export const CustomInput: FunctionComponent<Props & TextInputProps> = ({
error,
...props
}) => {
const inputRef = useRef<TextInput>(null);
useEffect(() => {
// Must run after animations for keyboard to automatically open
InteractionManager.runAfterInteractions(() => {
if (inputRef?.current) {
inputRef.current.focus();
}
});
}, [inputRef]);
return (
<View>
<TextInput
ref={inputRef}
{...props}
/>
{error && <ErrorText>{error}</ErrorText>}
</View>
);
};```
You can always use .focus on any of your TextInput when the component loads, to show the keyboard if you want to avoid the autoFocus.
componentDidMount () {
this.textInputRef.focus()
}
<TextInput
style={styles.textInput}
ref={ref => this.textInputRef = ref}
placeholder="Quiz Deck Title"
autoFocus={true}
value={this.state.title}
onChangeText={(title) => this.controlledTextInput(title)}
/>
As mentioned in the docs
Two methods exposed via the native element are .focus() and .blur() that will focus or blur the TextInput programmatically.
I only needed the 'autoFocus' prop to get this going as at today.
https://reactnative.dev/docs/textinput#autofocus

StackNavigator: Not able to change font color for the header title

I am trying to change the color of the font for the title from black to white. Not able to do it. I have the following in the code:
navigationOptions: {
title: 'PRACTICIA',
headerLeft: null,
headerStyle: {
backgroundColor: '#33ACDE',
color: 'white'
}
}
}
and i get the following result (black).
Style defined in headerStyle will be applied to the header <View />.
To apply style to the title, you must use headerTitleStyle as described in the StackNavigator documentation.
navigationOptions: {
title: 'PRACTICIA',
headerLeft: null,
headerStyle: {
backgroundColor: '#33ACDE'
},
headerTitleStyle: {
color: 'white'
}
}
Within your navigation.js file, just add **headerTitleStyle ** and then add color of your choice. Follow the code snippet for your reference:
<Stack.Navigator
screenOptions={{
headerTitleStyle : {
color: 'white'
}
}} >

Custom View as background for StackNavigator

I need use one image below stack navigator or something like this.
Into StackNavigator I can set backgroundColor, opacity (view style) etc. But no possibility to set one background image or custom view component. Also if set to each screen its not good for screen translation.
I was try to wrap like this:
<ImageBackground>
<MyStackNavigator/>
</ImageBackground/>
No results.
Can you help me? +1 for any try
I found a solution
Navigator:
const AuthStackNavigator = StackNavigator({
LANDING: {
screen: LandingScreen
},
SIGN_IN: {
screen: SignInScreen
},
{
mode: 'card',
cardStyle: { backgroundColor: 'transparent' },
transitionConfig: () => ({
containerStyle: {
backgroundColor: 'transparent',
}
}),
initialRouteName: 'LANDING',
}
);
Render:
render() {
return <ImageBackground
style={{
width: null,
height: null,
backgroundColor: 'transparent',
flex: 1,
}}
source={landing_background}
>
<AuthStackNavigator
ref='navigator'
/>
</ImageBackground>
}