diff --git a/examples/NavigationPlayground/App.js b/examples/NavigationPlayground/App.js index c499b60a..36789705 100644 --- a/examples/NavigationPlayground/App.js +++ b/examples/NavigationPlayground/App.js @@ -1,6 +1,9 @@ import { Platform } from 'react-native'; import { useScreens } from 'react-native-screens'; -useScreens(); + +if (Platform.OS === 'android') { + // useScreens(); +} import App from './js/App'; export default App; diff --git a/examples/NavigationPlayground/js/App.js b/examples/NavigationPlayground/js/App.js index 499897f9..93bf6bd7 100644 --- a/examples/NavigationPlayground/js/App.js +++ b/examples/NavigationPlayground/js/App.js @@ -11,11 +11,14 @@ import { Platform, ScrollView, StyleSheet, - TouchableOpacity, Text, StatusBar, View, } from 'react-native'; +import { + RectButton, + NativeViewGestureHandler, +} from 'react-native-gesture-handler'; import { SafeAreaView, createStackNavigator } from 'react-navigation'; import { createAppContainer } from '@react-navigation/native'; import { Assets as StackAssets } from 'react-navigation-stack'; @@ -237,84 +240,91 @@ class MainScreen extends React.Component { return ( - - - + - + - - - - React Navigation Examples - + + + + + React Navigation Examples + + + + + + + + {Object.keys(ExampleRoutes).map((routeName: string) => ( + { + let route = ExampleRoutes[routeName]; + if (route.screen || route.path || route.params) { + const { path, params, screen } = route; + const { router } = screen; + const action = + path && + router.getActionForPathAndParams(path, params); + navigation.navigate(routeName, {}, action); + } else { + navigation.navigate(routeName); + } + }} + > + + + + {ExampleInfo[routeName].name} + + + {ExampleInfo[routeName].description} + + + + + ))} - - - - - {Object.keys(ExampleRoutes).map((routeName: string) => ( - { - let route = ExampleRoutes[routeName]; - if (route.screen || route.path || route.params) { - const { path, params, screen } = route; - const { router } = screen; - const action = - path && router.getActionForPathAndParams(path, params); - navigation.navigate(routeName, {}, action); - } else { - navigation.navigate(routeName); - } - }} - > - - - - {ExampleInfo[routeName].name} - - - {ExampleInfo[routeName].description} - - - - - ))} - - - + + { return ( {routes.map(route => ( - navigation.navigate(route.routeName)} style={styles.tab} key={route.routeName} > {route.routeName} - + ))} ); diff --git a/examples/NavigationPlayground/js/SimpleStack.js b/examples/NavigationPlayground/js/SimpleStack.js index f70c3305..4f4cbf4e 100644 --- a/examples/NavigationPlayground/js/SimpleStack.js +++ b/examples/NavigationPlayground/js/SimpleStack.js @@ -60,7 +60,7 @@ class MyNavScreen extends React.Component { 'missing action creators for StackNavigator' ); return ( - + {banner}