react-native-navigation的迁移库

app.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: 'One',
  10. screen: 'example.FirstTabScreen',
  11. icon: require('../img/one.png'),
  12. selectedIcon: require('../img/one_selected.png'),
  13. title: 'Screen One',
  14. navigatorStyle: {
  15. navBarBackgroundColor: '#4dbce9',
  16. navBarTextColor: '#ffff00',
  17. navBarSubtitleTextColor: '#ff0000',
  18. navBarButtonColor: '#ffffff',
  19. statusBarTextColorScheme: 'light',
  20. tabBarBackgroundColor: '#4dbce9',
  21. tabBarButtonColor: '#ffffff',
  22. tabBarSelectedButtonColor: '#ffff00'
  23. }
  24. },
  25. {
  26. label: 'Two',
  27. screen: 'example.SecondTabScreen',
  28. icon: require('../img/two.png'),
  29. selectedIcon: require('../img/two_selected.png'),
  30. title: 'Screen Two',
  31. navigatorStyle: {
  32. tabBarBackgroundColor: '#4dbce9',
  33. }
  34. }
  35. ]
  36. });
  37. // Navigation.startSingleScreenApp({
  38. // screen: {
  39. // screen: 'example.FirstTabScreen',
  40. // title: 'Navigation',
  41. // navigatorStyle: {
  42. // navBarBackgroundColor: '#4dbce9',
  43. // navBarTextColor: '#ffff00',
  44. // navBarSubtitleTextColor: '#ff0000',
  45. // navBarButtonColor: '#ffffff',
  46. // statusBarTextColorScheme: 'light'
  47. // }
  48. // },
  49. // drawer: {
  50. // left: {
  51. // screen: 'example.SideMenu'
  52. // }
  53. // }
  54. // });