react-native-navigation的迁移库

app.js 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import {Navigation} from 'react-native-navigation';
  2. // screen related book keeping
  3. import {registerScreens} from './screens';
  4. registerScreens();
  5. // this will start our app
  6. Navigation.startTabBasedApp({
  7. tabs: [
  8. {
  9. label: 'Collapsing',
  10. screen: 'example.CollapsingTopBarScreen',
  11. icon: require('../img/one.png'),
  12. title: 'Collapsing',
  13. },
  14. {
  15. label: 'One',
  16. screen: 'example.FirstTabScreen',
  17. icon: require('../img/one.png'),
  18. selectedIcon: require('../img/one_selected.png'),
  19. title: 'Screen One'
  20. },
  21. {
  22. label: 'Two',
  23. screen: 'example.SecondTabScreen',
  24. icon: require('../img/two.png'),
  25. selectedIcon: require('../img/two_selected.png'),
  26. title: 'Screen Two',
  27. navigatorStyle: {
  28. tabBarBackgroundColor: '#4dbce9',
  29. }
  30. }
  31. ],
  32. appStyle: {
  33. tabBarBackgroundColor: '#0f2362',
  34. tabBarButtonColor: '#ffffff',
  35. tabBarSelectedButtonColor: '#63d7cc'
  36. }
  37. });
  38. //Navigation.startSingleScreenApp({
  39. // screen: {
  40. // screen: 'example.FirstTabScreen',
  41. // title: 'Navigation',
  42. // navigatorStyle: {
  43. // navBarBackgroundColor: '#4dbce9',
  44. // navBarTextColor: '#ffff00',
  45. // navBarSubtitleTextColor: '#ff0000',
  46. // navBarButtonColor: '#ffffff',
  47. // statusBarTextColorScheme: 'light'
  48. // }
  49. // },
  50. // drawer: {
  51. // left: {
  52. // screen: 'example.SideMenu'
  53. // }
  54. // }
  55. //});