Skip to content

Commit

Permalink
A touch of support for android
Browse files Browse the repository at this point in the history
  • Loading branch information
spencercarli committed Nov 18, 2015
1 parent 2e9f312 commit d2c7e40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
40 changes: 3 additions & 37 deletions ReactNativeTodos/index.android.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,18 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';

var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
} = React;

let Main = require('./app/components/main.js');

var ReactNativeTodos = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Shake or press menu button for dev menu
</Text>
</View>
<Main />
);
}
});

var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});

AppRegistry.registerComponent('ReactNativeTodos', () => ReactNativeTodos);
2 changes: 1 addition & 1 deletion ReactNativeTodos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start": "node_modules/react-native/packager/packager.sh",
"ios": "open ios/ReactNativeTodos.xcodeproj && REACT_EDITOR=atom npm start",
"android": "echo Android not yet tested or supported"
"android": "react-native run-android"
},
"dependencies": {
"ddp-client": "hharnisc/node-ddp-client#minimongo-cache",
Expand Down

0 comments on commit d2c7e40

Please sign in to comment.