1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 11:51:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

working on android

This commit is contained in:
tdzl2003
2016-03-31 16:22:47 +08:00
parent 2765d2f4be
commit dbe1f9b26d
20 changed files with 375 additions and 168 deletions

View File

@@ -1,51 +1 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View
} from 'react-native';
class testHotUpdate extends Component {
render() {
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>
);
}
}
const 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('testHotUpdate', () => testHotUpdate);
require('./js/index');

View File

@@ -1,69 +1 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native';
import {downloadFile, reloadUpdate} from 'react-native-update'
class testHotUpdate extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<TouchableOpacity onPress={
()=>{
downloadFile({updateUrl:'http://7xjhby.com2.z0.glb.qiniucdn.com/ios1.ppk', hashName:'test'})
}
}>
<Text style={styles.instructions}>
Press To DownloadFile
</Text>
</TouchableOpacity>
<TouchableOpacity onPress={
()=>{
reloadUpdate({hashName:'test'})
}
}>
<Text style={styles.instructions}>
Press To Reload
</Text>
</TouchableOpacity>
</View>
);
}
}
const 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('testHotUpdate', () => testHotUpdate);
require('./js/index');

View File

@@ -0,0 +1,69 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
} from 'react-native';
import {downloadFile, reloadUpdate} from 'react-native-update'
class testHotUpdate extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<TouchableOpacity onPress={
()=>{
downloadFile({updateUrl:'http://7xjhby.com2.z0.glb.qiniucdn.com/ios1.ppk', hashName:'test'})
}
}>
<Text style={styles.instructions}>
Press To DownloadFile
</Text>
</TouchableOpacity>
<TouchableOpacity onPress={
()=>{
reloadUpdate({hashName:'test'})
}
}>
<Text style={styles.instructions}>
Press To Reload
</Text>
</TouchableOpacity>
</View>
);
}
}
const 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('testHotUpdate', () => testHotUpdate);

View File

@@ -7,6 +7,6 @@
},
"dependencies": {
"react-native": "^0.20.0",
"react-native-update": "git+https://github.com/reactnativecn/react-native-pushy"
"react-native-pushy": "../.."
}
}