react-navigation

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

扶醉桌前 提交于 2020-05-11 06:25:26
问题 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',

How to create two drawers in one page with tab navigator

為{幸葍}努か 提交于 2020-04-18 07:08:07
问题 I couldnt manage to open two drawers at both sides. I can open just in one side or I can locate drawers inferior not parallel but I need parallel drawers react-navigation v3 import React from 'react'; import {Dimensions} from 'react-native'; import { createAppContainer, createDrawerNavigator, createStackNavigator, } from 'react-navigation'; import MenuDrawer from './components/MenuDrawer'; const WIDTH = Dimensions.get('window').width; const DrawerConfig = { drawerWidth: WIDTH*0.83,

How can I force TabBar to show in all App screens react-navigation v5?

浪子不回头ぞ 提交于 2020-04-18 06:31:48
问题 I'm trying to show the Bottom TabBar in every screen in my app, but i can't find a way to do it in RN V5 yet, So When i tried to use tabBarVisible like this <BottomTab.Navigator lazy={false} tabBar={props => <TabBar {...props} />} screenOptions={({route}) => ( console.log('route', route), it's just log the five bottom component i have { tabBarVisible: ({routes}) => { let tabBarVisible = false; console.log('screens', routes); // Not log anything! return {tabBarVisible}; }, } )} .... > ... 5

React Native - How to set the drawer navigation content on the particular tab based on drawer item selection?

半世苍凉 提交于 2020-04-18 05:42:18
问题 What i want to achieve is there are 2 tabs in my app 1) Home => On press it shows a simple screen 2) Menu => On press it opens and close drawer based on whether drawer is opened or not. Drawer has custom content. It has 4 buttons 1) Accounts 2) Reports 3) Graph 4) List Selecting on any of the drawer item it should open a respective page in the "Menu" tab navigator space. So how to manage this kind of navigation? import React from 'react'; import { View, Text } from 'react-native' import {

TypeError: null is not an object (evaluating 'RNGestureHandlerModule.default.Direction')

我只是一个虾纸丫 提交于 2020-04-18 04:03:10
问题 I have problem with module 'react-navigation-stack' I've written the same code from https://facebook.github.io/react-native/docs/navigation#react-navigation. Platform: Android. OS: ubuntu import { createAppContainer } from 'react-navigation'; import { createStackNavigator } from 'react-navigation-stack'; import SearchScreen from './scr/screen/SearchScreen'; const navigator = createStackNavigator( { Search: SearchScreen }, { initialRouteName: 'Search', defaultNavigationOptions: { title: 'App'

TypeError: null is not an object (evaluating 'RNGestureHandlerModule.default.Direction')

北城以北 提交于 2020-04-18 04:03:10
问题 I have problem with module 'react-navigation-stack' I've written the same code from https://facebook.github.io/react-native/docs/navigation#react-navigation. Platform: Android. OS: ubuntu import { createAppContainer } from 'react-navigation'; import { createStackNavigator } from 'react-navigation-stack'; import SearchScreen from './scr/screen/SearchScreen'; const navigator = createStackNavigator( { Search: SearchScreen }, { initialRouteName: 'Search', defaultNavigationOptions: { title: 'App'

How to use createMaterialTopTabNavigator as a component

安稳与你 提交于 2020-04-16 05:50:32
问题 Hey I have a search screen "search for songs/artists" So after sending the request i want to appear a "Top Tabs", So I add a Top tab "createMaterialTopTabNavigator" inside separate files and then import it as a component to use it inside Search Screen like this <SearchTabs /> But i got an error Invariant Violation: The navigation prop is missing for this navigator. In react-navigation v3 and v4 you must set up your app container directly. More info: https://reactnavigation.org/docs/en/app

Jest testing React-native component which uses NavigationEvents trows error

◇◆丶佛笑我妖孽 提交于 2020-04-16 03:26:14
问题 I'm having some troubles Jest testing a component which uses {NavigationEvents} from 'react-navigation' this is the part of the component where i use it: render() { const spinner = this.state.isLoading ? ( <ActivityIndicator size="large" /> ) : null; return ( <ScrollView style={styles.container} keyboardDismissMode="on-drag" testID='SettingContainer'> <NavigationEvents onWillBlur={payload => locationGetter.checkLocationData( payload, 'Settings', this.props.t, this.props.location,

how to navigate to a particular tab from a drawer navigator menu react native

不羁岁月 提交于 2020-04-11 17:05:12
问题 I have to navigate to a particular tab when pressed from drawer items. I searched around a lot but couldnt find anything relating to my problem i tried to follow this link of navigation actions but couldnt find out how to implement it Navigate to specific tab from Drawer Navigator. const TabNavigator = createMaterialTopTabNavigator( { Upcoming: { screen: UpcomingScreen }, Accepted: { screen: AcceptedScreen }, Ongoing: { screen: OngoingScreen }, Completed: { screen: CompletedScreen }, }, );

how to navigate to a particular tab from a drawer navigator menu react native

醉酒当歌 提交于 2020-04-11 17:05:08
问题 I have to navigate to a particular tab when pressed from drawer items. I searched around a lot but couldnt find anything relating to my problem i tried to follow this link of navigation actions but couldnt find out how to implement it Navigate to specific tab from Drawer Navigator. const TabNavigator = createMaterialTopTabNavigator( { Upcoming: { screen: UpcomingScreen }, Accepted: { screen: AcceptedScreen }, Ongoing: { screen: OngoingScreen }, Completed: { screen: CompletedScreen }, }, );