No Description

index.android.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. * @flow
  5. */
  6. import React, { Component } from 'react';
  7. import {
  8. AppRegistry,
  9. StyleSheet,
  10. Text,
  11. View
  12. } from 'react-native';
  13. import {Navigation} from 'react-native-navigation';
  14. class react_native_navigation_bootstrap extends Component {
  15. render() {
  16. return (
  17. <View style={styles.container}>
  18. <Text style={styles.welcome}>
  19. Welcome to React Native!
  20. </Text>
  21. <Text style={styles.instructions}>
  22. To get started, edit index.ios.js
  23. </Text>
  24. <Text style={styles.instructions}>
  25. Press Cmd+R to reload,{'\n'}
  26. Cmd+D or shake for dev menu
  27. </Text>
  28. </View>
  29. );
  30. }
  31. }
  32. const styles = StyleSheet.create({
  33. container: {
  34. flex: 1,
  35. justifyContent: 'center',
  36. alignItems: 'center',
  37. backgroundColor: '#F5FCFF',
  38. },
  39. welcome: {
  40. fontSize: 20,
  41. textAlign: 'center',
  42. margin: 10,
  43. },
  44. instructions: {
  45. textAlign: 'center',
  46. color: '#333333',
  47. marginBottom: 5,
  48. },
  49. });
  50. Navigation.registerComponent('react-native-navigation-bootstrap', () => react_native_navigation_bootstrap);
  51. Navigation.startSingleScreenApp({
  52. screen: {
  53. screen: 'react-native-navigation-bootstrap',
  54. title: 'Navigation Bootstrap'
  55. }
  56. });