Drawer navigation with top tabs after login The 2019 Stack Overflow Developer Survey Results Are InReact-native NavigationShow splash screen before show main screen in react native without using 3rd party libraryReact Navigation Redux Authentication Keeps StackingState Management in React Native AppHow to push a new scene using react-navigation?React Native Navigation invoke all screens componentDidMount/componentWillMount when navigated to Home after loginReact Navigation - Pass props into NavigatorNot able to navigate to other page in react nativeHow to fix this error 'undefined is not an object'?How to add an image to Header of Navigation Drawer in React Native?
Can we generate random numbers using irrational numbers like π and e?
writing variables above the numbers in tikz picture
How come people say “Would of”?
Does adding complexity mean a more secure cipher?
If a sorcerer casts the Banishment spell on a PC while in Avernus, does the PC return to their home plane?
How do I free up internal storage if I don't have any apps downloaded?
How can I define good in a religion that claims no moral authority?
What is preventing me from simply constructing a hash that's lower than the current target?
What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?
Is it safe to harvest rainwater that fell on solar panels?
What do hard-Brexiteers want with respect to the Irish border?
Keeping a retro style to sci-fi spaceships?
Output the Arecibo Message
The difference between dialogue marks
Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?
What is this sharp, curved notch on my knife for?
Can you cast a spell on someone in the Ethereal Plane, if you are on the Material Plane and have the True Seeing spell active?
Why was M87 targeted for the Event Horizon Telescope instead of Sagittarius A*?
If I score a critical hit on an 18 or higher, what are my chances of getting a critical hit if I roll 3d20?
Old scifi movie from the 50s or 60s with men in solid red uniforms who interrogate a spy from the past
Pokemon Turn Based battle (Python)
Why doesn't UInt have a toDouble()?
Is Cinnamon a desktop environment or a window manager? (Or both?)
What is the most efficient way to store a numeric range?
Drawer navigation with top tabs after login
The 2019 Stack Overflow Developer Survey Results Are InReact-native NavigationShow splash screen before show main screen in react native without using 3rd party libraryReact Navigation Redux Authentication Keeps StackingState Management in React Native AppHow to push a new scene using react-navigation?React Native Navigation invoke all screens componentDidMount/componentWillMount when navigated to Home after loginReact Navigation - Pass props into NavigatorNot able to navigate to other page in react nativeHow to fix this error 'undefined is not an object'?How to add an image to Header of Navigation Drawer in React Native?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I've been trying to build an application which will goto login screen after splash. Once the user logs in, it should be directed to a screen which has drawer navigation and tabs in it. I've been trying to implement this using react native expo. It's working fine in expo. But once I generate an APK and try to use it, after logging in it redirects to splash and login without showing any content. I've been using react-navigation package for navigating between the screens
My Navigator.js:
import React from 'react';
import createAppContainer, createDrawerNavigator, createStackNavigator from 'react-navigation';
import SplashScreen from '../screens/SplashScreen';
import Screen1 from '../screens/Screen1';
import Screen2 from '../screens/Screen2';
import Screen3 from '../screens/Screen3';
import MainDrawer from '../common/MainDrawer';
const LoginNavigator = createStackNavigator(
splash: SplashScreen
,
headerMode: 'none',
navigationOptions:
headerVisibile: false,
);
const DrawerNavigator = createDrawerNavigator(
screen1: Screen1,
screen2: Screen2,
screen3: Screen3,
,
initialRouteName: 'screen1',
contentComponent: props => <MainDrawer ...props />,
drawerWidth: 350,
headerMode: 'none',
navigationOptions:
headerVisible: false,
);
const TotalNavigator = createStackNavigator(
loginStack: screen: LoginNavigator ,
drawerStack: screen: DrawerNavigator ,
,
headerMode: 'none',
initialRouteName: 'loginStack',
navigationOptions:
headerVisible: false,
)
PrimaryNavigator = createAppContainer(TotalNavigator);
export default PrimaryNavigator;
My MainDrawer.js:
import React from 'react';
import View, Text from 'react-native';
import Image from 'react-native-remote-svg';
export default class MainDrawer extends React.Component
constructor(props)
super(props);
static navigationOptions =
header: null,
;
render()
return (
<View style= width: '100%', height: '100%', backgroundColor: '#2C2663' >
<View style= left: '7%', top: '10%' >
<View style= flexDirection: 'row', justifyContent: 'space-between' >
<Image source=require('../assets/images/user_pic.svg') />
<Text style= color: '#fff', fontSize: 25, flexDirection: 'row', left: '-28%', top: '10%' > SomeOne</Text>
</View>
<View style= width: '80%', borderBottomWidth: 1, borderBottomColor: '#C0C0C0', top: '20%' />
<Text style= color: '#C0C0C0', fontSize: 11, top: '30%' >
`Some dummy text`</Text>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '40%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-40%', top: '10%'
onPress=() => this.props.navigation.navigate('screen1')> Screen 1 </Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '50%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon2.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-42%', top: '10%'
onPress=() => this.props.navigation.navigate('screen2')
> Screen 2</Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '60%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon3.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-16%', top: '10%'
onPress=() => this.props.navigation.navigate('screen3')
> Screen 3</Text>
</View>
</View>
</View>);
My SplashScreen.js:
import React from 'react';
import Animated from 'react-native';
import LottieView from 'lottie-react-native';
import LoginScreen from './LoginScreen.js';
export default class SplashScreen extends React.Component
constructor(props)
super(props);
this.state = isAnimationVisible: true, animationProgress: new Animated.Value(0) ;
this.homeScreen = this.homeScreen.bind(this);
static navigationOptions =
header: null,
;
componentDidMount()
Animated.timing(this.state.animationProgress, toValue: 1, duration: 15000 )
.start(() => this.setState(s => ( ...s, isAnimationVisible: false )));
//Navigate to Home screen
homeScreen()
this.props.navigation.navigate('drawerStack');
render()
if (this.state.isAnimationVisible)
const interpolation = this.state.animationProgress.interpolate( inputRange: [0, 1], outputRange: [0, 1] );
return (
<LottieView
source=require('../assets/animations/splash.json')
progress=interpolation
autoPlay
loop=false
resizeMode='cover'
/>
);
else
return (<LoginScreen goToHome=this.homeScreen />);
My LoginScreen.js:
import React from 'react';
import View, Image, Text, TextInput, KeyboardAvoidingView, ActivityIndicator from 'react-native';
import Button from 'native-base';
import loginStyles from '../styles/loginStyles';
class LoginScreen extends React.Component {
constructor(props)
super(props);
this.state =
email: '',
password: '',
;
this.onButtonPress = this.onButtonPress.bind(this);
static navigationOptions =
header: null,
;
onButtonPress()
let Users = list of users;
for (let i = 0; i < Users.length; i++)
if ((Users[i].username == this.state.email) && (Users[i].password = this.state.password))
this.props.goToHome();
render()
// On pressing login after giving credentials this.onButtonPress() is called
export default LoginScreen;
Can someone pointout where the issue is and suggest a fix? Thanks in advance.
react-native react-navigation expo react-navigation-drawer
add a comment |
I've been trying to build an application which will goto login screen after splash. Once the user logs in, it should be directed to a screen which has drawer navigation and tabs in it. I've been trying to implement this using react native expo. It's working fine in expo. But once I generate an APK and try to use it, after logging in it redirects to splash and login without showing any content. I've been using react-navigation package for navigating between the screens
My Navigator.js:
import React from 'react';
import createAppContainer, createDrawerNavigator, createStackNavigator from 'react-navigation';
import SplashScreen from '../screens/SplashScreen';
import Screen1 from '../screens/Screen1';
import Screen2 from '../screens/Screen2';
import Screen3 from '../screens/Screen3';
import MainDrawer from '../common/MainDrawer';
const LoginNavigator = createStackNavigator(
splash: SplashScreen
,
headerMode: 'none',
navigationOptions:
headerVisibile: false,
);
const DrawerNavigator = createDrawerNavigator(
screen1: Screen1,
screen2: Screen2,
screen3: Screen3,
,
initialRouteName: 'screen1',
contentComponent: props => <MainDrawer ...props />,
drawerWidth: 350,
headerMode: 'none',
navigationOptions:
headerVisible: false,
);
const TotalNavigator = createStackNavigator(
loginStack: screen: LoginNavigator ,
drawerStack: screen: DrawerNavigator ,
,
headerMode: 'none',
initialRouteName: 'loginStack',
navigationOptions:
headerVisible: false,
)
PrimaryNavigator = createAppContainer(TotalNavigator);
export default PrimaryNavigator;
My MainDrawer.js:
import React from 'react';
import View, Text from 'react-native';
import Image from 'react-native-remote-svg';
export default class MainDrawer extends React.Component
constructor(props)
super(props);
static navigationOptions =
header: null,
;
render()
return (
<View style= width: '100%', height: '100%', backgroundColor: '#2C2663' >
<View style= left: '7%', top: '10%' >
<View style= flexDirection: 'row', justifyContent: 'space-between' >
<Image source=require('../assets/images/user_pic.svg') />
<Text style= color: '#fff', fontSize: 25, flexDirection: 'row', left: '-28%', top: '10%' > SomeOne</Text>
</View>
<View style= width: '80%', borderBottomWidth: 1, borderBottomColor: '#C0C0C0', top: '20%' />
<Text style= color: '#C0C0C0', fontSize: 11, top: '30%' >
`Some dummy text`</Text>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '40%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-40%', top: '10%'
onPress=() => this.props.navigation.navigate('screen1')> Screen 1 </Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '50%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon2.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-42%', top: '10%'
onPress=() => this.props.navigation.navigate('screen2')
> Screen 2</Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '60%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon3.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-16%', top: '10%'
onPress=() => this.props.navigation.navigate('screen3')
> Screen 3</Text>
</View>
</View>
</View>);
My SplashScreen.js:
import React from 'react';
import Animated from 'react-native';
import LottieView from 'lottie-react-native';
import LoginScreen from './LoginScreen.js';
export default class SplashScreen extends React.Component
constructor(props)
super(props);
this.state = isAnimationVisible: true, animationProgress: new Animated.Value(0) ;
this.homeScreen = this.homeScreen.bind(this);
static navigationOptions =
header: null,
;
componentDidMount()
Animated.timing(this.state.animationProgress, toValue: 1, duration: 15000 )
.start(() => this.setState(s => ( ...s, isAnimationVisible: false )));
//Navigate to Home screen
homeScreen()
this.props.navigation.navigate('drawerStack');
render()
if (this.state.isAnimationVisible)
const interpolation = this.state.animationProgress.interpolate( inputRange: [0, 1], outputRange: [0, 1] );
return (
<LottieView
source=require('../assets/animations/splash.json')
progress=interpolation
autoPlay
loop=false
resizeMode='cover'
/>
);
else
return (<LoginScreen goToHome=this.homeScreen />);
My LoginScreen.js:
import React from 'react';
import View, Image, Text, TextInput, KeyboardAvoidingView, ActivityIndicator from 'react-native';
import Button from 'native-base';
import loginStyles from '../styles/loginStyles';
class LoginScreen extends React.Component {
constructor(props)
super(props);
this.state =
email: '',
password: '',
;
this.onButtonPress = this.onButtonPress.bind(this);
static navigationOptions =
header: null,
;
onButtonPress()
let Users = list of users;
for (let i = 0; i < Users.length; i++)
if ((Users[i].username == this.state.email) && (Users[i].password = this.state.password))
this.props.goToHome();
render()
// On pressing login after giving credentials this.onButtonPress() is called
export default LoginScreen;
Can someone pointout where the issue is and suggest a fix? Thanks in advance.
react-native react-navigation expo react-navigation-drawer
add a comment |
I've been trying to build an application which will goto login screen after splash. Once the user logs in, it should be directed to a screen which has drawer navigation and tabs in it. I've been trying to implement this using react native expo. It's working fine in expo. But once I generate an APK and try to use it, after logging in it redirects to splash and login without showing any content. I've been using react-navigation package for navigating between the screens
My Navigator.js:
import React from 'react';
import createAppContainer, createDrawerNavigator, createStackNavigator from 'react-navigation';
import SplashScreen from '../screens/SplashScreen';
import Screen1 from '../screens/Screen1';
import Screen2 from '../screens/Screen2';
import Screen3 from '../screens/Screen3';
import MainDrawer from '../common/MainDrawer';
const LoginNavigator = createStackNavigator(
splash: SplashScreen
,
headerMode: 'none',
navigationOptions:
headerVisibile: false,
);
const DrawerNavigator = createDrawerNavigator(
screen1: Screen1,
screen2: Screen2,
screen3: Screen3,
,
initialRouteName: 'screen1',
contentComponent: props => <MainDrawer ...props />,
drawerWidth: 350,
headerMode: 'none',
navigationOptions:
headerVisible: false,
);
const TotalNavigator = createStackNavigator(
loginStack: screen: LoginNavigator ,
drawerStack: screen: DrawerNavigator ,
,
headerMode: 'none',
initialRouteName: 'loginStack',
navigationOptions:
headerVisible: false,
)
PrimaryNavigator = createAppContainer(TotalNavigator);
export default PrimaryNavigator;
My MainDrawer.js:
import React from 'react';
import View, Text from 'react-native';
import Image from 'react-native-remote-svg';
export default class MainDrawer extends React.Component
constructor(props)
super(props);
static navigationOptions =
header: null,
;
render()
return (
<View style= width: '100%', height: '100%', backgroundColor: '#2C2663' >
<View style= left: '7%', top: '10%' >
<View style= flexDirection: 'row', justifyContent: 'space-between' >
<Image source=require('../assets/images/user_pic.svg') />
<Text style= color: '#fff', fontSize: 25, flexDirection: 'row', left: '-28%', top: '10%' > SomeOne</Text>
</View>
<View style= width: '80%', borderBottomWidth: 1, borderBottomColor: '#C0C0C0', top: '20%' />
<Text style= color: '#C0C0C0', fontSize: 11, top: '30%' >
`Some dummy text`</Text>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '40%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-40%', top: '10%'
onPress=() => this.props.navigation.navigate('screen1')> Screen 1 </Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '50%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon2.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-42%', top: '10%'
onPress=() => this.props.navigation.navigate('screen2')
> Screen 2</Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '60%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon3.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-16%', top: '10%'
onPress=() => this.props.navigation.navigate('screen3')
> Screen 3</Text>
</View>
</View>
</View>);
My SplashScreen.js:
import React from 'react';
import Animated from 'react-native';
import LottieView from 'lottie-react-native';
import LoginScreen from './LoginScreen.js';
export default class SplashScreen extends React.Component
constructor(props)
super(props);
this.state = isAnimationVisible: true, animationProgress: new Animated.Value(0) ;
this.homeScreen = this.homeScreen.bind(this);
static navigationOptions =
header: null,
;
componentDidMount()
Animated.timing(this.state.animationProgress, toValue: 1, duration: 15000 )
.start(() => this.setState(s => ( ...s, isAnimationVisible: false )));
//Navigate to Home screen
homeScreen()
this.props.navigation.navigate('drawerStack');
render()
if (this.state.isAnimationVisible)
const interpolation = this.state.animationProgress.interpolate( inputRange: [0, 1], outputRange: [0, 1] );
return (
<LottieView
source=require('../assets/animations/splash.json')
progress=interpolation
autoPlay
loop=false
resizeMode='cover'
/>
);
else
return (<LoginScreen goToHome=this.homeScreen />);
My LoginScreen.js:
import React from 'react';
import View, Image, Text, TextInput, KeyboardAvoidingView, ActivityIndicator from 'react-native';
import Button from 'native-base';
import loginStyles from '../styles/loginStyles';
class LoginScreen extends React.Component {
constructor(props)
super(props);
this.state =
email: '',
password: '',
;
this.onButtonPress = this.onButtonPress.bind(this);
static navigationOptions =
header: null,
;
onButtonPress()
let Users = list of users;
for (let i = 0; i < Users.length; i++)
if ((Users[i].username == this.state.email) && (Users[i].password = this.state.password))
this.props.goToHome();
render()
// On pressing login after giving credentials this.onButtonPress() is called
export default LoginScreen;
Can someone pointout where the issue is and suggest a fix? Thanks in advance.
react-native react-navigation expo react-navigation-drawer
I've been trying to build an application which will goto login screen after splash. Once the user logs in, it should be directed to a screen which has drawer navigation and tabs in it. I've been trying to implement this using react native expo. It's working fine in expo. But once I generate an APK and try to use it, after logging in it redirects to splash and login without showing any content. I've been using react-navigation package for navigating between the screens
My Navigator.js:
import React from 'react';
import createAppContainer, createDrawerNavigator, createStackNavigator from 'react-navigation';
import SplashScreen from '../screens/SplashScreen';
import Screen1 from '../screens/Screen1';
import Screen2 from '../screens/Screen2';
import Screen3 from '../screens/Screen3';
import MainDrawer from '../common/MainDrawer';
const LoginNavigator = createStackNavigator(
splash: SplashScreen
,
headerMode: 'none',
navigationOptions:
headerVisibile: false,
);
const DrawerNavigator = createDrawerNavigator(
screen1: Screen1,
screen2: Screen2,
screen3: Screen3,
,
initialRouteName: 'screen1',
contentComponent: props => <MainDrawer ...props />,
drawerWidth: 350,
headerMode: 'none',
navigationOptions:
headerVisible: false,
);
const TotalNavigator = createStackNavigator(
loginStack: screen: LoginNavigator ,
drawerStack: screen: DrawerNavigator ,
,
headerMode: 'none',
initialRouteName: 'loginStack',
navigationOptions:
headerVisible: false,
)
PrimaryNavigator = createAppContainer(TotalNavigator);
export default PrimaryNavigator;
My MainDrawer.js:
import React from 'react';
import View, Text from 'react-native';
import Image from 'react-native-remote-svg';
export default class MainDrawer extends React.Component
constructor(props)
super(props);
static navigationOptions =
header: null,
;
render()
return (
<View style= width: '100%', height: '100%', backgroundColor: '#2C2663' >
<View style= left: '7%', top: '10%' >
<View style= flexDirection: 'row', justifyContent: 'space-between' >
<Image source=require('../assets/images/user_pic.svg') />
<Text style= color: '#fff', fontSize: 25, flexDirection: 'row', left: '-28%', top: '10%' > SomeOne</Text>
</View>
<View style= width: '80%', borderBottomWidth: 1, borderBottomColor: '#C0C0C0', top: '20%' />
<Text style= color: '#C0C0C0', fontSize: 11, top: '30%' >
`Some dummy text`</Text>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '40%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-40%', top: '10%'
onPress=() => this.props.navigation.navigate('screen1')> Screen 1 </Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '50%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon2.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-42%', top: '10%'
onPress=() => this.props.navigation.navigate('screen2')
> Screen 2</Text>
</View>
<View style= flexDirection: 'row', justifyContent: 'space-between', top: '60%' >
<Image style= width: 30, height: 30 source=require('../assets/images/icon3.svg') />
<Text style= color: '#fff', fontSize: 20, flexDirection: 'row', left: '-16%', top: '10%'
onPress=() => this.props.navigation.navigate('screen3')
> Screen 3</Text>
</View>
</View>
</View>);
My SplashScreen.js:
import React from 'react';
import Animated from 'react-native';
import LottieView from 'lottie-react-native';
import LoginScreen from './LoginScreen.js';
export default class SplashScreen extends React.Component
constructor(props)
super(props);
this.state = isAnimationVisible: true, animationProgress: new Animated.Value(0) ;
this.homeScreen = this.homeScreen.bind(this);
static navigationOptions =
header: null,
;
componentDidMount()
Animated.timing(this.state.animationProgress, toValue: 1, duration: 15000 )
.start(() => this.setState(s => ( ...s, isAnimationVisible: false )));
//Navigate to Home screen
homeScreen()
this.props.navigation.navigate('drawerStack');
render()
if (this.state.isAnimationVisible)
const interpolation = this.state.animationProgress.interpolate( inputRange: [0, 1], outputRange: [0, 1] );
return (
<LottieView
source=require('../assets/animations/splash.json')
progress=interpolation
autoPlay
loop=false
resizeMode='cover'
/>
);
else
return (<LoginScreen goToHome=this.homeScreen />);
My LoginScreen.js:
import React from 'react';
import View, Image, Text, TextInput, KeyboardAvoidingView, ActivityIndicator from 'react-native';
import Button from 'native-base';
import loginStyles from '../styles/loginStyles';
class LoginScreen extends React.Component {
constructor(props)
super(props);
this.state =
email: '',
password: '',
;
this.onButtonPress = this.onButtonPress.bind(this);
static navigationOptions =
header: null,
;
onButtonPress()
let Users = list of users;
for (let i = 0; i < Users.length; i++)
if ((Users[i].username == this.state.email) && (Users[i].password = this.state.password))
this.props.goToHome();
render()
// On pressing login after giving credentials this.onButtonPress() is called
export default LoginScreen;
Can someone pointout where the issue is and suggest a fix? Thanks in advance.
react-native react-navigation expo react-navigation-drawer
react-native react-navigation expo react-navigation-drawer
edited Mar 11 at 6:02
Praneeth Rajarikam
asked Mar 8 at 10:23
Praneeth RajarikamPraneeth Rajarikam
448
448
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Instead of creating TotalNavigator
as StackNavigator use SwitchNavigation
instead at the root, like this:
SwitchNavigator
|
|-SplashScreen # Create this as single screen no need to create Stack, initial screen
|
|-LoginNavigator
|
|-DrawerNavigator
Then in the LoginScreen
just navigate to MainDrawer
directly, it will handle the back press as well.
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061158%2fdrawer-navigation-with-top-tabs-after-login%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Instead of creating TotalNavigator
as StackNavigator use SwitchNavigation
instead at the root, like this:
SwitchNavigator
|
|-SplashScreen # Create this as single screen no need to create Stack, initial screen
|
|-LoginNavigator
|
|-DrawerNavigator
Then in the LoginScreen
just navigate to MainDrawer
directly, it will handle the back press as well.
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
add a comment |
Instead of creating TotalNavigator
as StackNavigator use SwitchNavigation
instead at the root, like this:
SwitchNavigator
|
|-SplashScreen # Create this as single screen no need to create Stack, initial screen
|
|-LoginNavigator
|
|-DrawerNavigator
Then in the LoginScreen
just navigate to MainDrawer
directly, it will handle the back press as well.
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
add a comment |
Instead of creating TotalNavigator
as StackNavigator use SwitchNavigation
instead at the root, like this:
SwitchNavigator
|
|-SplashScreen # Create this as single screen no need to create Stack, initial screen
|
|-LoginNavigator
|
|-DrawerNavigator
Then in the LoginScreen
just navigate to MainDrawer
directly, it will handle the back press as well.
Instead of creating TotalNavigator
as StackNavigator use SwitchNavigation
instead at the root, like this:
SwitchNavigator
|
|-SplashScreen # Create this as single screen no need to create Stack, initial screen
|
|-LoginNavigator
|
|-DrawerNavigator
Then in the LoginScreen
just navigate to MainDrawer
directly, it will handle the back press as well.
answered Mar 8 at 19:36
Aadil MehrajAadil Mehraj
698
698
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
add a comment |
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
Thanks @Aadil. Got it.
– Praneeth Rajarikam
Mar 11 at 18:33
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55061158%2fdrawer-navigation-with-top-tabs-after-login%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown